summaryrefslogtreecommitdiff
path: root/src/train_cmd.cpp
diff options
context:
space:
mode:
authortruebrain <truebrain@openttd.org>2011-12-19 20:59:36 +0000
committertruebrain <truebrain@openttd.org>2011-12-19 20:59:36 +0000
commit77b7366c2947a3f2545d5542021be1cc203a74e8 (patch)
tree5fac077be3e90460822aa50987f903fb8f86a7aa /src/train_cmd.cpp
parente7cd301d3c9990b4ef9f0748789bb5e0318c0d24 (diff)
downloadopenttd-77b7366c2947a3f2545d5542021be1cc203a74e8.tar.xz
(svn r23622) -Add: a set of events to trigger in a GameScript
Diffstat (limited to 'src/train_cmd.cpp')
-rw-r--r--src/train_cmd.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp
index f5a07f20e..44e8d9efe 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -27,6 +27,7 @@
#include "vehicle_func.h"
#include "sound_func.h"
#include "ai/ai.hpp"
+#include "game/game.hpp"
#include "newgrf_station.h"
#include "effectvehicle_func.h"
#include "gamelog.h"
@@ -2714,6 +2715,7 @@ static void TrainEnterStation(Train *v, StationID station)
st->index
);
AI::NewEvent(v->owner, new ScriptEventStationFirstVehicle(st->index, v->index));
+ Game::NewEvent(new ScriptEventStationFirstVehicle(st->index, v->index));
}
v->force_proceed = TFP_NONE;
@@ -2840,6 +2842,7 @@ static uint TrainCrashed(Train *v)
if (!(v->vehstatus & VS_CRASHED)) {
num = v->Crash();
AI::NewEvent(v->owner, new ScriptEventVehicleCrashed(v->index, v->tile, ScriptEventVehicleCrashed::CRASH_TRAIN));
+ Game::NewEvent(new ScriptEventVehicleCrashed(v->index, v->tile, ScriptEventVehicleCrashed::CRASH_TRAIN));
}
/* Try to re-reserve track under already crashed train too.