@@ -10,11 +10,11 @@ PluginConvars::PluginConvars(std::string m_plugin_name)
1010void PluginConvars::CreateFake (std::string cvarname, int32_t type, std::any defaultValue, bool prot)
1111{
1212 if (type < 0 || type > 14 ) return ;
13- if (fakeConvars. find (cvarname) != fakeConvars. end ( )) return ;
13+ if (FakeConvarExists (cvarname)) return ;
1414 if (FetchCVar (cvarname)) return ;
1515
1616 auto cvar = new FakeConVar (cvarname, (EConVarType)type, defaultValue, prot);
17- fakeConvars. insert ({ cvarname, cvar } );
17+ InsertFakeConvar ( cvarname, cvar);
1818}
1919
2020void PluginConvars::CreateFakeLua (std::string cvarname, int32_t type, luabridge::LuaRef defaultValue, bool prot)
@@ -83,11 +83,11 @@ void PluginConvars::CreateFakeLua(std::string cvarname, int32_t type, luabridge:
8383
8484void PluginConvars::DeleteFake (std::string cvarname)
8585{
86- if (fakeConvars. find (cvarname) == fakeConvars. end ( )) return ;
86+ if (! FakeConvarExists (cvarname)) return ;
8787
88- auto cvar = fakeConvars. at (cvarname);
88+ auto cvar = GetFakeConvar (cvarname);
8989 delete cvar;
90- fakeConvars. erase (cvarname);
90+ DeleteFakeConvar (cvarname);
9191}
9292
9393std::any PluginConvars::GetConvarValue (std::string cvarname)
0 commit comments