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

Method preTick

src/OpenLoco/src/Entities/EntityTweener.cpp:36–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34 }
35
36 void EntityTweener::preTick()
37 {
38 restore();
39 reset();
40 PopulateEntities<EntityListType::misc>(_entities, _prePos, [](auto*) { return true; });
41 PopulateEntities<EntityListType::vehicle>(_entities, _prePos, [](auto* ent) {
42 const auto* vehicle = ent->template asBase<Vehicles::VehicleBase>();
43 if (vehicle == nullptr)
44 {
45 // This can be never null but makes the compiler happy.
46 return false;
47 }
48 return vehicle->isVehicleBody() || vehicle->isVehicleBogie();
49 });
50 }
51
52 void EntityTweener::postTick()
53 {

Callers 1

variableUpdateFunction · 0.80

Calls 3

isVehicleBodyMethod · 0.80
isVehicleBogieMethod · 0.80
resetFunction · 0.70

Tested by

no test coverage detected