roadveh_cmd.c
changeset 2690 5a4ed6db4493
parent 2671 2c2edd17e9cc
child 2753 b25bd313785e
--- a/roadveh_cmd.c	Wed Nov 23 13:45:12 2005 +0000
+++ b/roadveh_cmd.c	Wed Nov 23 15:08:29 2005 +0000
@@ -18,6 +18,7 @@
 #include "sound.h"
 #include "depot.h"
 #include "vehicle_gui.h"
+#include "ai/ai_event.h"
 
 void ShowRoadVehViewWindow(Vehicle *v);
 
@@ -195,6 +196,9 @@
 		InvalidateWindow(WC_COMPANY, v->owner);
 		if (IsLocalPlayer())
 			InvalidateWindow(WC_REPLACE_VEHICLE, VEH_Road); // updates the replace Road window
+
+		ai_event(_current_player, ottd_Event_BuildVehicle, v->index, tile);
+		ai_event(_current_player, ottd_Event_BuildRoadVehicle, v->index, tile);
 	}
 
 	return cost;