Changeset - r11198:aab0f5aa7fbc
[Not reviewed]
master
0 1 0
rubidium - 15 years ago 2009-02-22 00:30:36
rubidium@openttd.org
(svn r15551) -Fix [FS#2656]: [NoAI] crash when setting a depot order to the southern part of a ship depot
1 file changed with 10 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/depot.cpp
Show inline comments
 
@@ -7,6 +7,9 @@
 
#include "order_func.h"
 
#include "window_func.h"
 
#include "oldpool_func.h"
 
#include "core/bitmath_func.hpp"
 
#include "tile_map.h"
 
#include "water_map.h"
 

	
 
DEFINE_OLD_POOL_GENERIC(Depot, Depot)
 

	
 
@@ -17,6 +20,13 @@ DEFINE_OLD_POOL_GENERIC(Depot, Depot)
 
 */
 
Depot *GetDepotByTile(TileIndex tile)
 
{
 
	/* A ship depot is multiple tiles. The north most tile is
 
	 * always the ->xy tile, so make sure we always look for
 
	 * the nothern tile and not the southern one. */
 
	if (IsShipDepotTile(tile)) {
 
		tile = min(tile, GetOtherShipDepotTile(tile));
 
	}
 

	
 
	Depot *depot;
 

	
 
	FOR_ALL_DEPOTS(depot) {
0 comments (0 inline, 0 general)