MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / get

Function get

src/OpenLoco/src/Entities/EntityManager.cpp:122–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120
121 template<>
122 EntityBase* get(EntityId id)
123 {
124 EntityBase* result = nullptr;
125 if (enumValue(id) < Limits::kMaxEntities)
126 {
127 return &rawEntities()[enumValue(id)];
128 }
129 return result;
130 }
131
132 constexpr size_t getSpatialIndexOffset(const World::Pos2& loc)
133 {

Callers 4

resetFunction · 0.70
freeEntityFunction · 0.70
updateMethod · 0.50
createMethod · 0.50

Calls 1

enumValueFunction · 0.85

Tested by

no test coverage detected