Returns the original parent for the given object. Returns self if it has no parent
| 3451 | |
| 3452 | // Returns the original parent for the given object. Returns self if it has no parent |
| 3453 | object *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 |
| 3469 | void ObjGhostObject(int objnum) { |
no test coverage detected