AutoExecConfig: Enable the configs
This commit is contained in:
parent
517a08e134
commit
f22185d646
|
@ -442,6 +442,11 @@ size_t CvarManager::GetRegCvarsCount()
|
||||||
return m_AmxmodxCvars;
|
return m_AmxmodxCvars;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CvarsList* CvarManager::GetCvarsList()
|
||||||
|
{
|
||||||
|
return &m_Cvars;
|
||||||
|
}
|
||||||
|
|
||||||
ke::AutoString convertFlagsToString(int flags)
|
ke::AutoString convertFlagsToString(int flags)
|
||||||
{
|
{
|
||||||
ke::AutoString flagsName;
|
ke::AutoString flagsName;
|
||||||
|
|
|
@ -153,6 +153,7 @@ class CvarManager
|
||||||
void SetCvarMax(CvarInfo* info, bool set, float value, int pluginId);
|
void SetCvarMax(CvarInfo* info, bool set, float value, int pluginId);
|
||||||
|
|
||||||
size_t GetRegCvarsCount();
|
size_t GetRegCvarsCount();
|
||||||
|
CvarsList* GetCvarsList();
|
||||||
|
|
||||||
void OnConsoleCommand();
|
void OnConsoleCommand();
|
||||||
void OnPluginUnloaded();
|
void OnPluginUnloaded();
|
||||||
|
|
|
@ -18,8 +18,6 @@
|
||||||
#include "CFlagManager.h"
|
#include "CFlagManager.h"
|
||||||
#include "nongpl_matches.h"
|
#include "nongpl_matches.h"
|
||||||
#include "format.h"
|
#include "format.h"
|
||||||
#include <amxmodx_version.h>
|
|
||||||
#include "CEvent.h"
|
|
||||||
|
|
||||||
extern CFlagManager FlagMan;
|
extern CFlagManager FlagMan;
|
||||||
ke::Vector<CAdminData *> DynamicAdmins;
|
ke::Vector<CAdminData *> DynamicAdmins;
|
||||||
|
@ -1918,6 +1916,8 @@ static cell AMX_NATIVE_CALL server_cmd(AMX *amx, cell *params) /* 1 param */
|
||||||
|
|
||||||
SERVER_COMMAND(cmd);
|
SERVER_COMMAND(cmd);
|
||||||
|
|
||||||
|
CoreCfg.CheckLegacyBufferedCommand(cmd);
|
||||||
|
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,6 +50,8 @@
|
||||||
#include "fakemeta.h"
|
#include "fakemeta.h"
|
||||||
#include "amxxlog.h"
|
#include "amxxlog.h"
|
||||||
#include "CvarManager.h"
|
#include "CvarManager.h"
|
||||||
|
#include "CoreConfig.h"
|
||||||
|
#include <amxmodx_version.h>
|
||||||
|
|
||||||
#define AMXXLOG_Log g_log.Log
|
#define AMXXLOG_Log g_log.Log
|
||||||
#define AMXXLOG_Error g_log.LogError
|
#define AMXXLOG_Error g_log.LogError
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
#include "CGameConfigs.h"
|
#include "CGameConfigs.h"
|
||||||
#include <engine_strucs.h>
|
#include <engine_strucs.h>
|
||||||
#include <CDetour/detours.h>
|
#include <CDetour/detours.h>
|
||||||
|
#include "CoreConfig.h"
|
||||||
|
|
||||||
plugin_info_t Plugin_info =
|
plugin_info_t Plugin_info =
|
||||||
{
|
{
|
||||||
|
@ -504,6 +505,8 @@ int C_Spawn(edict_t *pent)
|
||||||
FF_ClientAuthorized = registerForward("client_authorized", ET_IGNORE, FP_CELL, FP_DONE);
|
FF_ClientAuthorized = registerForward("client_authorized", ET_IGNORE, FP_CELL, FP_DONE);
|
||||||
FF_ChangeLevel = registerForward("server_changelevel", ET_STOP, FP_STRING, FP_DONE);
|
FF_ChangeLevel = registerForward("server_changelevel", ET_STOP, FP_STRING, FP_DONE);
|
||||||
|
|
||||||
|
CoreCfg.OnAmxxInitialized();
|
||||||
|
|
||||||
#if defined BINLOG_ENABLED
|
#if defined BINLOG_ENABLED
|
||||||
if (!g_BinLog.Open())
|
if (!g_BinLog.Open())
|
||||||
{
|
{
|
||||||
|
@ -628,6 +631,11 @@ void C_ServerActivate_Post(edict_t *pEdictList, int edictCount, int clientMax)
|
||||||
executeForwards(FF_PluginInit);
|
executeForwards(FF_PluginInit);
|
||||||
executeForwards(FF_PluginCfg);
|
executeForwards(FF_PluginCfg);
|
||||||
|
|
||||||
|
CoreCfg.ExecuteMainConfig(); // Execute amxx.cfg
|
||||||
|
CoreCfg.ExecuteAutoConfigs(); // Execute configs created with AutoExecConfig native.
|
||||||
|
CoreCfg.SetMapConfigTimer(6.1); // Prepare per-map configs to be executed 6.1 seconds later.
|
||||||
|
// Original value which was used in admin.sma.
|
||||||
|
|
||||||
// Correct time in Counter-Strike and other mods (except DOD)
|
// Correct time in Counter-Strike and other mods (except DOD)
|
||||||
if (!g_bmod_dod)
|
if (!g_bmod_dod)
|
||||||
g_game_timeleft = 0;
|
g_game_timeleft = 0;
|
||||||
|
@ -692,6 +700,9 @@ void C_ServerDeactivate_Post()
|
||||||
modules_callPluginsUnloading();
|
modules_callPluginsUnloading();
|
||||||
|
|
||||||
detachReloadModules();
|
detachReloadModules();
|
||||||
|
|
||||||
|
CoreCfg.Clear();
|
||||||
|
|
||||||
g_auth.clear();
|
g_auth.clear();
|
||||||
g_commands.clear();
|
g_commands.clear();
|
||||||
g_forcemodels.clear();
|
g_forcemodels.clear();
|
||||||
|
@ -1187,6 +1198,8 @@ void C_StartFrame_Post(void)
|
||||||
g_task_time = gpGlobals->time + 0.1f;
|
g_task_time = gpGlobals->time + 0.1f;
|
||||||
g_tasksMngr.startFrame();
|
g_tasksMngr.startFrame();
|
||||||
|
|
||||||
|
CoreCfg.OnMapConfigTimer();
|
||||||
|
|
||||||
RETURN_META(MRES_IGNORED);
|
RETURN_META(MRES_IGNORED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user