From 5214a2d6f7dc6efce5b4bce54984062520508fc9 Mon Sep 17 00:00:00 2001 From: olivia Date: Thu, 1 May 2025 16:39:23 -0700 Subject: [PATCH 1/3] shavit-core.sp - typo (^: --- addons/sourcemod/scripting/shavit-core.sp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/sourcemod/scripting/shavit-core.sp b/addons/sourcemod/scripting/shavit-core.sp index 2d74994e..fa4f0043 100644 --- a/addons/sourcemod/scripting/shavit-core.sp +++ b/addons/sourcemod/scripting/shavit-core.sp @@ -1520,11 +1520,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); From b1a2f064327906f2ca063d807603309ed5015c74 Mon Sep 17 00:00:00 2001 From: olivia Date: Tue, 6 May 2025 16:46:28 -0700 Subject: [PATCH 2/3] add player PB to !style menu (#1239) * shavit-core.sp - add player pb to style menu helps to see if you've already beaten a map on a style without changing to it first * shavit-core.sp - move pb to only after a wr is found * shavit-core.sp - fix whitespace --- addons/sourcemod/scripting/shavit-core.sp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/addons/sourcemod/scripting/shavit-core.sp b/addons/sourcemod/scripting/shavit-core.sp index fa4f0043..462b57b8 100644 --- a/addons/sourcemod/scripting/shavit-core.sp +++ b/addons/sourcemod/scripting/shavit-core.sp @@ -1405,7 +1405,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 { From 0151ace718c8256b5f16ef39e6fcfd0a03d41765 Mon Sep 17 00:00:00 2001 From: rtldg Date: Wed, 7 May 2025 00:02:44 +0000 Subject: [PATCH 3/3] fix shavit-zones cvar change callback errors (found by caliph) --- addons/sourcemod/scripting/shavit-zones.sp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/addons/sourcemod/scripting/shavit-zones.sp b/addons/sourcemod/scripting/shavit-zones.sp index bb611e54..fe6dcb83 100644 --- a/addons/sourcemod/scripting/shavit-zones.sp +++ b/addons/sourcemod/scripting/shavit-zones.sp @@ -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);