mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-18 03:09:18 +02:00
combined rain sound support, soundproofing customization support, event diagnostics enhancement, power grid diagnostics enhancement, windowed full screen mode, ai coupling logic tweaks, minor bug fixes
This commit is contained in:
@@ -573,7 +573,8 @@ driver_mode::update_camera( double const Deltatime ) {
|
||||
// uwzględnienie ruchu wywołanego klawiszami
|
||||
if( false == DebugCameraFlag ) {
|
||||
// regular camera
|
||||
if( ( false == FreeFlyModeFlag )
|
||||
if( ( simulation::Train != nullptr )
|
||||
&& ( false == FreeFlyModeFlag )
|
||||
&& ( false == Global.CabWindowOpen ) ) {
|
||||
// if in cab potentially alter camera placement based on changes in train object
|
||||
Camera.m_owneroffset = simulation::Train->pMechOffset;
|
||||
@@ -583,12 +584,14 @@ driver_mode::update_camera( double const Deltatime ) {
|
||||
|
||||
Camera.Update();
|
||||
|
||||
if( false == FreeFlyModeFlag ) {
|
||||
if( ( simulation::Train != nullptr )
|
||||
&& ( false == FreeFlyModeFlag ) ) {
|
||||
// keep the camera within cab boundaries
|
||||
Camera.m_owneroffset = simulation::Train->clamp_inside( Camera.m_owneroffset );
|
||||
}
|
||||
|
||||
if( ( false == FreeFlyModeFlag )
|
||||
if( ( simulation::Train != nullptr )
|
||||
&& ( false == FreeFlyModeFlag )
|
||||
&& ( false == Global.CabWindowOpen ) ) {
|
||||
// cache cab camera in case of view type switch
|
||||
simulation::Train->pMechViewAngle = { Camera.Angle.x, Camera.Angle.y };
|
||||
|
||||
Reference in New Issue
Block a user