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

Merge branch 'milek-dev' into gfx-work

This commit is contained in:
milek7
2019-09-07 02:40:38 +02:00
27 changed files with 2315 additions and 626 deletions

View File

@@ -127,7 +127,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 ) {
@@ -142,14 +143,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 };
}