mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-12 04:41:17 +00:00
Optimize
This commit is contained in:
parent
bca6e9165b
commit
35528276d2
2 changed files with 2 additions and 12 deletions
|
@ -751,18 +751,13 @@ boolean CON_Responder(event_t *ev)
|
||||||
if (ev->data1 >= KEY_MOUSE1) // See also: HUD_Responder
|
if (ev->data1 >= KEY_MOUSE1) // See also: HUD_Responder
|
||||||
{
|
{
|
||||||
INT32 i;
|
INT32 i;
|
||||||
boolean p1control = false;
|
|
||||||
|
|
||||||
for (i = 0; i < num_gamecontrols; i++)
|
for (i = 0; i < num_gamecontrols; i++)
|
||||||
{
|
{
|
||||||
if (gamecontrol[i][0] == ev->data1 || gamecontrol[i][1] == ev->data1)
|
if (gamecontrol[i][0] == ev->data1 || gamecontrol[i][1] == ev->data1)
|
||||||
{
|
|
||||||
p1control = true;
|
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!p1control)
|
if (i == num_gamecontrols)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1076,18 +1076,13 @@ boolean HU_Responder(event_t *ev)
|
||||||
if (ev->data1 >= KEY_MOUSE1)
|
if (ev->data1 >= KEY_MOUSE1)
|
||||||
{
|
{
|
||||||
INT32 i;
|
INT32 i;
|
||||||
boolean p1control = false;
|
|
||||||
|
|
||||||
for (i = 0; i < num_gamecontrols; i++)
|
for (i = 0; i < num_gamecontrols; i++)
|
||||||
{
|
{
|
||||||
if (gamecontrol[i][0] == ev->data1 || gamecontrol[i][1] == ev->data1)
|
if (gamecontrol[i][0] == ev->data1 || gamecontrol[i][1] == ev->data1)
|
||||||
{
|
|
||||||
p1control = true;
|
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!p1control)
|
if (i == num_gamecontrols)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue