| 119 | } |
| 120 | |
| 121 | static const char* getObjDebugDescriptiveName(const BASE_OBJECT *psObj) |
| 122 | { |
| 123 | OBJECT_TYPE type = psObj->type; |
| 124 | switch (type) |
| 125 | { |
| 126 | case OBJ_DROID: |
| 127 | return droidGetName(((const DROID *)psObj)); |
| 128 | case OBJ_STRUCTURE: |
| 129 | return getID(((const STRUCTURE *)psObj)->pStructureType); |
| 130 | case OBJ_FEATURE: |
| 131 | return getID(((const FEATURE *)psObj)->psStats); |
| 132 | default: |
| 133 | break; |
| 134 | } |
| 135 | return "n/a"; |
| 136 | } |
| 137 | |
| 138 | // Check that psVictim is not referred to by any other object in the game. We can dump out some extra data in debug builds that help track down sources of dangling pointer errors. |
| 139 | #ifdef DEBUG |
no test coverage detected