summaryrefslogtreecommitdiff
path: root/src/train_cmd.cpp
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2008-04-19 23:19:12 +0000
committerpeter1138 <peter1138@openttd.org>2008-04-19 23:19:12 +0000
commit210d757499c0e2323ee75d39105e7c68dc119156 (patch)
treeb590f481987fb948fc51c4d6da6e843f20b8c979 /src/train_cmd.cpp
parentde015fbf90615fa1321abf710c4a00e5a390b6ce (diff)
downloadopenttd-210d757499c0e2323ee75d39105e7c68dc119156.tar.xz
(svn r12798) -Feature: Add some support for NewGRF station animation. (Thanks to mart3p for samples and fixes)
Diffstat (limited to 'src/train_cmd.cpp')
-rw-r--r--src/train_cmd.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp
index cf6478b4c..15c47450f 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -48,6 +48,7 @@
#include "gfx_func.h"
#include "settings_type.h"
#include "order_func.h"
+#include "newgrf_station.h"
#include "table/strings.h"
#include "table/train_cmd.h"
@@ -2218,6 +2219,8 @@ void Train::PlayLeaveStationSound() const
SND_41_MAGLEV
};
+ if (IsTileType(this->tile, MP_STATION)) StationAnimationTrigger(NULL, this->tile, STAT_ANIM_TRAIN_DEPARTS);
+
if (PlayVehicleSound(this, VSE_START)) return;
EngineID engtype = this->engine_type;
@@ -2638,6 +2641,8 @@ static void TrainEnterStation(Vehicle *v, StationID station)
}
v->BeginLoading();
+
+ StationAnimationTrigger(st, v->tile, STAT_ANIM_TRAIN_ARRIVES);
}
static byte AfterSetTrainPos(Vehicle *v, bool new_tile)