Skip to content

Commit

Permalink
Addendum to 02b1421 (Fix setCameraTarget calculation)
Browse files Browse the repository at this point in the history
Fix warning
  • Loading branch information
jushar committed Jul 29, 2016
1 parent e09c652 commit d4de1a2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions MTA10/mods/shared_logic/CClientCamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,11 +285,12 @@ void CClientCamera::SetOrbitTarget ( const CVector& vecPosition )
{
CClientEntity* pCameraTarget = GetTargetEntity ( );

if ( pCameraTarget != NULL ){
if ( pCameraTarget != nullptr )
{
CVector vecTargetPosition;
pCameraTarget->GetPosition ( vecTargetPosition );
if ( pCameraTarget->GetType ( ) == CCLIENTPLAYER )
vecTargetPosition.fZ += 0.6;
if ( pCameraTarget->GetType () == CCLIENTPLAYER )
vecTargetPosition.fZ += 0.6f;

CVector vecDirection = vecPosition - vecTargetPosition;
vecDirection.Normalize ();
Expand Down

0 comments on commit d4de1a2

Please sign in to comment.