MCPcopy Create free account
hub / github.com/JACoders/OpenJK / IsValid

Method IsValid

code/rd-vanilla/G2_API.cpp:615–628  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

613 return mIds[idx];
614 }
615 bool IsValid(int handle) const
616 {
617 if (!handle)
618 {
619 return false;
620 }
621 assert(handle>0); //negative handle???
622 assert((handle&G2_INDEX_MASK)>=0&&(handle&G2_INDEX_MASK)<MAX_G2_MODELS); //junk handle
623 if (mIds[handle&G2_INDEX_MASK]!=handle) // not a valid handle, could be old
624 {
625 return false;
626 }
627 return true;
628 }
629 void Delete(int handle)
630 {
631 if (!handle)

Callers 7

G2_SaveGhoul2ModelsFunction · 0.45
G2API_SetRootSurfaceFunction · 0.45
G2API_GetBoltMatrixFunction · 0.45
G2API_HaveWeGhoul2ModelsFunction · 0.45
G2API_CollisionDetectFunction · 0.45
G2API_CopyGhoul2InstanceFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected