Skip to content

Commit

Permalink
[traffic] Remove overridden die action as it doesn't work
Browse files Browse the repository at this point in the history
  • Loading branch information
minhduc0711 committed Sep 27, 2021
1 parent 380968c commit 7b7d898
Showing 1 changed file with 0 additions and 16 deletions.
Expand Up @@ -1887,20 +1887,4 @@ public static void unregister(final IScope scope, final IAgent driver)
}
setCurrentRoad(driver, null);
}

// TODO: this action is not overridden
@action(
name = "die",
doc = @doc(
value = "remove the driving agent from its current road and make it die",
examples = { @example("do die") }
)
)
public void primDieWrapper(final IScope scope) throws GamaRuntimeException {
AbstractAgent vehicle = (AbstractAgent) getCurrentAgent(scope);
if (!vehicle.dead() && getCurrentRoad(vehicle) != null) {
unregister(scope, vehicle);
}
vehicle.primDie(scope);
}
}

0 comments on commit 7b7d898

Please sign in to comment.