1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-27 16:39:09 +00:00

(svn r23114) -Feature: [NewGRF] Ambient sound effect callback.

This commit is contained in:
michi_cc
2011-11-04 21:05:08 +00:00
parent a471a20491
commit 707b0f48e6
7 changed files with 55 additions and 6 deletions

View File

@@ -27,6 +27,7 @@
#include "landscape_type.h"
#include "company_base.h"
#include "core/random_func.hpp"
#include "newgrf_generic.h"
#include "table/strings.h"
#include "table/sprites.h"
@@ -620,12 +621,14 @@ static void TileLoopTreesAlps(TileIndex tile)
static void TileLoop_Trees(TileIndex tile)
{
if (GetTreeGround(tile) == TREE_GROUND_SHORE) {
TileLoop_Water(tile);
TileLoop_Water(tile); // Calls AmbientSoundEffectCallback
} else {
switch (_settings_game.game_creation.landscape) {
case LT_TROPIC: TileLoopTreesDesert(tile); break;
case LT_ARCTIC: TileLoopTreesAlps(tile); break;
}
AmbientSoundEffectCallback(tile);
}
TileLoopClearHelper(tile);