Changeset - r18270:7d0690dbcc1c
[Not reviewed]
master
0 2 0
michi_cc - 13 years ago 2011-11-04 22:59:23
michi_cc@openttd.org
(svn r23116) -Fix (r23114): Ambient sound effect callback was called for unsupported tile types.
2 files changed with 3 insertions and 4 deletions:
0 comments (0 inline, 0 general)
src/tree_cmd.cpp
Show inline comments
 
@@ -621,16 +621,15 @@ static void TileLoopTreesAlps(TileIndex 
 
static void TileLoop_Trees(TileIndex tile)
 
{
 
	if (GetTreeGround(tile) == TREE_GROUND_SHORE) {
 
		TileLoop_Water(tile); // Calls AmbientSoundEffectCallback
 
		TileLoop_Water(tile);
 
	} else {
 
		switch (_settings_game.game_creation.landscape) {
 
			case LT_TROPIC: TileLoopTreesDesert(tile); break;
 
			case LT_ARCTIC: TileLoopTreesAlps(tile);   break;
 
		}
 

	
 
		AmbientSoundEffectCallback(tile);
 
	}
 

	
 
	AmbientSoundEffectCallback(tile);
 
	TileLoopClearHelper(tile);
 

	
 
	uint treeCounter = GetTreeCounter(tile);
src/water_cmd.cpp
Show inline comments
 
@@ -1071,7 +1071,7 @@ static void DoDryUp(TileIndex tile)
 
 */
 
void TileLoop_Water(TileIndex tile)
 
{
 
	AmbientSoundEffectCallback(tile);
 
	if (IsTileType(tile, MP_WATER)) AmbientSoundEffectCallback(tile);
 

	
 
	switch (GetFloodingBehaviour(tile)) {
 
		case FLOOD_ACTIVE:
0 comments (0 inline, 0 general)