Merge remote-tracking branch 'tmj/master' into sim

This commit is contained in:
milek7
2020-10-18 23:35:14 +02:00
244 changed files with 54164 additions and 11636 deletions

View File

@@ -14,6 +14,7 @@ http://mozilla.org/MPL/2.0/.
#include "utilities.h"
#include "Console.h"
#include "Timer.h"
#include "Driver.h"
#include "DynObj.h"
#include "MOVER.h"
@@ -195,10 +196,22 @@ void TCamera::Update()
// attached movement position update
auto movement { Velocity * -2.0 };
movement.y = -movement.y;
if( m_owner->MoverParameters->ActiveCab < 0 ) {
auto const *owner { (
m_owner->Mechanik ?
m_owner->Mechanik :
m_owner->ctOwner ) };
if( ( owner )
&& ( owner->Occupied()->CabOccupied < 0 ) ) {
movement *= -1.f;
movement.y = -movement.y;
}
/*
if( ( m_owner->ctOwner )
&& ( m_owner->ctOwner->Vehicle()->DirectionGet() != m_owner->DirectionGet() ) ) {
movement *= -1.f;
movement.y = -movement.y;
}
*/
movement.RotateY( Angle.y );
m_owneroffset += movement * deltatime;