mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-08 02:48:26 +00:00
make freestyle zones also work for +use blocks
This commit is contained in:
parent
4ede31f957
commit
7054795b4c
@ -855,7 +855,15 @@ public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3
|
||||
bool bOnGround = GetEntityFlags(client) & FL_ONGROUND || bOnLadder;
|
||||
|
||||
// key blocking
|
||||
if(!Shavit_InsideZone(client, Zone_Freestyle) && !bOnGround)
|
||||
if(!Shavit_InsideZone(client, Zone_Freestyle))
|
||||
{
|
||||
// block E
|
||||
if(gI_StyleProperties[gBS_Style[client]] & STYLE_BLOCK_USE && buttons & IN_USE)
|
||||
{
|
||||
buttons &= ~IN_USE;
|
||||
}
|
||||
|
||||
if(!bOnGround)
|
||||
{
|
||||
if(gI_StyleProperties[gBS_Style[client]] & STYLE_BLOCK_W && (vel[0] > 0 || buttons & IN_FORWARD))
|
||||
{
|
||||
@ -889,7 +897,7 @@ public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3
|
||||
buttons &= ~IN_MOVERIGHT;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(Shavit_InsideZone(client, Zone_Start) && gCV_BlockPreJump.BoolValue && !(gI_StyleProperties[gBS_Style[client]] & STYLE_PRESPEED))
|
||||
{
|
||||
@ -930,12 +938,6 @@ public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3
|
||||
gB_OnGround[client] = false;
|
||||
}
|
||||
|
||||
// block +use
|
||||
if(gI_StyleProperties[gBS_Style[client]] & STYLE_BLOCK_USE && buttons & IN_USE)
|
||||
{
|
||||
buttons &= ~IN_USE;
|
||||
}
|
||||
|
||||
if(gB_ClientPaused[client])
|
||||
{
|
||||
vel = view_as<float>({0.0, 0.0, 0.0});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user