diff options
author | truelight <truelight@openttd.org> | 2005-11-23 15:08:29 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2005-11-23 15:08:29 +0000 |
commit | 8733f49e883249117580bb8457266cde858f6bac (patch) | |
tree | 39b2634d00d2ef0c50327795368bd790f4a2d3af /roadveh_cmd.c | |
parent | b8f8f3869d3e16aa914133c3ba2c4a66a94068bc (diff) | |
download | openttd-8733f49e883249117580bb8457266cde858f6bac.tar.xz |
(svn r3232) -Add: implemented the event-system for AIs
-Add: added several hooks (event-callbacks) for road-related-stuff
Diffstat (limited to 'roadveh_cmd.c')
-rw-r--r-- | roadveh_cmd.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/roadveh_cmd.c b/roadveh_cmd.c index 87b52cfa5..0a78127be 100644 --- a/roadveh_cmd.c +++ b/roadveh_cmd.c @@ -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 @@ int32 CmdBuildRoadVeh(int x, int y, uint32 flags, uint32 p1, uint32 p2) 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; |