diff options
author | truebrain <truebrain@openttd.org> | 2011-12-19 20:59:36 +0000 |
---|---|---|
committer | truebrain <truebrain@openttd.org> | 2011-12-19 20:59:36 +0000 |
commit | 77b7366c2947a3f2545d5542021be1cc203a74e8 (patch) | |
tree | 5fac077be3e90460822aa50987f903fb8f86a7aa /src/roadveh_cmd.cpp | |
parent | e7cd301d3c9990b4ef9f0748789bb5e0318c0d24 (diff) | |
download | openttd-77b7366c2947a3f2545d5542021be1cc203a74e8.tar.xz |
(svn r23622) -Add: a set of events to trigger in a GameScript
Diffstat (limited to 'src/roadveh_cmd.cpp')
-rw-r--r-- | src/roadveh_cmd.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp index 8b364f3c9..e4b093bec 100644 --- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -27,6 +27,7 @@ #include "vehicle_func.h" #include "sound_func.h" #include "ai/ai.hpp" +#include "game/game.hpp" #include "depot_map.h" #include "effectvehicle_func.h" #include "roadstop_base.h" @@ -521,6 +522,7 @@ static void RoadVehCrash(RoadVehicle *v) uint pass = v->Crash(); AI::NewEvent(v->owner, new ScriptEventVehicleCrashed(v->index, v->tile, ScriptEventVehicleCrashed::CRASH_RV_LEVEL_CROSSING)); + Game::NewEvent(new ScriptEventVehicleCrashed(v->index, v->tile, ScriptEventVehicleCrashed::CRASH_RV_LEVEL_CROSSING)); SetDParam(0, pass); AddVehicleNewsItem( @@ -669,6 +671,7 @@ static void RoadVehArrivesAt(const RoadVehicle *v, Station *st) st->index ); AI::NewEvent(v->owner, new ScriptEventStationFirstVehicle(st->index, v->index)); + Game::NewEvent(new ScriptEventStationFirstVehicle(st->index, v->index)); } } else { /* Check if station was ever visited before */ @@ -682,6 +685,7 @@ static void RoadVehArrivesAt(const RoadVehicle *v, Station *st) st->index ); AI::NewEvent(v->owner, new ScriptEventStationFirstVehicle(st->index, v->index)); + Game::NewEvent(new ScriptEventStationFirstVehicle(st->index, v->index)); } } } |