Starts the sound on the terrain
| 2862 | |
| 2863 | // Starts the sound on the terrain |
| 2864 | void StartTerrainSound() { |
| 2865 | // Set to be full on or full off |
| 2866 | if (OBJECT_OUTSIDE(Player_object)) |
| 2867 | Terrain_sound_fade = 1.0; |
| 2868 | else |
| 2869 | Terrain_sound_fade = Frametime / FADE_TIME; // will fade to zero first time |
| 2870 | |
| 2871 | // Start the sounds |
| 2872 | for (int b = 0; b < NUM_TERRAIN_SOUND_BANDS; b++) { |
| 2873 | terrain_sound_band *tb = &Terrain_sound_bands[b]; |
| 2874 | if (tb->sound_index != -1) { |
| 2875 | Terrain_sound_handles[b] = Sound_system.Play2dSound(tb->sound_index); |
| 2876 | } |
| 2877 | } |
| 2878 | |
| 2879 | // Set the volumes |
| 2880 | UpdateTerrainSound(); |
| 2881 | } |
| 2882 | |
| 2883 | // The main loop for D3. It renders, gets input, etc. for one frame |
| 2884 | extern bool Skip_render_game_frame; |
no test coverage detected