jedi-Guard Posted August 8, 2006 Share Posted August 8, 2006 Need help with g_automapcycle When i have the configuration like this seta g_automapcycle "1" seta bot_enable "0" after duel_fraglimit, it wont load other map. If i change the seta bot_enable "1". so it looks like this seta g_automapcycle "1" seta bot_enable "1" It works then. How can i solv this problem, so Auto Map Cycle works while bot_enable is disabled Link to comment Share on other sites More sharing options...
ensiform Posted August 13, 2006 Share Posted August 13, 2006 I don't see why bot_enable would even be causing problems. bot_enable has nothing to do with g_autoMapCycle. Another thing I should mention is that I have found many people who tend to lean to using JA+ seem to thing seta is the best way to set stuff, its not. using set is technically the best option as it doesn't throw all your junk into jampconfig.cfg or jampserver.cfg. Link to comment Share on other sites More sharing options...
jedi-Guard Posted August 14, 2006 Author Share Posted August 14, 2006 Try to add seta bot_enable "0" in server.cfg and seta g_automapcycle "1" also in server.cfg open jampconfig.cfg and delete everything there and start the dedicated server, not by the jampwinded.exe, but throught jamp.exe without joining the game. Remember its a none mode server, which means it has no extra files, not even the jampwinded.exe If you do it my way, you see what i mean, if you do something wrong, then you havnt understod what i said. Link to comment Share on other sites More sharing options...
ensiform Posted August 14, 2006 Share Posted August 14, 2006 suz but why would i clear my config? what is the point of disabling bot_enable for anyway? just dont set bot_minplayers and you wont get any bots. and here's your answer because it was meant to only be used with bot_enable i guess: follow this because it seems it was designed this way on purpose: G_InitBots->G_LoadArenas->G_RefreshNextMap if ( trap_Cvar_VariableIntegerValue( "bot_enable" ) ) { BotAISetup( restart ); BotAILoadMap( restart ); G_InitBots( restart ); } /* =============== G_InitBots =============== */ void G_InitBots( qboolean restart ) { G_LoadBots(); G_LoadArenas(); trap_Cvar_Register( &bot_minplayers, "bot_minplayers", "0", CVAR_SERVERINFO ); //rww - new bot route stuff LoadPath_ThisLevel(); //end rww } /* =============== G_LoadArenas =============== */ static void G_LoadArenas( void ) { int numdirs; char filename[128]; char dirlist[1024]; char* dirptr; int i, n; int dirlen; g_numArenas = 0; // get all arenas from .arena files numdirs = trap_FS_GetFileList("scripts", ".arena", dirlist, 1024 ); dirptr = dirlist; for (i = 0; i < numdirs; i++, dirptr += dirlen+1) { dirlen = strlen(dirptr); strcpy(filename, "scripts/"); strcat(filename, dirptr); G_LoadArenasFromFile(filename); } // trap_Printf( va( "%i arenas parsed\n", g_numArenas ) ); for( n = 0; n < g_numArenas; n++ ) { Info_SetValueForKey( g_arenaInfos[n], "num", va2( "%i", n ) ); } G_RefreshNextMap(g_gametype.integer, qfalse); } extern siegePers_t g_siegePersistant; //g_saga.c //rww - auto-obtain nextmap. I could've sworn Q3 had something like this, but I guess not. const char *G_RefreshNextMap(int gametype, qboolean forced) { int typeBits = 0; int thisLevel = 0; int desiredMap = 0; int n = 0; char *type = NULL; qboolean loopingUp = qfalse; vmCvar_t mapname; if (!g_autoMapCycle.integer && !forced) { return NULL; } if (!g_arenaInfos[0]) { return NULL; } trap_Cvar_Register( &mapname, "mapname", "", CVAR_SERVERINFO | CVAR_ROM ); for( n = 0; n < g_numArenas; n++ ) { type = Info_ValueForKey( g_arenaInfos[n], "map" ); if (Q_stricmp(mapname.string, type) == 0) { thisLevel = n; break; } } desiredMap = thisLevel; n = thisLevel+1; while (n != thisLevel) { //now cycle through the arena list and find the next map that matches the gametype we're in if (!g_arenaInfos[n] || n >= g_numArenas) { if (loopingUp) { //this shouldn't happen, but if it does we have a null entry break in the arena file //if this is the case just break out of the loop instead of sticking in an infinite loop break; } n = 0; loopingUp = qtrue; } type = Info_ValueForKey(g_arenaInfos[n], "type"); typeBits = G_GetMapTypeBits(type); if (typeBits & (1 << gametype)) { desiredMap = n; break; } n++; } if (desiredMap == thisLevel) { //If this is the only level for this game mode or we just can't find a map for this game mode, then nextmap //will always restart. trap_Cvar_Set( "nextmap", "map_restart 0"); } else { //otherwise we have a valid nextmap to cycle to, so use it. type = Info_ValueForKey( g_arenaInfos[desiredMap], "map" ); trap_Cvar_Set( "nextmap", va2("map %s", type)); } return Info_ValueForKey( g_arenaInfos[desiredMap], "map" ); } It is required because autoMapCycle needs to be able to read the arenas which it cannot do without bot_enable activated because the arena files are not loaded on the server otherwise. Link to comment Share on other sites More sharing options...
razorace Posted August 14, 2006 Share Posted August 14, 2006 Ensiform, you seem to know more about this than I do. Does seta automatically force that cvar setting into the currently being used .cfg? Also, what does "sets" do? I've seen that used a few times. Link to comment Share on other sites More sharing options...
jedi-Guard Posted August 15, 2006 Author Share Posted August 15, 2006 Its not about the needs or no needs of the Bot_enable command. Its about getting the things the rightway to work, since there can be too many bugs as there can be too many misunderstanding talk between dedicated administrators. Thats the way it is, and thats the way its gonna be. Link to comment Share on other sites More sharing options...
ensiform Posted August 15, 2006 Share Posted August 15, 2006 Ensiform, you seem to know more about this than I do. Does seta automatically force that cvar setting into the currently being used .cfg? Also, what does "sets" do? I've seen that used a few times. Seta = Set + Archive in jampconfig.cfg (if using jamp.exe in win) or jampserver.cfg (if using jampDed) This can cause problems and has been known to in the engine since Q3 1.16. for one, MAX_CVARS is 1024, this includes any scripts for vstrs. Set = just adds the cvar to current and wont store it in another config. Sets = same as set but append CVAR_SERVERINFO. There is setu also for userinfo but you can only call this from client/ui modules. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.