Sets an object to a type OBJ_DUMMY (saves it's old type) so it won't be renderered, etc, but still alive
| 3467 | |
| 3468 | // Sets an object to a type OBJ_DUMMY (saves it's old type) so it won't be renderered, etc, but still alive |
| 3469 | void ObjGhostObject(int objnum) { |
| 3470 | ASSERT(objnum >= 0 && objnum < MAX_OBJECTS); |
| 3471 | if (objnum < 0 || objnum >= MAX_OBJECTS) |
| 3472 | return; |
| 3473 | |
| 3474 | object *obj = &Objects[objnum]; |
| 3475 | |
| 3476 | ASSERT(obj->type != OBJ_NONE); |
| 3477 | ASSERT(obj->type != OBJ_DUMMY); // Don't ghost a ghosted object!! |
| 3478 | ASSERT(obj->type != OBJ_PLAYER); |
| 3479 | ASSERT(obj->type != OBJ_GHOST); |
| 3480 | |
| 3481 | if (obj->type == OBJ_NONE || obj->type == OBJ_DUMMY || obj->type == OBJ_PLAYER || obj->type == OBJ_GHOST) |
| 3482 | return; |
| 3483 | |
| 3484 | obj->dummy_type = obj->type; |
| 3485 | obj->type = OBJ_DUMMY; |
| 3486 | } |
| 3487 | |
| 3488 | // Restores a ghosted object back to it's old type |
| 3489 | void ObjUnGhostObject(int objnum) { |
no outgoing calls
no test coverage detected