when an object has moved into a new room, this function unlinks it from its old room and links it into the new room
| 2106 | // when an object has moved into a new room, this function unlinks it |
| 2107 | // from its old room and links it into the new room |
| 2108 | void ObjRelink(int objnum, int newroomnum) { |
| 2109 | ASSERT((objnum >= 0) && (objnum <= Highest_object_index)); |
| 2110 | |
| 2111 | if (!ROOMNUM_OUTSIDE(newroomnum)) { |
| 2112 | ASSERT((newroomnum <= Highest_room_index) && (newroomnum >= 0)); |
| 2113 | ASSERT(Rooms[newroomnum].used); |
| 2114 | } else |
| 2115 | ASSERT(CELLNUM(newroomnum) >= 0 && CELLNUM(newroomnum) <= (TERRAIN_WIDTH * TERRAIN_DEPTH)); |
| 2116 | |
| 2117 | ObjUnlink(objnum); |
| 2118 | ObjLink(objnum, newroomnum); |
| 2119 | } |
| 2120 | |
| 2121 | void DoCycledAnim(object *obj) { |
| 2122 | float from; |
no test coverage detected