Permalink
Browse files

Merge pull request #327 from redv/fix_vehicle_die

fixed vehicle.die()
  • Loading branch information...
JonnyH committed Dec 31, 2017
2 parents e7facb5 + 5bc1aff commit f31d8b8b83f991fd037a6622eba55e1cc5403cdd
Showing with 5 additions and 0 deletions.
  1. +5 −0 game/state/city/vehicle.cpp
@@ -1841,6 +1841,11 @@ void Vehicle::die(GameState &state, bool silent, StateRef<Vehicle> attacker)
// Dying will remove agent from current agents list
agent->die(state, true);
}
// Remove from building
if (currentBuilding)
{
currentBuilding->currentVehicles.erase({&state, shared_from_this()});
}
// Adjust relationships
if (attacker && !crashed)

0 comments on commit f31d8b8

Please sign in to comment.