61 string checkwp_msg =
strcat(
"checkwp ", map);
67 LOG_TRACE(checkwp_msg,
": has waypoints");
74 string opensize_msg =
strcat(
"opensize ", map);
82 opensize_msg =
strcat(opensize_msg,
": ok, ");
91 if(mapmax && pcount > mapmax)
105 return strcat(
"maps/",
argv(position),
".bsp");
122 map_next =
argv(position);
138 LOG_DEBUG(
"Couldn't select '", filename,
"'..." );
147 if(nextmapname ==
"")
171 LOG_TRACE(
"Trying MaplistMethod_Iterate");
173 for(pass = 1; pass <= 2; ++
pass)
188 LOG_TRACE(
"Trying MaplistMethod_Repeat");
199 LOG_TRACE(
"Trying MaplistMethod_Random");
203 for(i = 0; i <= imax; ++i)
217 float i, j, imax, insertpos;
219 LOG_TRACE(
"Trying MaplistMethod_Shuffle");
223 for(i = 0; i <= imax; ++i)
228 insertpos = (
random() ** (1 / exponent));
230 insertpos =
ceil(insertpos) + 1;
235 for(j = 1; j < insertpos; ++j)
267 bprint(
"Maplist contains no usable maps! Resetting it to default map list.\n" );
276 error(
"empty maplist, cannot select a new map");
366 localcmd(
"set lastlevel 0\ntogglemenu 1\n");
384 error(
"Everything is broken - cannot find a next map. Please report this to the developers.");
397 return "The map you suggested is not available on this server.";
400 return "The map you suggested does not support the current game mode.";
406 return "Map switch initiated.";
408 return "Hm... no. For some reason I like THIS map more.";
411 return "Map switch will happen after scoreboard.";
428 float client_screenshot = (
CS_CVAR(
this).cvar_cl_autoscreenshot == 2);
430 if( (server_screenshot || client_screenshot)
437 stuffcmd(
this, sprintf(
"\nscreenshot screenshots/autoscreenshot/%s-%s.jpg; " 438 "echo \"^5A screenshot has been taken at request of the server.\"\n",
GetMapname(), num));
455 if(!e.autoscreenshot)
457 e.autoscreenshot =
time + 0.8;
465 if (e.(weaponentity).weaponchild)
466 e.(weaponentity).weaponchild.effects =
EF_NODRAW;
471 stuffcmd(e,
"\nscr_printspeed 1000000\n");
#define PHYS_INPUT_BUTTON_ATCK2(s)
string MapInfo_Type_ToString(Gametype t)
#define PHYS_INPUT_BUTTON_JUMP(s)
int MapInfo_RequiredFlags()
string RandomSelection_chosen_string
float intermission_exittime
bool SetResourceExplicit(entity e, Resource res_type, float amount)
Sets the resource amount of an entity without calling any hooks.
#define PHYS_INPUT_BUTTON_HOOK(s)
string Map_Filename(int position)
void GotoNextMap(float reinit)
float MaplistMethod_Repeat()
float MaplistMethod_Random()
ERASEABLE void RandomSelection_Init()
string autocvar_g_maplist_mostrecent
Gametype MapInfo_LoadedGametype
string MapInfo_ListAllAllowedMaps(float pRequiredFlags, float pForbiddenFlags)
#define RandomSelection_AddString(s, weight, priority)
bool autocvar_quit_when_empty
int MapInfo_ForbiddenFlags()
ERASEABLE string shufflewords(string str)
void Map_Goto_SetStr(string nextmapname)
bool MapHasRightSize(string map)
string GameTypeVote_MapInfo_FixName(string m)
#define FOREACH_WORD(words, cond, body)
int autocvar_g_maplist_index
#define IS_REAL_CLIENT(v)
void IntermissionThink(entity this)
string redirection_target
void Map_Goto(float reinit)
float MaplistMethod_Shuffle(float exponent)
void Map_MarkAsRecent(string m)
bool Map_Check(int position, float pass)
bool autocvar_g_maplist_selectrandom
#define autocvar_g_maplist
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))
const int MAX_WEAPONSLOTS
void CampaignPostIntermission()
#define PHYS_INPUT_BUTTON_USE(s)
bool autocvar_sv_autoscreenshot
float DoNextMapOverride(float reinit)
#define PHYS_INPUT_BUTTON_ATCK(s)
float MapInfo_CheckMap(string s)
bool autocvar_g_maplist_check_waypoints
bool Map_IsRecent(string m)
void FixIntermissionClient(entity e)
#define tokenizebyseparator
entity weaponentities[MAX_WEAPONSLOTS]
float MaplistMethod_Iterate()
float autocvar_g_maplist_shuffle
float mapvote_initialized
ERASEABLE string strwords(string s, int w)
ERASEABLE string cons(string a, string b)
int autocvar_minplayers_per_team
int cvar_settemp_restore()
bool autocvar_g_maplist_ignore_sizes
bool autocvar_g_maplist_sizes_count_bots
void Map_Goto_SetFloat(float position)
string autocvar_quit_and_redirect
void MapInfo_LoadMap(string s, float reinit)
#define pass(name, colormin, colormax)
ERASEABLE bool fexists(string f)
string autocvar_sv_intermission_cdtrack
ERASEABLE string strftime_s()
bool autocvar_g_maplist_sizes_count_maxplayers
const int MAPINFO_FLAG_NOAUTOMAPLIST
int autocvar_g_maplist_mostrecent_count
bool autocvar_sv_vote_gametype