mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-11-27 08:20:35 +00:00
[saco] Implement/match CGame::ToggleKeyInputsDisabled(...)
This commit is contained in:
parent
6f842890eb
commit
a9e6635686
@ -266,6 +266,75 @@ void CGame::ProcessInputDisabling()
|
||||
|
||||
//-----------------------------------------------------------
|
||||
|
||||
void CGame::ToggleKeyInputsDisabled(int a2, BOOL a3)
|
||||
{
|
||||
if(a2 == 2)
|
||||
{
|
||||
UnFuck(0x541DF5,5);
|
||||
memset((PVOID)0x541DF5,0x90,5); // disable call
|
||||
|
||||
DisableMouseProcess();
|
||||
DIResetMouse();
|
||||
UpdatePads();
|
||||
|
||||
UnFuck(0x6194A0u,1);
|
||||
*(BYTE*)0x6194A0 = 0xC3;
|
||||
|
||||
pD3DDevice->ShowCursor(TRUE);
|
||||
field_61 = 2;
|
||||
}
|
||||
else if(a2 == 1)
|
||||
{
|
||||
if(field_61 != 1)
|
||||
{
|
||||
UnFuck(0x541DF5,5);
|
||||
memset((PVOID)0x541DF5,0x90,5); // disable call
|
||||
|
||||
field_61 = 1;
|
||||
}
|
||||
}
|
||||
else if(a2 == 3)
|
||||
{
|
||||
if(field_61 != 3)
|
||||
{
|
||||
DisableMouseProcess();
|
||||
DIResetMouse();
|
||||
UpdatePads();
|
||||
|
||||
UnFuck(0x6194A0,1);
|
||||
*(BYTE*)0x6194A0 = 0xC3;
|
||||
|
||||
pD3DDevice->ShowCursor(TRUE);
|
||||
field_61 = 3;
|
||||
}
|
||||
}
|
||||
else if(a2 == 4)
|
||||
{
|
||||
if(field_61 != 4)
|
||||
{
|
||||
DisableMousePositionUpdate();
|
||||
DIResetMouse();
|
||||
UpdatePads();
|
||||
|
||||
UnFuck(0x6194A0,1);
|
||||
*(BYTE*)0x6194A0 = 0xC3;
|
||||
|
||||
field_61 = 4;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!a2 && field_61)
|
||||
{
|
||||
field_65 = a3 != 0 ? 0 : 10;
|
||||
pD3DDevice->ShowCursor(FALSE);
|
||||
field_61 = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------
|
||||
|
||||
void CGame::InitGame()
|
||||
{
|
||||
// Create a buffer for game text.
|
||||
|
@ -39,6 +39,7 @@ public:
|
||||
int GetWeaponModelIDFromWeapon(int iWeaponID);
|
||||
BOOL IsKeyPressed(int iKeyIdentifier);
|
||||
float FindGroundZForCoord(float x, float y, float z);
|
||||
void ToggleKeyInputsDisabled(int a2, BOOL a3);
|
||||
void StartGame();
|
||||
void InitGame();
|
||||
BOOL IsGameLoaded();
|
||||
|
Loading…
Reference in New Issue
Block a user