mirror of
https://github.com/dashr9230/SA-MP.git
synced 2025-01-04 00:23:22 +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;
|
bool bSomeFlag = false;
|
||||||
BYTE bytePlayerNumber = 0;
|
|
||||||
NUDE CHud__DrawCrossHairs_Hook()
|
NUDE CHud__DrawCrossHairs_Hook()
|
||||||
{
|
{
|
||||||
__asm pushad
|
__asm pushad
|
||||||
@ -145,9 +144,7 @@ NUDE CHud__DrawCrossHairs_Hook()
|
|||||||
bSomeFlag = false;
|
bSomeFlag = false;
|
||||||
if ( pGame && pGame->FindPlayerPed() )
|
if ( pGame && pGame->FindPlayerPed() )
|
||||||
{
|
{
|
||||||
bytePlayerNumber = pGame->FindPlayerPed()->m_bytePlayerNumber;
|
if ( pGame->FindPlayerPed()->GetCameraMode() == 53 )
|
||||||
byteSavedCameraMode = bytePlayerNumber ? GameGetPlayerCameraMode(bytePlayerNumber) : GameGetLocalPlayerCameraMode();
|
|
||||||
if ( byteSavedCameraMode == 53 )
|
|
||||||
{
|
{
|
||||||
ProcessHudScaleFix();
|
ProcessHudScaleFix();
|
||||||
bSomeFlag = true;
|
bSomeFlag = true;
|
||||||
@ -167,15 +164,7 @@ NUDE CHud__DrawCrossHairs_Hook()
|
|||||||
|
|
||||||
if (bSomeFlag)
|
if (bSomeFlag)
|
||||||
{
|
{
|
||||||
if (bHudScaleFix)
|
FUNC_100A24C0();
|
||||||
{
|
|
||||||
*(DWORD*)0x859520 = dwHudScaleX;
|
|
||||||
*(DWORD*)0x859524 = dwHudScaleY;
|
|
||||||
*CRadar__radarHeight = 76.0;
|
|
||||||
*CRadar__radarWidth = 94.0;
|
|
||||||
bHudScaleFix = 0;
|
|
||||||
bHudScaleFix = false;
|
|
||||||
}
|
|
||||||
bSomeFlag = false;
|
bSomeFlag = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,6 +24,13 @@ public:
|
|||||||
CAMERA_AIM * GetCurrentAim();
|
CAMERA_AIM * GetCurrentAim();
|
||||||
void SetCurrentAim(CAMERA_AIM *pAim);
|
void SetCurrentAim(CAMERA_AIM *pAim);
|
||||||
|
|
||||||
|
BYTE GetCameraMode() {
|
||||||
|
if(!m_bytePlayerNumber)
|
||||||
|
return GameGetLocalPlayerCameraMode();
|
||||||
|
else
|
||||||
|
return GameGetPlayerCameraMode(m_bytePlayerNumber);
|
||||||
|
};
|
||||||
|
|
||||||
void HideMarker();
|
void HideMarker();
|
||||||
BYTE GetCurrentWeapon();
|
BYTE GetCurrentWeapon();
|
||||||
int GetCurrentVehicleID();
|
int GetCurrentVehicleID();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user