Skip to content

Commit c867724

Browse files
committed
Merge branch 'master' into vscript
2 parents fd597c3 + 0151ace commit c867724

File tree

2 files changed

+20
-6
lines changed

2 files changed

+20
-6
lines changed

addons/sourcemod/scripting/shavit-core.sp

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1426,7 +1426,19 @@ public Action Command_Style(int client, int args)
14261426

14271427
char sName[64];
14281428
GetStyleSetting(iStyle, "name", sName, sizeof(sName));
1429-
FormatEx(sDisplay, 64, "%s - %s: %s", sName, sWR, sTime);
1429+
1430+
float pb = Shavit_GetClientPB(client, iStyle, gA_Timers[client].iTimerTrack);
1431+
1432+
if(pb > 0.0)
1433+
{
1434+
char sPb[32];
1435+
FormatSeconds(pb, sPb, 32, false);
1436+
FormatEx(sDisplay, 64, "%s - %s: %s - PB: %s", sName, sWR, sTime, sPb);
1437+
}
1438+
else
1439+
{
1440+
FormatEx(sDisplay, 64, "%s - %s: %s", sName, sWR, sTime);
1441+
}
14301442
}
14311443
else
14321444
{
@@ -1541,11 +1553,11 @@ void UpdateLaggedMovement(int client, bool user_timescale)
15411553
}
15421554
}
15431555

1544-
void CallOnStyleChanged(int client, int oldstyle, int newstyle, bool manual, bool nofoward=false)
1556+
void CallOnStyleChanged(int client, int oldstyle, int newstyle, bool manual, bool noforward=false)
15451557
{
15461558
gA_Timers[client].bsStyle = newstyle;
15471559

1548-
if (!nofoward)
1560+
if (!noforward)
15491561
{
15501562
Call_StartForward(gH_Forwards_OnStyleChanged);
15511563
Call_PushCell(client);

addons/sourcemod/scripting/shavit-zones.sp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,8 @@ public void OnPluginStart()
352352
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");
353353

354354
gCV_SQLZones.AddChangeHook(OnConVarChanged);
355+
gCV_PrebuiltZones.AddChangeHook(OnConVarChanged);
356+
gCV_ClimbButtons.AddChangeHook(OnConVarChanged);
355357
gCV_Interval.AddChangeHook(OnConVarChanged);
356358
gCV_UseCustomSprite.AddChangeHook(OnConVarChanged);
357359
gCV_Offset.AddChangeHook(OnConVarChanged);
@@ -593,7 +595,7 @@ public void OnConVarChanged(ConVar convar, const char[] oldValue, const char[] n
593595
}
594596
else if (convar == gCV_SQLZones)
595597
{
596-
for (int i = gI_MapZones; i > 0; i++)
598+
for (int i = gI_MapZones; i > 0; i--)
597599
{
598600
if (StrEqual(gA_ZoneCache[i-1].sSource, "sql"))
599601
Shavit_RemoveZone(i-1);
@@ -603,7 +605,7 @@ public void OnConVarChanged(ConVar convar, const char[] oldValue, const char[] n
603605
}
604606
else if (convar == gCV_PrebuiltZones)
605607
{
606-
for (int i = gI_MapZones; i > 0; i++)
608+
for (int i = gI_MapZones; i > 0; i--)
607609
{
608610
if (StrEqual(gA_ZoneCache[i-1].sSource, "autozone"))
609611
Shavit_RemoveZone(i-1);
@@ -613,7 +615,7 @@ public void OnConVarChanged(ConVar convar, const char[] oldValue, const char[] n
613615
}
614616
else if (convar == gCV_ClimbButtons)
615617
{
616-
for (int i = gI_MapZones; i > 0; i++)
618+
for (int i = gI_MapZones; i > 0; i--)
617619
{
618620
if (StrEqual(gA_ZoneCache[i-1].sSource, "autobutton"))
619621
Shavit_RemoveZone(i-1);

0 commit comments

Comments
 (0)