some maybe working eventqueuefix anti-basevelocity-from-startzone fix

This commit is contained in:
rtldg 2021-03-29 18:36:40 +00:00
parent 9c54cd733c
commit 14e9bf27c3

View File

@ -2931,6 +2931,16 @@ public Action Command_Specs(int client, int args)
return Plugin_Handled;
}
void ClearClientEventsFrame(int serial)
{
int client = GetClientFromSerial(serial);
if (client > 0)
{
ClearClientEvents(client);
}
}
public Action Shavit_OnStart(int client)
{
gI_TimesTeleported[client] = 0;
@ -2946,6 +2956,14 @@ public Action Shavit_OnStart(int client)
SetEntPropString(client, Prop_Data, "m_iClassname", "player");
}
// Used to clear some (mainly basevelocity) events that can be used to boost out of the start zone.
if(gB_Eventqueuefix)
{
ClearClientEvents(client); // maybe unneeded?
// The RequestFrame is the on that's actually needed though...
RequestFrame(ClearClientEventsFrame, GetClientSerial(client));
}
if(Shavit_GetStyleSettingInt(gI_Style[client], "kzcheckpoints"))
{
ResetCheckpoints(client);