summaryrefslogtreecommitdiff
path: root/order_cmd.c
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2005-11-23 15:08:29 +0000
committertruelight <truelight@openttd.org>2005-11-23 15:08:29 +0000
commit8733f49e883249117580bb8457266cde858f6bac (patch)
tree39b2634d00d2ef0c50327795368bd790f4a2d3af /order_cmd.c
parentb8f8f3869d3e16aa914133c3ba2c4a66a94068bc (diff)
downloadopenttd-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 'order_cmd.c')
-rw-r--r--order_cmd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/order_cmd.c b/order_cmd.c
index 64c7878e0..ae32c4184 100644
--- a/order_cmd.c
+++ b/order_cmd.c
@@ -15,6 +15,7 @@
#include "news.h"
#include "saveload.h"
#include "vehicle_gui.h"
+#include "ai/ai_event.h"
enum {
/* Max orders: 64000 (64 * 1000) */
@@ -393,6 +394,8 @@ int32 CmdInsertOrder(int x, int y, uint32 flags, uint32 p1, uint32 p2)
/* Make sure to rebuild the whole list */
RebuildVehicleLists();
+
+ ai_event(_current_player, ottd_Event_GiveOrder, v->index);
}
return 0;