Raised This Month: $7 Target: $400
 1% 

Map specyfic configs loading


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
KWo
AMX Mod X Beta Tester
Join Date: Jul 2004
Location: Poland
Old 02-23-2007 , 16:50   Map specyfic configs loading
Reply With Quote #1

Here is the part of default admin.sma file:
Code:
public plugin_cfg() {     new configFile[64], curMap[32]     get_configsdir(configFile, 31)     get_mapname(curMap, 31)     new len = format(configFile, 63, "%s/maps/%s.cfg", configFile, curMap)     if (file_exists(configFile))         set_task(6.1, "delayed_load", 0, configFile, len + 1) }

The questions is - why there is so big delay (6.1 sec) in that function to load the map specyfic configs? I believe the people want to be sure that even 1000 plugins have been already loaded and correctly inited, but is this really necessary to have that time value so high?
Example - I want to have csdm 2.1 disabled on some particular maps, so I need the map specyfic config for that map is called before csdm plugins start to do some actions (like equiping players with a gun, stripping weapons, removing some entities like bombzones, hostages etc). If the plugin will execute it's commands because it will see at startup is enabled, disabling it after that is too late.
I believe we need to have all commands already registered to have the possiblity to include them in map specyfic configuration file.
So - should I post a feature request (which will be immediately rejected) like "fast load map specyfic cfg file" or something like this (to load it before any plugin may start to do something) to keep the backward compatibility of current work of map specyfic configuration and have also the possibility to do something faster or I should rather think about using plugin_cfg() function in these plugins I would like to have pre-configured for some map first?
How about registering commnds? They should be registered before any map specyfic config is executed - so for the particular plugin they should be registered in plugin_cfg (at the top of it) instead plugin_init (I believe plugin_cfg() is called before plugin_init()? Otherwise I cannot to call any command which is not registered yet from plugin_cfg().
Any suggestions?
__________________
The Fullpack of podbot mm V3B22 - 24 apr 2012!!! is available here.
The All-In-One 3.2a package - 02 jun 2013 (AMX X 1.8.2 [with ATAC 3.0.1b , CSDM2.1.3c beta, CM OE 0.6.5, podbot mm V3B22c and mm 1.20) is available here.
The newest Beta V3B23a (rel. 28 august 2018!!!) is available here.
KWo is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 02-23-2007 , 18:41   Re: Map specyfic configs loading
Reply With Quote #2

http://forums.alliedmods.net/showthread.php?t=43012 - as of 1.76
http://forums.alliedmods.net/showthread.php?t=43830 - not yet released
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
KWo
AMX Mod X Beta Tester
Join Date: Jul 2004
Location: Poland
Old 02-24-2007 , 03:18   Re: Map specyfic configs loading
Reply With Quote #3

Thanks.
The stuff with Per-Map Plugin Files and Disabling Plugins solved the problem. I had to miss that new feature (again).
There is one thing - if these plugins they nomally autoload some module, they do it even if they are disabled which looks as a bug (for example it still loads for me CSDM module even if there is no plugin for it running). Is this expected behavior of work of modules and disabled plugins autoloading such modules or not?
__________________
The Fullpack of podbot mm V3B22 - 24 apr 2012!!! is available here.
The All-In-One 3.2a package - 02 jun 2013 (AMX X 1.8.2 [with ATAC 3.0.1b , CSDM2.1.3c beta, CM OE 0.6.5, podbot mm V3B22c and mm 1.20) is available here.
The newest Beta V3B23a (rel. 28 august 2018!!!) is available here.
KWo is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 02-24-2007 , 12:35   Re: Map specyfic configs loading
Reply With Quote #4

I don't know what is expected of it. Perhaps you should submit a bug report. Worst case scenario, it is intended, and the report gets closed.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:09.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode