mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 14:25:38 +03:00
small fix for amb1024 - weird plugin dir choice
This commit is contained in:
parent
b7f8503655
commit
2d737970d0
@ -421,25 +421,18 @@ int C_Spawn(edict_t *pent)
|
|||||||
get_localinfo_r("amxx_configsdir", "addons/amxmodx/configs", configs_dir, sizeof(configs_dir)-1);
|
get_localinfo_r("amxx_configsdir", "addons/amxmodx/configs", configs_dir, sizeof(configs_dir)-1);
|
||||||
g_plugins.CALMFromFile(get_localinfo("amxx_plugins", "addons/amxmodx/configs/plugins.ini"));
|
g_plugins.CALMFromFile(get_localinfo("amxx_plugins", "addons/amxmodx/configs/plugins.ini"));
|
||||||
LoadExtraPluginsToPCALM(configs_dir);
|
LoadExtraPluginsToPCALM(configs_dir);
|
||||||
char temporaryMap[64];
|
char temporaryMap[64], *tmap_ptr;
|
||||||
|
|
||||||
strncpy(temporaryMap,STRING(gpGlobals->mapname),sizeof(temporaryMap)-1);
|
strncpy(temporaryMap,STRING(gpGlobals->mapname),sizeof(temporaryMap)-1);
|
||||||
|
|
||||||
int ii=0;
|
|
||||||
|
|
||||||
while (temporaryMap[ii]!='_' && temporaryMap[ii]!='\0')
|
if ((tmap_ptr = strchr(temporaryMap, '_')) != NULL)
|
||||||
{
|
|
||||||
++ii;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (temporaryMap[ii]=='_')
|
|
||||||
{
|
{
|
||||||
// this map has a prefix
|
// this map has a prefix
|
||||||
|
|
||||||
temporaryMap[ii]='\0';
|
*tmap_ptr = '\0';
|
||||||
snprintf(map_pluginsfile_path, sizeof(map_pluginsfile_path)-1,
|
snprintf(map_pluginsfile_path, sizeof(map_pluginsfile_path)-1,
|
||||||
"%s/maps/prefixes/plugins-%s.ini",
|
"%s/maps/plugins-%s.ini",
|
||||||
configs_dir,
|
configs_dir,
|
||||||
temporaryMap);
|
temporaryMap);
|
||||||
g_plugins.CALMFromFile(map_pluginsfile_path);
|
g_plugins.CALMFromFile(map_pluginsfile_path);
|
||||||
|
Loading…
Reference in New Issue
Block a user