diff options
author | truelight <truelight@openttd.org> | 2005-12-02 19:21:38 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2005-12-02 19:21:38 +0000 |
commit | 214ed794a1ae2099147383cba86febabd81d3868 (patch) | |
tree | d8166d84c5a472b91de66aad640fc155fd694946 | |
parent | 7460ecd42a56c96277e7566cbe3750d890b2dded (diff) | |
download | openttd-214ed794a1ae2099147383cba86febabd81d3868.tar.xz |
(svn r3253) -Add: add BuildRoad event for AIs
-rw-r--r-- | ai/ai_event.h | 2 | ||||
-rw-r--r-- | road_cmd.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/ai/ai_event.h b/ai/ai_event.h index 1f49f338b..006f7b740 100644 --- a/ai/ai_event.h +++ b/ai/ai_event.h @@ -53,6 +53,8 @@ DEF_EVENTS int ottd_Event_VehicleEnterDepot INITIAL_SET; // (vehicle_index, DEF_EVENTS int ottd_Event_RoadVehicleEnterDepot INITIAL_SET; // (vehicle_index, depot_tile) DEF_EVENTS int ottd_Event_GiveOrder INITIAL_SET; // (vehicle_index) + +DEF_EVENTS int ottd_Event_BuildRoad INITIAL_SET; // (road_tile, road_pieces) /* ----------------- End of list ------------------ */ #endif /* AI_EVENT */ diff --git a/road_cmd.c b/road_cmd.c index 4592bd7a0..7a0baae69 100644 --- a/road_cmd.c +++ b/road_cmd.c @@ -487,6 +487,8 @@ do_clear:; _m[tile].m5 |= pieces; MarkTileDirtyByTile(tile); + + ai_event(_current_player, ottd_Event_BuildRoad, tile, pieces); } return cost; } |