Skip to content

Commit

Permalink
this should let you change shavit_zones_box_offset without reloading …
Browse files Browse the repository at this point in the history
…the plugin
  • Loading branch information
rtldg committed Feb 21, 2022
1 parent 98ee179 commit 840490c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions addons/sourcemod/scripting/shavit-zones.sp
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ public void OnPluginStart()
gCV_UseCustomSprite.AddChangeHook(OnConVarChanged);
gCV_Offset.AddChangeHook(OnConVarChanged);
gCV_PrebuiltVisualOffset.AddChangeHook(OnConVarChanged);
gCV_BoxOffset.AddChangeHook(OnConVarChanged);

Convar.AutoExecConfig();

Expand Down Expand Up @@ -427,6 +428,10 @@ public void OnConVarChanged(ConVar convar, const char[] oldValue, const char[] n
{
LoadZoneSettings();
}
else if (convar == gCV_BoxOffset)
{
CreateZoneEntities(false);
}
}

public void OnAdminMenuCreated(Handle topmenu)
Expand Down

0 comments on commit 840490c

Please sign in to comment.