| 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 | { |
no test coverage detected