MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / ObjUnGhostObject

Function ObjUnGhostObject

Descent3/object.cpp:3489–3510  ·  view source on GitHub ↗

Restores a ghosted object back to it's old type

Source from the content-addressed store, hash-verified

3487
3488// Restores a ghosted object back to it's old type
3489void ObjUnGhostObject(int objnum) {
3490 ASSERT(objnum >= 0 && objnum < MAX_OBJECTS);
3491 if (objnum < 0 || objnum >= MAX_OBJECTS)
3492 return;
3493
3494 object *obj = &Objects[objnum];
3495
3496 ASSERT(obj->type == OBJ_DUMMY);
3497
3498 if (obj->type != OBJ_DUMMY)
3499 return;
3500
3501 //@@ASSERT (!(obj->flags&OF_INPLAYERINVENTORY));
3502 //@@if(obj->flags&OF_INPLAYERINVENTORY)
3503 //@@ return;
3504 if (obj->flags & OF_INPLAYERINVENTORY) {
3505 mprintf(0, "UnGhosting Object in that is currently in a player's inventory!\n");
3506 }
3507
3508 obj->type = obj->dummy_type;
3509 obj->dummy_type = OBJ_NONE;
3510}

Callers 8

msafe_CallFunctionFunction · 0.85
MultiDoGhostObjectFunction · 0.85
StuffObjectIntoPacketFunction · 0.85
ObjDeleteFunction · 0.85
ObjDeleteDeadFunction · 0.85
PlayerSpewInventoryFunction · 0.85
AddObjectMethod · 0.85
UseMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected