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

Function GetObjectID

Descent3/objinfo.cpp:236–244  ·  view source on GitHub ↗

Find an object with the given type. Returns -1 if none found.

Source from the content-addressed store, hash-verified

234
235// Find an object with the given type. Returns -1 if none found.
236int GetObjectID(int type) {
237 int i;
238
239 for (i = 0; i < MAX_OBJECT_IDS; i++)
240 if (Object_info[i].type == type)
241 return i;
242
243 return -1;
244}
245
246#ifdef EDITOR
247

Callers 1

FindValidIDFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected