View Single Post
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 02-28-2019 , 23:13   Re: Polymorph: Mod Manager
Reply With Quote #955

Quote:
Originally Posted by rtxa View Post
Hello fysiks, there is something that is bothering me in all multimod plugins I have already test it (joropito, addons_zz), is that settings are not loaded in plugin_precache(). Why I say this? Because in Half-Life, when you are playing in Team Deathmatch (mp_teamplay 1), mp_teamlist value is only taken in plugin_precache(), so if you don't load settings in that precise moment, there is no effect, can you help me with this?

Also, I found that cvars or cmds are not being parsed correctly when they contains a semicolon, e.g.

Code:
[cfg]
mp_teamlist "barney;robot"
When you retrieve the value, you only get "barney"
In general, cvars should be loaded in plugin_cfg() (which is by it's nature, sometime after precache) which is probably why you see the same issue in all of the plugins that you mentioned. I am not aware of this specific setting or why it would need to be set prior to plugin_cfg() (I've never played HLDM).

I'm not sure what the best solution would be if you need to set it so soon (none of the files for Polymorph are loaded when plugin_precache() executes IIRC). Creating a special plugin that does it in precache might be an option depending on when you change it (i.e. is it different for each mod that you run?)

Traditionally in an INI file, the semicolon is used to denote the beginning of a comment (which is what I assume in the code and I don't do extra checks to see if it happens to be in between matching quotes). So, when the plugin loads the file, it thinks that the semicolon is a comment. The solution to this problem will likely depend on what is done to fix the first.

So, how often does this value get changed and in what circumstances? Would it work if it was set at the end of the previous map?
__________________

Last edited by fysiks; 02-28-2019 at 23:16.
fysiks is offline