mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r320) -Fix: some last _current_player fixes
This commit is contained in:
parent
75a54521e8
commit
3dc8dcf312
|
@ -999,6 +999,7 @@ static void ChopLumberMillTrees(Industry *i)
|
||||||
do {
|
do {
|
||||||
tile = TILE_MASK(tile);
|
tile = TILE_MASK(tile);
|
||||||
if (IS_TILETYPE(tile, MP_TREES)) {
|
if (IS_TILETYPE(tile, MP_TREES)) {
|
||||||
|
uint old_player = _current_player;
|
||||||
/* found a tree */
|
/* found a tree */
|
||||||
|
|
||||||
_current_player = OWNER_NONE;
|
_current_player = OWNER_NONE;
|
||||||
|
@ -1010,6 +1011,8 @@ static void ChopLumberMillTrees(Industry *i)
|
||||||
SetMapExtraBits(tile, 0);
|
SetMapExtraBits(tile, 0);
|
||||||
|
|
||||||
i->cargo_waiting[0] = min(0xffff, i->cargo_waiting[0] + 45);
|
i->cargo_waiting[0] = min(0xffff, i->cargo_waiting[0] + 45);
|
||||||
|
|
||||||
|
_current_player = old_player;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
tile += _chop_dir[dir];
|
tile += _chop_dir[dir];
|
||||||
|
|
|
@ -250,6 +250,8 @@ static void TileLoop_Town(uint tile)
|
||||||
if ( (byte) (r >> 8) >= 12) {
|
if ( (byte) (r >> 8) >= 12) {
|
||||||
DoBuildTownHouse(t, tile);
|
DoBuildTownHouse(t, tile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_current_player = OWNER_NONE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -583,6 +583,9 @@ void TileLoop_Water(uint tile)
|
||||||
for(i=0; i!=4; i++)
|
for(i=0; i!=4; i++)
|
||||||
TileLoopWaterHelper(tile, _tile_loop_offs_array[i]);
|
TileLoopWaterHelper(tile, _tile_loop_offs_array[i]);
|
||||||
}
|
}
|
||||||
|
// _current_player can be changed by TileLoopWaterHelper.. reset it back
|
||||||
|
// here
|
||||||
|
_current_player = OWNER_NONE;
|
||||||
|
|
||||||
// edges
|
// edges
|
||||||
if ( GET_TILE_X(tile)==0 && IS_INT_INSIDE(GET_TILE_Y(tile),1,TILES_Y-3+1)) //NE
|
if ( GET_TILE_X(tile)==0 && IS_INT_INSIDE(GET_TILE_Y(tile),1,TILES_Y-3+1)) //NE
|
||||||
|
|
Loading…
Reference in New Issue