1.1 --- a/gameshim/stripper_mm.cpp Fri Apr 15 02:50:07 2011 -0700
1.2 +++ b/gameshim/stripper_mm.cpp Mon May 16 14:39:44 2011 -0500
1.3 @@ -33,6 +33,7 @@
1.4 static stripper_core_t stripper_core;
1.5 static char game_path[256];
1.6 static char stripper_path[256];
1.7 +static char stripper_cfg_path[256];
1.8
1.9 SH_DECL_HOOK0(IVEngineServer, GetMapEntitiesString, SH_NOATTRIB, 0, const char *);
1.10 SH_DECL_HOOK6(IServerGameDLL, LevelInit, SH_NOATTRIB, 0, bool, char const *, char const *, char const *, char const *, bool, bool);
1.11 @@ -114,11 +115,19 @@
1.12 {
1.13 NULL,
1.14 NULL,
1.15 + NULL,
1.16 log_message,
1.17 path_format,
1.18 get_map_name,
1.19 };
1.20
1.21 +ConVar cvar_stripper_cfg_path("stripper_cfg_path", "addons/stripper", FCVAR_NONE, "Stripper Config Path");
1.22 +
1.23 +void stripper_cfg_path_changed(IConVar *var, const char *pOldValue, float flOldValue)
1.24 +{
1.25 + strncpy(stripper_cfg_path, cvar_stripper_cfg_path.GetString(), sizeof(stripper_cfg_path));
1.26 +}
1.27 +
1.28 bool
1.29 StripperPlugin::Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlen, bool late)
1.30 {
1.31 @@ -137,6 +146,9 @@
1.32 engine->GetGameDir(game_path, sizeof(game_path));
1.33 stripper_game.game_path = game_path;
1.34 stripper_game.stripper_path = "addons/stripper";
1.35 + stripper_game.stripper_cfg_path = stripper_cfg_path;
1.36 + strncpy(stripper_cfg_path, cvar_stripper_cfg_path.GetString(), sizeof(stripper_cfg_path));
1.37 + cvar_stripper_cfg_path.InstallChangeCallback( stripper_cfg_path_changed );
1.38
1.39 #if SOURCE_ENGINE==SE_DARKMESSIAH
1.40 ICvar* cvar = GetICVar();