mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 14:37:29 +08:00
[saco] Match CHud__DrawCrossHairs_Hook()
* Match `CPlayerPed::GetCameraMode()`
This commit is contained in:
parent
a968ac7f1a
commit
f4fb51bb08
@ -137,7 +137,6 @@ NUDE CHud__DrawRadar_Hook()
|
||||
}
|
||||
|
||||
bool bSomeFlag = false;
|
||||
BYTE bytePlayerNumber = 0;
|
||||
NUDE CHud__DrawCrossHairs_Hook()
|
||||
{
|
||||
__asm pushad
|
||||
@ -145,9 +144,7 @@ NUDE CHud__DrawCrossHairs_Hook()
|
||||
bSomeFlag = false;
|
||||
if ( pGame && pGame->FindPlayerPed() )
|
||||
{
|
||||
bytePlayerNumber = pGame->FindPlayerPed()->m_bytePlayerNumber;
|
||||
byteSavedCameraMode = bytePlayerNumber ? GameGetPlayerCameraMode(bytePlayerNumber) : GameGetLocalPlayerCameraMode();
|
||||
if ( byteSavedCameraMode == 53 )
|
||||
if ( pGame->FindPlayerPed()->GetCameraMode() == 53 )
|
||||
{
|
||||
ProcessHudScaleFix();
|
||||
bSomeFlag = true;
|
||||
@ -167,15 +164,7 @@ NUDE CHud__DrawCrossHairs_Hook()
|
||||
|
||||
if (bSomeFlag)
|
||||
{
|
||||
if (bHudScaleFix)
|
||||
{
|
||||
*(DWORD*)0x859520 = dwHudScaleX;
|
||||
*(DWORD*)0x859524 = dwHudScaleY;
|
||||
*CRadar__radarHeight = 76.0;
|
||||
*CRadar__radarWidth = 94.0;
|
||||
bHudScaleFix = 0;
|
||||
bHudScaleFix = false;
|
||||
}
|
||||
FUNC_100A24C0();
|
||||
bSomeFlag = false;
|
||||
}
|
||||
|
||||
|
@ -24,6 +24,13 @@ public:
|
||||
CAMERA_AIM * GetCurrentAim();
|
||||
void SetCurrentAim(CAMERA_AIM *pAim);
|
||||
|
||||
BYTE GetCameraMode() {
|
||||
if(!m_bytePlayerNumber)
|
||||
return GameGetLocalPlayerCameraMode();
|
||||
else
|
||||
return GameGetPlayerCameraMode(m_bytePlayerNumber);
|
||||
};
|
||||
|
||||
void HideMarker();
|
||||
BYTE GetCurrentWeapon();
|
||||
int GetCurrentVehicleID();
|
||||
|
Loading…
Reference in New Issue
Block a user