MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / CheckID

Method CheckID

TombEngine/Game/Setup.cpp:47–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47bool ObjectHandler::CheckID(GAME_OBJECT_ID objectID, bool isSilent)
48{
49 if (objectID == GAME_OBJECT_ID::ID_NO_OBJECT || objectID >= GAME_OBJECT_ID::ID_NUMBER_OBJECTS)
50 {
51 if (!isSilent)
52 {
53 TENLog(
54 fmt::format("Attempted to access unavailable slot ID {}. Check if the last accessed moveable exists in the level.", objectID),
55 LogLevel::Warning, LogConfig::Debug);
56 }
57
58 return false;
59 }
60
61 return true;
62}
63
64ObjectInfo& ObjectHandler::operator [](int objectID)
65{

Callers 4

ControlFishSwarmFunction · 0.80
CompsognathusControlFunction · 0.80
BuildMethod · 0.80
UpdateAllItemsFunction · 0.80

Calls 2

TENLogFunction · 0.85
formatFunction · 0.50

Tested by

no test coverage detected