minor optimizations

This commit is contained in:
shavitush 2016-07-12 20:48:43 +03:00
parent 832e7b39ff
commit af7d62d4a6

View File

@ -891,8 +891,9 @@ public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3
}
bool bOnLadder = (GetEntityMoveType(client) == MOVETYPE_LADDER);
bool bInStart = Shavit_InsideZone(client, Zone_Start);
if(gCV_LeftRight.BoolValue && gB_TimerEnabled[client] && (!gB_Zones || !Shavit_InsideZone(client, Zone_Start) && (buttons & IN_LEFT || buttons & IN_RIGHT)))
if(gCV_LeftRight.BoolValue && gB_TimerEnabled[client] && (!gB_Zones || !bInStart && (buttons & IN_LEFT || buttons & IN_RIGHT)))
{
Shavit_StopTimer(client);
Shavit_PrintToChat(client, "I've stopped your timer for using +left/+right. No cheating!");
@ -945,7 +946,7 @@ public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3
}
}
if(Shavit_InsideZone(client, Zone_Start) && gCV_BlockPreJump.BoolValue && !(gI_StyleProperties[gBS_Style[client]] & STYLE_PRESPEED))
if(bInStart && gCV_BlockPreJump.BoolValue && !(gI_StyleProperties[gBS_Style[client]] & STYLE_PRESPEED))
{
if(vel[2] > 0 || buttons & IN_JUMP)
{