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

Function ObjGetUltimateParent

Descent3/object.cpp:3453–3466  ·  view source on GitHub ↗

Returns the original parent for the given object. Returns self if it has no parent

Source from the content-addressed store, hash-verified

3451
3452// Returns the original parent for the given object. Returns self if it has no parent
3453object *ObjGetUltimateParent(object *child) {
3454 ASSERT(child);
3455
3456 object *ret = child;
3457 int handle;
3458
3459 handle = child->parent_handle;
3460
3461 while (ObjGet(handle)) {
3462 ret = ObjGet(handle);
3463 handle = ret->parent_handle;
3464 }
3465 return ret;
3466}
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
3469void ObjGhostObject(int objnum) {

Callers 13

check_lg_informFunction · 0.85
msafe_GetValueFunction · 0.85
GetPlayerSlotFunction · 0.85
MultiSendObjectFunction · 0.85
DoConcussiveForceFunction · 0.85
ApplyDamageToPlayerFunction · 0.85
ApplyDamageToGenericFunction · 0.85
DoorwayOpenableFunction · 0.85
HomingAquireTargetFunction · 0.85
FindSpawnHomingTargetFunction · 0.85

Calls 1

ObjGetFunction · 0.85

Tested by

no test coverage detected