diff options
author | frosch <frosch@openttd.org> | 2009-01-25 13:20:13 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2009-01-25 13:20:13 +0000 |
commit | ca10c5c6e38a760ddfb0a95fc9c213c93b2c2957 (patch) | |
tree | 1e89bef8bb79ad7634ade4c4b3d84590b13ee993 | |
parent | 84848f8a28d951a1ceaad928a82578adb55da641 (diff) | |
download | openttd-ca10c5c6e38a760ddfb0a95fc9c213c93b2c2957.tar.xz |
(svn r15268) -Fix: AIEventVehicleLost triggered at every pbs signal independent of the vehicle being lost.
-rw-r--r-- | src/train_cmd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index d9793a70d..0cbecfd57 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -2704,7 +2704,6 @@ static PBSTileInfo ExtendTrainReservation(const Vehicle *v, TrackBits *new_track if (KillFirstBit(ft.m_new_td_bits) == TRACKDIR_BIT_NONE) { /* Possible signal tile. */ if (HasOnewaySignalBlockingTrackdir(ft.m_new_tile, FindFirstTrackdir(ft.m_new_td_bits))) break; - AI::NewEvent(v->owner, new AIEventVehicleLost(v->index)); } if (no_90deg_turns) { @@ -2954,6 +2953,7 @@ static Track ChooseTrainTrack(Vehicle *v, TileIndex tile, DiagDirection enterdir /* it is first time the problem occurred, set the "path not found" flag */ SetBit(v->u.rail.flags, VRF_NO_PATH_TO_DESTINATION); /* and notify user about the event */ + AI::NewEvent(v->owner, new AIEventVehicleLost(v->index)); if (_settings_client.gui.lost_train_warn && v->owner == _local_company) { SetDParam(0, v->index); AddNewsItem( |