If candidate within 8 vehicle components of src we ignore a self collision TODO: If we stored the car index this could be simplified
| 357 | // If candidate within 8 vehicle components of src we ignore a self collision |
| 358 | // TODO: If we stored the car index this could be simplified |
| 359 | static bool ignoreSelfCollision(VehicleBase& sourceVehicleId, const VehicleBase& candidateVehicleId) |
| 360 | { |
| 361 | auto* src = &sourceVehicleId; |
| 362 | for (uint32_t i = 0; i < 8; ++i) |
| 363 | { |
| 364 | src = src->nextVehicleComponent(); |
| 365 | if (src == nullptr) |
| 366 | { |
| 367 | return false; |
| 368 | } |
| 369 | if (src == &candidateVehicleId) |
| 370 | { |
| 371 | return true; |
| 372 | } |
| 373 | } |
| 374 | return false; |
| 375 | } |
| 376 | |
| 377 | // 0x004B1876 |
| 378 | EntityId checkForCollisions(VehicleBogie& bogie, World::Pos3& loc) |
no test coverage detected