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

Function checkNumFreeEntities

src/OpenLoco/src/Entities/EntityManager.cpp:390–398  ·  view source on GitHub ↗

0x00470188

Source from the content-addressed store, hash-verified

388
389 // 0x00470188
390 bool checkNumFreeEntities(const size_t numNewEntities)
391 {
392 if (getListCount(EntityListType::null) <= numNewEntities)
393 {
394 GameCommands::setErrorText(StringIds::too_many_objects_in_game);
395 return false;
396 }
397 return true;
398 }
399
400 static void zeroEntity(EntityBase* ent)
401 {

Callers 4

createCarFunction · 0.85
createBaseVehicleFunction · 0.85
createNewVehicleFunction · 0.85
addCarToVehicleFunction · 0.85

Calls 2

getListCountFunction · 0.85
setErrorTextFunction · 0.85

Tested by

no test coverage detected