mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-02-04 17:50:30 +03:00
Added yaw locking to climbing navigation
This commit is contained in:
parent
1c6b0679f8
commit
ade8fe0d02
@ -450,6 +450,20 @@ AIMoveResult_t CAI_Motor::MoveClimbExecute( const Vector &climbDest, const Vecto
|
|||||||
// --------------------------------------------
|
// --------------------------------------------
|
||||||
SetIdealYawAndUpdate( yaw );
|
SetIdealYawAndUpdate( yaw );
|
||||||
|
|
||||||
|
#ifdef MAPBASE
|
||||||
|
// Lock the yaw if we're in position
|
||||||
|
if ( UTIL_AngleMod( yaw ) == UTIL_AngleMod( GetLocalAngles().y ) )
|
||||||
|
{
|
||||||
|
SetYawLocked( true );
|
||||||
|
}
|
||||||
|
else if ( IsYawLocked() )
|
||||||
|
{
|
||||||
|
// We're in a different position now. Unlock the yaw and update it
|
||||||
|
SetYawLocked( false );
|
||||||
|
UpdateYaw( -1 );
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return AIMR_OK;
|
return AIMR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -465,8 +479,7 @@ void CAI_Motor::MoveClimbStop()
|
|||||||
GetOuter()->SetDesiredWeaponState( DESIREDWEAPONSTATE_IGNORE );
|
GetOuter()->SetDesiredWeaponState( DESIREDWEAPONSTATE_IGNORE );
|
||||||
|
|
||||||
// Unlock yaw
|
// Unlock yaw
|
||||||
// TODO: Add yaw locking for when climbing is paused
|
SetYawLocked( false );
|
||||||
//SetYawLocked( false );
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
GetOuter()->RemoveFlag( FL_FLY );
|
GetOuter()->RemoveFlag( FL_FLY );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user