diff --git a/MdlMngr.cpp b/MdlMngr.cpp index f71b2921..52b47acb 100644 --- a/MdlMngr.cpp +++ b/MdlMngr.cpp @@ -37,7 +37,7 @@ TMdlContainer::LoadModel(std::string const &Name, bool const Dynamic) { } }; -TModelsManager::modelcontainer_sequence TModelsManager::m_models { 1, {} }; +TModelsManager::modelcontainer_sequence TModelsManager::m_models { 1, TMdlContainer() }; TModelsManager::stringmodelcontainerindex_map TModelsManager::m_modelsmap; // wczytanie modelu do tablicy diff --git a/Names.h b/Names.h index 9c6652ab..4f0f1089 100644 --- a/Names.h +++ b/Names.h @@ -35,7 +35,7 @@ public: if( true == mapping.second ) { return true; } - // cell with this name already exists; update mapping to point to the new one, for backward compatibility + // item with this name already exists; update mapping to point to the new one, for backward compatibility mapping.first->second = itemhandle; return false; } // locates item with specified name. returns pointer to the item, or nullptr diff --git a/audiorenderer.cpp b/audiorenderer.cpp index c9689fbf..5f9ed856 100644 --- a/audiorenderer.cpp +++ b/audiorenderer.cpp @@ -169,7 +169,7 @@ openal_source::sync_with( sound_properties const &State ) { || ( false == is_in_range ) ) { // if the emitter is outside of its nominal hearing range or was outside of it during last check // adjust the volume to a suitable fraction of nominal value - auto const fadedistance { sound_range * 0.75 }; + auto const fadedistance { sound_range * 0.75f }; auto const rangefactor { interpolate( 1.f, 0.f, diff --git a/particles.h b/particles.h index 63214c3d..cb1d6785 100644 --- a/particles.h +++ b/particles.h @@ -51,7 +51,7 @@ public: void bind( Type_ const *Modifier ) { m_valuechangemodifier = Modifier; } - Type_ const & + Type_ value_change() const { return ( m_valuechangemodifier == nullptr ? diff --git a/precipitation.cpp b/precipitation.cpp index 43feb56d..c01cad5c 100644 --- a/precipitation.cpp +++ b/precipitation.cpp @@ -123,7 +123,8 @@ basic_precipitation::update() { m_camerapos = Global.pCamera.Pos; - // intercept sudden user-induced camera jumps + // intercept sudden user-induced camera jumps... + // ...from free fly mode change if( m_freeflymode != FreeFlyModeFlag ) { m_freeflymode = FreeFlyModeFlag; if( true == m_freeflymode ) { @@ -138,14 +139,17 @@ basic_precipitation::update() { } cameramove = glm::dvec3{ 0.0 }; } + // ...from jump between cab and window/mirror view if( m_windowopen != Global.CabWindowOpen ) { m_windowopen = Global.CabWindowOpen; cameramove = glm::dvec3{ 0.0 }; } + // ... from cab change if( ( simulation::Train != nullptr ) && ( simulation::Train->iCabn != m_activecab ) ) { m_activecab = simulation::Train->iCabn; cameramove = glm::dvec3{ 0.0 }; } + // ... from camera jump to another location if( glm::length( cameramove ) > 100.0 ) { cameramove = glm::dvec3{ 0.0 }; } diff --git a/stdafx.h b/stdafx.h index 57bdfa9b..b484fd2d 100644 --- a/stdafx.h +++ b/stdafx.h @@ -29,12 +29,12 @@ #include #endif // stl +#define _USE_MATH_DEFINES +#include #include #include #include #include -#define _USE_MATH_DEFINES -#include #include #include #include