Changeset - r2709:60cdde9ed2af
[Not reviewed]
master
0 2 0
truelight - 19 years ago 2005-12-02 19:21:38
truelight@openttd.org
(svn r3253) -Add: add BuildRoad event for AIs
2 files changed with 4 insertions and 0 deletions:
0 comments (0 inline, 0 general)
ai/ai_event.h
Show inline comments
 
@@ -53,6 +53,8 @@ DEF_EVENTS int ottd_Event_VehicleEnterDe
 
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 */
road_cmd.c
Show inline comments
 
@@ -487,6 +487,8 @@ do_clear:;
 
		_m[tile].m5 |= pieces;
 

	
 
		MarkTileDirtyByTile(tile);
 

	
 
		ai_event(_current_player, ottd_Event_BuildRoad, tile, pieces);
 
	}
 
	return cost;
 
}
0 comments (0 inline, 0 general)