Go through the object list and update an ID which has changed
| 327 | |
| 328 | // Go through the object list and update an ID which has changed |
| 329 | void RemapObjects(int old_id, int new_id) { |
| 330 | int i; |
| 331 | |
| 332 | for (i = 0; i < MAX_OBJECTS; i++) |
| 333 | if ((Objects[i].type == Object_info[new_id].type) && (Objects[i].id == old_id)) |
| 334 | Objects[i].id = new_id; |
| 335 | |
| 336 | for (i = 0; i < MAX_OBJECT_IDS; i++) { |
| 337 | if (Object_info[i].type != OBJ_NONE) { |
| 338 | int j; |
| 339 | |
| 340 | for (j = 0; j < MAX_DSPEW_TYPES; j++) |
| 341 | if (Object_info[i].dspew[j] == old_id) |
| 342 | Object_info[i].dspew[j] = new_id; |
| 343 | } |
| 344 | } |
| 345 | } |
| 346 | |
| 347 | // Remap all the static object ids (objects that must have a specific index) into their assigned slots. |
| 348 | void RemapStaticIDs() { |
no test coverage detected