16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-21 14:49:19 +02:00

Remove not needed casts, variables and switch from double precission to float precission for some angle vectors

This commit is contained in:
docentYT
2026-04-28 00:51:17 +02:00
parent cba106e22e
commit 623c4f827e
15 changed files with 44 additions and 49 deletions

View File

@@ -363,7 +363,7 @@ sound_source::play( int const Flags ) {
if( m_range != -1 ) {
auto const cutoffrange { std::abs( m_range * 5 ) };
if( glm::length2( location() - glm::dvec3 { Global.pCamera.Pos } ) > std::min( 2750.f * 2750.f, cutoffrange * cutoffrange ) ) {
if( glm::length2( location() - Global.pCamera.Pos ) > std::min( 2750.f * 2750.f, cutoffrange * cutoffrange ) ) {
// while we drop sounds from beyond sensible and/or audible range
// we act as if it was activated normally, meaning no need to include the opening bookend in subsequent calls
m_playbeginning = false;