Force sv_disable_immunity_alpha. (#419)

This commit is contained in:
shavitush 2017-07-28 07:16:21 +03:00
parent 784b41e50b
commit a04e3463a7
2 changed files with 11 additions and 1 deletions

View File

@ -19,7 +19,6 @@ Including a records system, map zones (start/end marks etc), HUD with useful inf
* [SourceMod 1.8 or above](http://www.sourcemod.net/downloads.php)
# Optional requirements:
* `sv_disable_immunity_alpha` set to 1 in CS:GO for the `shavit_misc_playeropacity` setting to work.
* [DHooks](http://users.alliedmods.net/~drifter/builds/dhooks/2.0/) - required for 250/260 runspeed for all weapons.
* [Bunnyhop Statistics](https://forums.alliedmods.net/showthread.php?t=286135) - to show amount of scrolls for non-auto styles in the key display. CS:S only!
* [SteamWorks](https://forums.alliedmods.net/showthread.php?t=229556) - for the `{serverip}` advertisement variable.

View File

@ -67,6 +67,7 @@ enum
};
// cache
ConVar sv_disable_immunity_alpha;
bool gB_Hide[MAXPLAYERS+1];
bool gB_Late = false;
int gI_GroundEntity[MAXPLAYERS+1];
@ -179,6 +180,7 @@ public void OnPluginStart()
// cache
gEV_Type = GetEngineVersion();
sv_disable_immunity_alpha = FindConVar("sv_disable_immunity_alpha");
// spectator list
RegConsoleCmd("sm_specs", Command_Specs, "Show a list of spectators.");
@ -438,6 +440,15 @@ public void OnConVarChanged(ConVar convar, const char[] oldValue, const char[] n
gB_ClanTag = !StrEqual(gS_ClanTag, "0");
}
public void OnConfigsExecuted()
{
if(sv_disable_immunity_alpha != null)
{
sv_disable_immunity_alpha.BoolValue = true;
delete sv_disable_immunity_alpha;
}
}
public void OnMapStart()
{
GetCurrentMap(gS_CurrentMap, 192);