(svn r3232) -Add: implemented the event-system for AIs

-Add: added several hooks (event-callbacks) for road-related-stuff
This commit is contained in:
truelight
2005-11-23 15:08:29 +00:00
parent b8f8f3869d
commit 8733f49e88
6 changed files with 81 additions and 0 deletions

View File

@@ -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;