Skip to content
Permalink
Browse files

Reset thirdperson view on spawn

  • Loading branch information
Bara committed Jun 15, 2019
1 parent 850a5f8 commit e492df9099966a528b57de29d7fcbf12c37f9fc3
@@ -148,6 +148,7 @@ void SetupConfig()
g_cAdditionalMeleeWeapon = AutoExecConfig_CreateConVar("ttt_additional_melee_weapon", "knife", "Which additional weapon?");
g_cUnloadPlugins = AutoExecConfig_CreateConVar("ttt_unload_plugins", "1", "Unload old/obsolete plugins?", _, true, 0.0, true, 1.0);
g_cRemovePlugins = AutoExecConfig_CreateConVar("ttt_remove_plugins", "1", "Remove old/obsolete plugins (ttt_remove_plugins must be 1)?", _, true, 0.0, true, 1.0);
g_cFixThirdperson = AutoExecConfig_CreateConVar("ttt_fix_thirdperson_view", "1", "Reset thirdperson view back to firstperson, if players comes from other servers with thirdperson view (Zombie, Prop Hunt, ...)", _, true, 0.0, true, 1.0);

g_cpluginTag.AddChangeHook(OnConVarChanged);
g_ckickImmunity.AddChangeHook(OnConVarChanged);
@@ -307,6 +307,7 @@ ConVar g_cAdditionalMeleeRole = null;
ConVar g_cAdditionalMeleeWeapon = null;
ConVar g_cUnloadPlugins = null;
ConVar g_cRemovePlugins = null;
ConVar g_cFixThirdperson = null;

Handle g_hRules = null;
bool g_bRules[MAXPLAYERS + 1] = { false, ... };
@@ -1619,6 +1619,11 @@ public Action Event_PlayerSpawn(Event event, const char[] name, bool dontBroadca
g_iArmor[client] = 0;
}

if (g_cFixThirdperson.BoolValue)
{
ClientCommand(client, "firstperson");
}

g_bRespawn[client] = false;
}
}

0 comments on commit e492df9

Please sign in to comment.
You can’t perform that action at this time.