--- a/src/train_cmd.cpp Fri Apr 18 21:20:03 2008 +0000
+++ b/src/train_cmd.cpp Sun Apr 20 15:27:28 2008 +0000
@@ -48,6 +48,8 @@
#include "gfx_func.h"
#include "settings_type.h"
#include "order_func.h"
+#include "newgrf_station.h"
+#include "effectvehicle_func.h"
#include "table/strings.h"
#include "table/train_cmd.h"
@@ -2218,6 +2220,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 +2642,8 @@
}
v->BeginLoading();
+
+ StationAnimationTrigger(st, v->tile, STAT_ANIM_TRAIN_ARRIVES);
}
static byte AfterSetTrainPos(Vehicle *v, bool new_tile)
@@ -3232,7 +3238,7 @@
if (!(v->vehstatus & VS_HIDDEN)) {
Vehicle *u = CreateEffectVehicleRel(v, 4, 4, 5, EV_BREAKDOWN_SMOKE);
- if (u != NULL) u->u.special.animation_state = v->breakdown_delay * 2;
+ if (u != NULL) u->u.effect.animation_state = v->breakdown_delay * 2;
}
}
@@ -3421,7 +3427,7 @@
HandleBrokenTrain(v);
return;
}
- v->breakdown_ctr--;
+ if (!v->current_order.IsType(OT_LOADING)) v->breakdown_ctr--;
}
if (HasBit(v->u.rail.flags, VRF_REVERSING) && v->cur_speed == 0) {