summaryrefslogtreecommitdiff
path: root/src/roadveh_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/roadveh_cmd.cpp')
-rw-r--r--src/roadveh_cmd.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp
index 1b98ef383..4a21b30aa 100644
--- a/src/roadveh_cmd.cpp
+++ b/src/roadveh_cmd.cpp
@@ -38,6 +38,7 @@
#include "variables.h"
#include "autoreplace_gui.h"
#include "gfx_func.h"
+#include "ai/ai.hpp"
#include "settings_type.h"
#include "order_func.h"
#include "depot_base.h"
@@ -617,6 +618,8 @@ static void RoadVehCrash(Vehicle *v)
InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, VVW_WIDGET_START_STOP_VEH);
+ AI::NewEvent(v->owner, new AIEventVehicleCrashed(v->index, v->tile));
+
SetDParam(0, pass);
AddNewsItem(
(pass == 1) ?
@@ -803,6 +806,7 @@ static void RoadVehArrivesAt(const Vehicle *v, Station *st)
v->index,
st->index
);
+ AI::NewEvent(v->owner, new AIEventStationFirstVehicle(st->index, v->index));
}
} else {
/* Check if station was ever visited before */
@@ -815,6 +819,7 @@ static void RoadVehArrivesAt(const Vehicle *v, Station *st)
v->index,
st->index
);
+ AI::NewEvent(v->owner, new AIEventStationFirstVehicle(st->index, v->index));
}
}
}