Fix another batch of -Wmaybe-uninitialized warnings

And simplify code in CSGShape.
This commit is contained in:
Rémi Verschelde
2020-03-27 16:04:01 +01:00
parent b383484e44
commit f097511b96
3 changed files with 8 additions and 11 deletions

View File

@ -29,6 +29,7 @@
/*************************************************************************/
#include "audio_stream_player_3d.h"
#include "core/engine.h"
#include "scene/3d/area_3d.h"
#include "scene/3d/camera_3d.h"
@ -96,7 +97,7 @@ static const Vector3 speaker_directions[7] = {
};
void AudioStreamPlayer3D::_calc_output_vol(const Vector3 &source_dir, real_t tightness, AudioStreamPlayer3D::Output &output) {
unsigned int speaker_count; // only main speakers (no LFE)
unsigned int speaker_count = 0; // only main speakers (no LFE)
switch (AudioServer::get_singleton()->get_speaker_mode()) {
case AudioServer::SPEAKER_MODE_STEREO:
speaker_count = 2;