mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 14:37:29 +08:00
[saco] Rename and match CGame::sub_100A00C0()
* Rename `unnamed_10150340` to `bUsedPlayerSlots` * Update CGame constructor * Rename `CGame::sub_100A00C0()` to `CGame::FindFirstFreePlayerPedSlot()` * Update `CGame::sub_100A00F0()`
This commit is contained in:
parent
13dedd6c68
commit
5443357df1
@ -19,7 +19,7 @@ DWORD dwDummyActiveMouseState;
|
|||||||
unsigned char *szGameTextMessage;
|
unsigned char *szGameTextMessage;
|
||||||
HWND hWindowHandle;
|
HWND hWindowHandle;
|
||||||
|
|
||||||
int unnamed_10150340[210];
|
BOOL bUsedPlayerSlots[PLAYER_PED_SLOTS];
|
||||||
|
|
||||||
IDirectInputDevice8 *pDirectInputMouse;
|
IDirectInputDevice8 *pDirectInputMouse;
|
||||||
BYTE unnamed_10150688;
|
BYTE unnamed_10150688;
|
||||||
@ -46,7 +46,7 @@ CGame::CGame()
|
|||||||
field_65 = 0;
|
field_65 = 0;
|
||||||
field_69 = FALSE;
|
field_69 = FALSE;
|
||||||
field_6D = 0;
|
field_6D = 0;
|
||||||
memset(unnamed_10150340, 0, sizeof(unnamed_10150340));
|
memset(bUsedPlayerSlots, 0, sizeof(bUsedPlayerSlots));
|
||||||
memset(field_6E, 0, sizeof(field_6E));
|
memset(field_6E, 0, sizeof(field_6E));
|
||||||
field_55 = 0;
|
field_55 = 0;
|
||||||
field_59 = 1;
|
field_59 = 1;
|
||||||
@ -86,25 +86,27 @@ void CGame::sub_100A0090(int a1, int a2)
|
|||||||
Sleep(1000 / a2 - a1 - 1);
|
Sleep(1000 / a2 - a1 - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
BYTE CGame::sub_100A00C0()
|
//-----------------------------------------------------------
|
||||||
|
|
||||||
|
BYTE CGame::FindFirstFreePlayerPedSlot()
|
||||||
{
|
{
|
||||||
BYTE result = 2;
|
BYTE x=2;
|
||||||
while(result != 210)
|
while(x!=PLAYER_PED_SLOTS) {
|
||||||
{
|
if(bUsedPlayerSlots[x] != TRUE) return x;
|
||||||
if(!unnamed_10150340[result])
|
x++;
|
||||||
return result;
|
|
||||||
result++;
|
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------------------------
|
||||||
|
|
||||||
BYTE CGame::sub_100A00F0()
|
BYTE CGame::sub_100A00F0()
|
||||||
{
|
{
|
||||||
BYTE result = 0;
|
BYTE result = 0;
|
||||||
BYTE v1 = 2;
|
BYTE v1 = 2;
|
||||||
while(v1 != 210)
|
while(v1 != 210)
|
||||||
{
|
{
|
||||||
if(unnamed_10150340[v1] == 1)
|
if(bUsedPlayerSlots[v1] == 1)
|
||||||
{
|
{
|
||||||
result++;
|
result++;
|
||||||
}
|
}
|
||||||
@ -113,8 +115,6 @@ BYTE CGame::sub_100A00F0()
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------
|
//-----------------------------------------------------------
|
||||||
|
|
||||||
int CGame::GetWeaponModelIDFromWeapon(int iWeaponID)
|
int CGame::GetWeaponModelIDFromWeapon(int iWeaponID)
|
||||||
|
@ -43,6 +43,8 @@ private:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
BYTE FindFirstFreePlayerPedSlot();
|
||||||
|
|
||||||
int GetWeaponModelIDFromWeapon(int iWeaponID);
|
int GetWeaponModelIDFromWeapon(int iWeaponID);
|
||||||
BOOL IsKeyPressed(int iKeyIdentifier);
|
BOOL IsKeyPressed(int iKeyIdentifier);
|
||||||
float FindGroundZForCoord(float x, float y, float z);
|
float FindGroundZForCoord(float x, float y, float z);
|
||||||
|
Loading…
Reference in New Issue
Block a user