16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-19 04:19:19 +02:00
This commit is contained in:
milek7
2017-10-31 20:25:17 +01:00
parent c62fca8b5a
commit 6d9e718a95
4 changed files with 8 additions and 7 deletions

View File

@@ -846,7 +846,12 @@ state_manager::deserialize_sound( cParser &Input, scene::scratch_data &Scratchpa
auto const soundname { Input.getToken<std::string>() };
auto *sound = sound_man->create_text_sound(soundname);
sound->position((glm::vec3)location).dist(Nodedata.range_max);
sound->position((glm::vec3)location);
if (Nodedata.range_max != -1.0)
sound->dist(Nodedata.range_max);
else
sound->set_mode(sound::global);
skip_until( Input, "endsound" );
return sound;