1
0
Fork 0

(svn r23116) -Fix (r23114): Ambient sound effect callback was called for unsupported tile types.

release/1.2
michi_cc 2011-11-04 22:59:23 +00:00
parent c8857d4679
commit 3e016e4254
2 changed files with 3 additions and 4 deletions

View File

@ -621,16 +621,15 @@ static void TileLoopTreesAlps(TileIndex tile)
static void TileLoop_Trees(TileIndex tile) static void TileLoop_Trees(TileIndex tile)
{ {
if (GetTreeGround(tile) == TREE_GROUND_SHORE) { if (GetTreeGround(tile) == TREE_GROUND_SHORE) {
TileLoop_Water(tile); // Calls AmbientSoundEffectCallback TileLoop_Water(tile);
} else { } else {
switch (_settings_game.game_creation.landscape) { switch (_settings_game.game_creation.landscape) {
case LT_TROPIC: TileLoopTreesDesert(tile); break; case LT_TROPIC: TileLoopTreesDesert(tile); break;
case LT_ARCTIC: TileLoopTreesAlps(tile); break; case LT_ARCTIC: TileLoopTreesAlps(tile); break;
} }
AmbientSoundEffectCallback(tile);
} }
AmbientSoundEffectCallback(tile);
TileLoopClearHelper(tile); TileLoopClearHelper(tile);
uint treeCounter = GetTreeCounter(tile); uint treeCounter = GetTreeCounter(tile);

View File

@ -1071,7 +1071,7 @@ static void DoDryUp(TileIndex tile)
*/ */
void TileLoop_Water(TileIndex tile) void TileLoop_Water(TileIndex tile)
{ {
AmbientSoundEffectCallback(tile); if (IsTileType(tile, MP_WATER)) AmbientSoundEffectCallback(tile);
switch (GetFloodingBehaviour(tile)) { switch (GetFloodingBehaviour(tile)) {
case FLOOD_ACTIVE: case FLOOD_ACTIVE: