[saco] Match CLocalPlayer::SelectNextClass; the class step plays sound 1052/1053 through CAudio at pGame+0

This commit is contained in:
ricardoofnl
2026-09-04 22:19:16 +07:00
parent a9f1f78a02
commit 6452edd2f1
2 changed files with 46 additions and 1 deletions
+43
View File
@@ -185,3 +185,46 @@ void CLocalPlayer::SendStatsUpdate()
bsSend.Write(iDrunkLevel);
pNetGame->GetRakClient()->Send(&bsSend, HIGH_PRIORITY, UNRELIABLE, 0);
}
//----------------------------------------------------
// class selection cycles field_2FE and re-requests on every step
void CLocalPlayer::SelectNextClass()
{
if(!field_306)
return;
MATRIX4X4 mat;
field_143 = 0;
m_pPlayerPed->GetMatrix(&mat);
if(field_2FE == pNetGame->GetSettings()->field_23 - 1)
field_2FE = 0;
else
field_2FE++;
pGame->m_pGameAudio->PlaySound(1052, mat.pos.X, mat.pos.Y, mat.pos.Z);
RequestClass(field_2FE);
}
//----------------------------------------------------
void CLocalPlayer::SelectPreviousClass()
{
if(!field_306)
return;
MATRIX4X4 mat;
field_143 = 0;
m_pPlayerPed->GetMatrix(&mat);
DWORD dwClass = field_2FE;
if(!dwClass)
dwClass = pNetGame->GetSettings()->field_23;
field_2FE = dwClass - 1;
pGame->m_pGameAudio->PlaySound(1053, mat.pos.X, mat.pos.Y, mat.pos.Z);
RequestClass(field_2FE);
}
+3 -1
View File
@@ -54,7 +54,7 @@ public:
DWORD field_13B;
DWORD field_13F;
BYTE _pad143[4];
DWORD field_143;
DWORD field_147;
@@ -118,6 +118,8 @@ public:
BOOL IsInRCMode() { return m_bInRCMode; };
void SelectNextClass(); // .text:10005FF0
void SelectPreviousClass(); // .text:10006080
void RequestClass(int iClass); // .text:100058D0
void SendStatsUpdate(); // .text:10005D00
void FUNC_10005BF0(WORD a1); // .text:10005BF0