[saco] Match CPlayerPed::StopGoggles; retail writes the HasGoggles test out inline

This commit is contained in:
ricardoofnl
2026-09-03 00:14:11 +07:00
parent eec72291c4
commit 4e2dd5ffc5
+9 -6
View File
@@ -1070,13 +1070,16 @@ void CPlayerPed::StartGoggles()
void CPlayerPed::StopGoggles()
{
if (!m_pPed || !HasGoggles()) return;
if (!m_pPed) return;
m_bGoggleState = FALSE;
DWORD dwPedPointer = (DWORD)m_pPed;
_asm mov ecx, dwPedPointer
_asm mov eax, 0x5E6010
_asm call eax
// retail writes the HasGoggles test out inline
if (m_pPed->dwActiveVision != 0 || m_bGoggleState) {
m_bGoggleState = FALSE;
DWORD dwPedPointer = (DWORD)m_pPed;
_asm mov ecx, dwPedPointer
_asm mov eax, 0x5E6010
_asm call eax
}
}
//-----------------------------------------------------------