Skip to content

Commit f29e29a

Browse files
committed
Use proper camera mode for vehicle targets
Fixes #5306 and #7594.
1 parent f3bdd9c commit f29e29a

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

Client/mods/deathmatch/logic/CClientCamera.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,17 +82,17 @@ void CClientCamera::DoPulse ( void )
8282
{
8383
if ( !pVehicle )
8484
{
85-
SetFocus ( m_pFocusedPlayer, MODE_BEHINDCAR );
85+
SetFocus ( m_pFocusedPlayer, MODE_CAM_ON_A_STRING );
8686
}
8787
}
8888
else if ( pVehicle )
8989
{
90-
SetFocus ( m_pFocusedPlayer, MODE_BEHINDCAR );
90+
SetFocus ( m_pFocusedPlayer, MODE_CAM_ON_A_STRING );
9191
}
9292
}
9393
else
9494
{
95-
SetFocus ( m_pFocusedPlayer, MODE_BEHINDCAR );
95+
SetFocus ( m_pFocusedPlayer, MODE_CAM_ON_A_STRING );
9696
}
9797
}
9898

@@ -357,8 +357,7 @@ void CClientCamera::SetFocus ( CClientEntity* pEntity, eCamMode eMode, bool bSmo
357357
}
358358

359359
// Hacky, used to follow peds
360-
//if ( eMode == MODE_CAM_ON_A_STRING && eType == CCLIENTPLAYERMODEL )
361-
if ( eMode == MODE_BEHINDCAR && ( eType == CCLIENTPED || eType == CCLIENTPLAYER ) )
360+
if ( eMode == MODE_CAM_ON_A_STRING && ( eType == CCLIENTPED || eType == CCLIENTPLAYER ) )
362361
eMode = MODE_FOLLOWPED;
363362

364363
// Do it
@@ -503,7 +502,7 @@ void CClientCamera::RestoreEntity ( CClientEntity* pEntity )
503502
{
504503
if ( m_pFocusedEntity && m_pFocusedEntity == pEntity )
505504
{
506-
SetFocus ( pEntity, MODE_BEHINDCAR );
505+
SetFocus ( pEntity, MODE_CAM_ON_A_STRING );
507506
m_bInvalidated = false;
508507
}
509508
}

Client/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4630,7 +4630,7 @@ bool CStaticFunctionDefinitions::SetCameraTarget ( CClientEntity * pEntity )
46304630
// TODO: stream in the player here (needs to be done through the streamer)
46314631

46324632
// Put the focus on that player
4633-
m_pCamera->SetFocus ( pPlayer, MODE_BEHINDCAR, false );
4633+
m_pCamera->SetFocus ( pPlayer, MODE_CAM_ON_A_STRING, false );
46344634
}
46354635
break;
46364636
}

Client/mods/deathmatch/logic/rpc/CCameraRPCs.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ void CCameraRPCs::SetCameraTarget ( NetBitStreamInterface& bitStream )
8686
else
8787
{
8888
// Put the focus on that player
89-
m_pCamera->SetFocus ( pPlayer, MODE_BEHINDCAR, false );
89+
m_pCamera->SetFocus ( pPlayer, MODE_CAM_ON_A_STRING, false );
9090
}
9191
break;
9292
}

0 commit comments

Comments
 (0)