summaryrefslogtreecommitdiff
path: root/src/water_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/water_cmd.cpp
parente7cd301d3c9990b4ef9f0748789bb5e0318c0d24 (diff)
downloadopenttd-77b7366c2947a3f2545d5542021be1cc203a74e8.tar.xz
(svn r23622) -Add: a set of events to trigger in a GameScript
Diffstat (limited to 'src/water_cmd.cpp')
-rw-r--r--src/water_cmd.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp
index a62ae7040..19d43de03 100644
--- a/src/water_cmd.cpp
+++ b/src/water_cmd.cpp
@@ -32,6 +32,7 @@
#include "tunnelbridge_map.h"
#include "station_base.h"
#include "ai/ai.hpp"
+#include "game/game.hpp"
#include "core/random_func.hpp"
#include "core/backup_type.hpp"
#include "date_func.h"
@@ -910,6 +911,7 @@ static void FloodVehicle(Vehicle *v)
uint pass = v->Crash(true);
AI::NewEvent(v->owner, new ScriptEventVehicleCrashed(v->index, v->tile, ScriptEventVehicleCrashed::CRASH_FLOODED));
+ Game::NewEvent(new ScriptEventVehicleCrashed(v->index, v->tile, ScriptEventVehicleCrashed::CRASH_FLOODED));
SetDParam(0, pass);
AddVehicleNewsItem(STR_NEWS_DISASTER_FLOOD_VEHICLE, NS_ACCIDENT, v->index);
CreateEffectVehicleRel(v, 4, 4, 8, EV_EXPLOSION_LARGE);