diff src/train_cmd.cpp @ 9003:ac23e012c9d7 draft

(svn r12798) -Feature: Add some support for NewGRF station animation. (Thanks to mart3p for samples and fixes)
author peter1138 <peter1138@openttd.org>
date Sat, 19 Apr 2008 23:19:12 +0000 (2008-04-19)
parents 75ae4890d738
children bc4efc6bfe0d
line wrap: on
line diff
--- 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 @@
 		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 @@
 	}
 
 	v->BeginLoading();
+
+	StationAnimationTrigger(st, v->tile, STAT_ANIM_TRAIN_ARRIVES);
 }
 
 static byte AfterSetTrainPos(Vehicle *v, bool new_tile)