| 538 | } |
| 539 | |
| 540 | uint RoadVehicle::Crash(bool flooded) |
| 541 | { |
| 542 | uint victims = this->GroundVehicleBase::Crash(flooded); |
| 543 | if (this->IsFrontEngine()) { |
| 544 | victims += 1; // driver |
| 545 | |
| 546 | /* If we're in a drive through road stop we ought to leave it */ |
| 547 | if (IsInsideMM(this->state, RVSB_IN_DT_ROAD_STOP, RVSB_IN_DT_ROAD_STOP_END)) { |
| 548 | RoadStop::GetByTile(this->tile, GetRoadStopType(this->tile))->Leave(this); |
| 549 | } |
| 550 | } |
| 551 | this->crashed_ctr = flooded ? 2000 : 1; // max 2220, disappear pretty fast when flooded |
| 552 | return victims; |
| 553 | } |
| 554 | |
| 555 | static void RoadVehCrash(RoadVehicle *v) |
| 556 | { |
no test coverage detected