Permalink
Browse files

fixed vehicle.die()

  • Loading branch information...
redv committed Dec 31, 2017
1 parent e7facb5 commit 5bc1aff49409e40f3ba9deb87f727f47aefa842e
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 5bc1aff

Please sign in to comment.