Skip to content

Commit 0ec204b

Browse files
authored
Predict weapon crosshair (ddnet#11671)
2 parents 43c76b7 + 3d33e4e commit 0ec204b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/game/client/components/hud.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ void CHud::RenderCursor()
615615
if(Client()->State() != IClient::STATE_DEMOPLAYBACK && GameClient()->m_Snap.m_pLocalCharacter)
616616
{
617617
// Render local cursor
618-
CurWeapon = maximum(0, GameClient()->m_Snap.m_pLocalCharacter->m_Weapon % NUM_WEAPONS);
618+
CurWeapon = maximum(0, GameClient()->m_aClients[GameClient()->m_Snap.m_LocalClientId].m_Predicted.m_ActiveWeapon);
619619
TargetPos = GameClient()->m_Controls.m_aTargetPos[g_Config.m_ClDummy];
620620
}
621621
else

0 commit comments

Comments
 (0)