Merge branch 'master' into vscript

This commit is contained in:
rtldg 2025-05-07 00:59:50 +00:00
commit c867724c80
2 changed files with 20 additions and 6 deletions

View File

@ -1426,7 +1426,19 @@ public Action Command_Style(int client, int args)
char sName[64];
GetStyleSetting(iStyle, "name", sName, sizeof(sName));
FormatEx(sDisplay, 64, "%s - %s: %s", sName, sWR, sTime);
float pb = Shavit_GetClientPB(client, iStyle, gA_Timers[client].iTimerTrack);
if(pb > 0.0)
{
char sPb[32];
FormatSeconds(pb, sPb, 32, false);
FormatEx(sDisplay, 64, "%s - %s: %s - PB: %s", sName, sWR, sTime, sPb);
}
else
{
FormatEx(sDisplay, 64, "%s - %s: %s", sName, sWR, sTime);
}
}
else
{
@ -1541,11 +1553,11 @@ void UpdateLaggedMovement(int client, bool user_timescale)
}
}
void CallOnStyleChanged(int client, int oldstyle, int newstyle, bool manual, bool nofoward=false)
void CallOnStyleChanged(int client, int oldstyle, int newstyle, bool manual, bool noforward=false)
{
gA_Timers[client].bsStyle = newstyle;
if (!nofoward)
if (!noforward)
{
Call_StartForward(gH_Forwards_OnStyleChanged);
Call_PushCell(client);

View File

@ -352,6 +352,8 @@ public void OnPluginStart()
gCV_ResetClassnameBonus = new Convar("shavit_zones_resetclassname_bonus", "", "What classname to use when resetting the player (on bonus tracks).\nWould be applied once player teleports to the start zone or on every start if shavit_zones_forcetargetnamereset cvar is set to 1.\nYou don't need to touch this");
gCV_SQLZones.AddChangeHook(OnConVarChanged);
gCV_PrebuiltZones.AddChangeHook(OnConVarChanged);
gCV_ClimbButtons.AddChangeHook(OnConVarChanged);
gCV_Interval.AddChangeHook(OnConVarChanged);
gCV_UseCustomSprite.AddChangeHook(OnConVarChanged);
gCV_Offset.AddChangeHook(OnConVarChanged);
@ -593,7 +595,7 @@ public void OnConVarChanged(ConVar convar, const char[] oldValue, const char[] n
}
else if (convar == gCV_SQLZones)
{
for (int i = gI_MapZones; i > 0; i++)
for (int i = gI_MapZones; i > 0; i--)
{
if (StrEqual(gA_ZoneCache[i-1].sSource, "sql"))
Shavit_RemoveZone(i-1);
@ -603,7 +605,7 @@ public void OnConVarChanged(ConVar convar, const char[] oldValue, const char[] n
}
else if (convar == gCV_PrebuiltZones)
{
for (int i = gI_MapZones; i > 0; i++)
for (int i = gI_MapZones; i > 0; i--)
{
if (StrEqual(gA_ZoneCache[i-1].sSource, "autozone"))
Shavit_RemoveZone(i-1);
@ -613,7 +615,7 @@ public void OnConVarChanged(ConVar convar, const char[] oldValue, const char[] n
}
else if (convar == gCV_ClimbButtons)
{
for (int i = gI_MapZones; i > 0; i++)
for (int i = gI_MapZones; i > 0; i--)
{
if (StrEqual(gA_ZoneCache[i-1].sSource, "autobutton"))
Shavit_RemoveZone(i-1);