mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-07 18:38:26 +00:00
Changed bot flag behavior to remove flags when needed.
This commit is contained in:
parent
2cd0d3e2db
commit
2a4ffbb162
@ -1435,16 +1435,16 @@ public void Shavit_OnResume(int client)
|
|||||||
gB_Record[client] = true;
|
gB_Record[client] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ModifyFlags(int &flags, int flag, bool add)
|
void ApplyFlags(int &flags1, int flags2, int flag)
|
||||||
{
|
{
|
||||||
if(add)
|
if((flags2 & flag) > 0)
|
||||||
{
|
{
|
||||||
flags |= flag;
|
flags1 |= flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
flags &= flag;
|
flags2 &= ~flag;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1571,10 +1571,10 @@ public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3
|
|||||||
int iReplayFlags = gA_Frames[style][track].Get(gI_ReplayTick[style], 6);
|
int iReplayFlags = gA_Frames[style][track].Get(gI_ReplayTick[style], 6);
|
||||||
int iEntityFlags = GetEntityFlags(client);
|
int iEntityFlags = GetEntityFlags(client);
|
||||||
|
|
||||||
ModifyFlags(iEntityFlags, FL_ONGROUND, (iReplayFlags & FL_ONGROUND) > 0);
|
ApplyFlags(iEntityFlags, iReplayFlags, FL_ONGROUND);
|
||||||
ModifyFlags(iEntityFlags, FL_PARTIALGROUND, (iReplayFlags & FL_PARTIALGROUND) > 0);
|
ApplyFlags(iEntityFlags, iReplayFlags, FL_PARTIALGROUND);
|
||||||
ModifyFlags(iEntityFlags, FL_INWATER, (iReplayFlags & FL_INWATER) > 0);
|
ApplyFlags(iEntityFlags, iReplayFlags, FL_INWATER);
|
||||||
ModifyFlags(iEntityFlags, FL_SWIM, (iReplayFlags & FL_SWIM) > 0);
|
ApplyFlags(iEntityFlags, iReplayFlags, FL_SWIM);
|
||||||
|
|
||||||
SetEntityFlags(client, iEntityFlags);
|
SetEntityFlags(client, iEntityFlags);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user