| 1322 | } |
| 1323 | |
| 1324 | void EBNode_Move(bool f_offset, int roomnum, int pnt, vector *pos) { |
| 1325 | bn_list *nlist; |
| 1326 | nlist = BNode_GetBNListPtr(roomnum); |
| 1327 | |
| 1328 | int i; |
| 1329 | vector npos = *pos; |
| 1330 | |
| 1331 | if (f_offset) { |
| 1332 | npos += nlist->nodes[pnt].pos; |
| 1333 | |
| 1334 | fvi_info hit_info; |
| 1335 | fvi_query fq; |
| 1336 | |
| 1337 | // check to make sure it is still in the room and valid |
| 1338 | fq.p0 = &nlist->nodes[pnt].pos; |
| 1339 | fq.p1 = &npos; |
| 1340 | fq.startroom = (roomnum > Highest_room_index && roomnum <= Highest_room_index + 8) |
| 1341 | ? GetTerrainRoomFromPos(&nlist->nodes[pnt].pos) |
| 1342 | : roomnum; |
| 1343 | |
| 1344 | fq.rad = 0.25f; |
| 1345 | fq.flags = |
| 1346 | FQ_SOLID_PORTALS | FQ_NO_RELINK; // chrishack -- Might want to make FQ_IGNORE_MOVING_OBJECTS into a passed arg |
| 1347 | fq.thisobjnum = -1; |
| 1348 | fq.ignore_obj_list = NULL; |
| 1349 | |
| 1350 | fvi_FindIntersection(&fq, &hit_info); |
| 1351 | |
| 1352 | npos = hit_info.hit_pnt; |
| 1353 | } |
| 1354 | |
| 1355 | nlist->nodes[pnt].pos = npos; |
| 1356 | |
| 1357 | for (i = 0; i < nlist->nodes[pnt].num_edges; i++) { |
| 1358 | EBNode_ComputeEdgeCosts(roomnum, pnt, nlist->nodes[pnt].edges[i].end_room, nlist->nodes[pnt].edges[i].end_index); |
| 1359 | EBNode_ComputeEdgeCosts(nlist->nodes[pnt].edges[i].end_room, nlist->nodes[pnt].edges[i].end_index, roomnum, pnt); |
| 1360 | } |
| 1361 | } |
| 1362 | |
| 1363 | void EBNode_Draw(char draw_type, grViewport *vp, vector *viewer_eye, matrix *viewer_orient, float zoom) { |
| 1364 | int i; |
no test coverage detected