mirror of
https://github.com/dashr9230/SA-MP.git
synced 2026-10-10 11:43:04 +08:00
[saco] Match RequestSpawn, FUNC_10003F50 and FUNC_100041C0; the spectate reset is an else if, and a plain second if costs the jmp to the tail
This commit is contained in:
@@ -57,6 +57,7 @@ public:
|
||||
BOOL IsAdded();
|
||||
|
||||
float FUNC_1009F0C0(); // .text:1009F0C0
|
||||
BOOL FUNC_1009F420(float a1, float a2, float a3, float a4); // .text:1009F420
|
||||
float FUNC_1009F190(); // .text:1009F190
|
||||
char FUNC_1009FC00(VECTOR *vecStart, VECTOR *vecEnd, char a3); // .text:1009FC00
|
||||
char FUNC_1009FCE0(); // .text:1009FCE0
|
||||
|
||||
@@ -155,6 +155,7 @@ public:
|
||||
void sub_100A1C10();
|
||||
void sub_100A1DB0(int a1);
|
||||
|
||||
BYTE FUNC_100A0EE0(); // .text:100A0EE0
|
||||
int FUNC_100A0F90(); // .text:100A0F90
|
||||
|
||||
void LoadScene(char* szScene);
|
||||
|
||||
@@ -342,7 +342,7 @@ void CLocalPlayer::sub_10004060()
|
||||
{
|
||||
if(field_306)
|
||||
{
|
||||
FUNC_10003B60();
|
||||
RequestSpawn();
|
||||
field_302 = 1;
|
||||
}
|
||||
}
|
||||
@@ -529,3 +529,45 @@ void CLocalPlayer::FUNC_10004230(WORD a1)
|
||||
field_314 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
|
||||
void CLocalPlayer::RequestSpawn()
|
||||
{
|
||||
RakNet::BitStream bsSend;
|
||||
|
||||
pNetGame->GetRakClient()->RPC(RPC_RequestSpawn, &bsSend, HIGH_PRIORITY, RELIABLE, 0, FALSE);
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
|
||||
// straying outside the server boundary disarms and nags
|
||||
void CLocalPlayer::FUNC_10003F50()
|
||||
{
|
||||
if(!pGame->FUNC_100A0EE0() && m_pPlayerPed->FUNC_1009F420(pNetGame->GetSettings()->fWorldBoundryPX,
|
||||
pNetGame->GetSettings()->fWorldBoundryZX, pNetGame->GetSettings()->fWorldBoundryPY,
|
||||
pNetGame->GetSettings()->fWorldBoundryNY))
|
||||
{
|
||||
m_pPlayerPed->SetArmedWeapon(0, 0);
|
||||
pGame->DisplayGameText("Stay within the ~r~world boundries", 1000, 5);
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
|
||||
// leaving spectate only resets the spawn state when another class is pending
|
||||
void CLocalPlayer::FUNC_100041C0(BOOL bSpectating)
|
||||
{
|
||||
if(m_bIsSpectating && !m_bWantsAnotherClass && !bSpectating)
|
||||
sub_10003C20();
|
||||
else if(m_bWantsAnotherClass && !bSpectating)
|
||||
{
|
||||
field_F0 = 0;
|
||||
field_17D = 0;
|
||||
}
|
||||
|
||||
m_bIsSpectating = bSpectating;
|
||||
field_30F = 0;
|
||||
field_314 = 0;
|
||||
field_310 = -1;
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ public:
|
||||
int FUNC_10003AB0(); // .text:10003AB0
|
||||
int FUNC_10003AF0(); // .text:10003AF0
|
||||
int FUNC_10003B30(); // .text:10003B30
|
||||
void FUNC_10003B60(); // .text:10003B60
|
||||
void RequestSpawn(); // .text:10003B60
|
||||
BOOL FUNC_10004340(WORD a1, WORD a2, WORD a3); // .text:10004340
|
||||
BOOL FUNC_10004300(WORD a1, WORD a2, WORD a3); // .text:10004300
|
||||
PLAYERID FUNC_10004B70(); // .text:10004B70
|
||||
@@ -151,6 +151,8 @@ public:
|
||||
BOOL FUNC_10003A60(void *a2, void *a3, unsigned int a4); // .text:10003A60
|
||||
void FUNC_10004080(); // .text:10004080
|
||||
void FUNC_10004230(WORD a1); // .text:10004230
|
||||
void FUNC_10003F50(); // .text:10003F50
|
||||
void FUNC_100041C0(BOOL bSpectating); // .text:100041C0
|
||||
|
||||
DWORD GetField_F0() { return field_F0; };
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user