75 string checkwp_msg =
strcat(
"checkwp ", map);
81 LOG_TRACE(checkwp_msg,
": has waypoints");
91 string checksize_msg =
strcat(
"MapHasRightSize ", map);
97 pcount -=
rint(
cvar(
"g_maplist_sizes_specparty") * pcount);
105 LOG_TRACE(checksize_msg,
": not enough");
113 LOG_TRACE(checksize_msg,
": right size");
119 return strcat(
"maps/", m,
".bsp");
155 LOG_DEBUG(
"Couldn't select '", filename,
"'..." );
165 if(nextmapname ==
"")
190 LOG_TRACE(
"Trying MaplistMethod_Iterate");
201 LOG_DEBUG(
"MaplistMethod_Iterate: Couldn't find a suitable map, falling back to next valid");
213 LOG_TRACE(
"Trying MaplistMethod_Repeat");
224 LOG_TRACE(
"Trying MaplistMethod_Random");
228 for(i = 0; i <= imax; ++i)
241 bool have_maps =
false;
245 bool needtrim =
false;
266 string newmaplist =
"";
274 newmaplist =
cons(newmaplist, it);
277 LOG_DEBUGF(
"Maplist_Init: trimmed %d missing maps from the list", trimmedmaps);
283 bprint(
"Maplist contains no usable maps! Resetting it to default map list.\n" );
310 error(
"empty maplist, cannot select a new map");
400 localcmd(
"set lastlevel 0\ntogglemenu 1\n");
420 error(
"Everything is broken - cannot find a next map. Please report this to the developers.");
428 return "The map you suggested is not available on this server.";
431 return "The map you suggested does not support the current gametype.";
439 return "Map switch initiated.";
441 return "Hm... no. For some reason I like THIS map more.";
444 return "Map switch will happen after scoreboard.";
461 float client_screenshot = (
CS_CVAR(
this).cvar_cl_autoscreenshot == 2);
463 if( (server_screenshot || client_screenshot)
483 "alias cl_autoscreenshot_screenshot_s \"screenshot screenshots/autoscreenshot/%s-%s.jpg\";"
487 stuffcmd(
this, sprintf(
"\ncl_autoscreenshot_screenshot %s %s;"
488 "echo \"^5A screenshot has been taken at request of the server.\"\n",
GetMapname(),
matchid));
492 "cl_autoscreenshot_screenshot_s %s %s;"
493 "unset cl_autoscreenshot_screenshot;"
494 "unalias cl_autoscreenshot_screenshot_s;");
511 if(!e.autoscreenshot)
513 e.autoscreenshot =
time + 0.1;
521 if (e.(weaponentity).weaponchild)
527 stuffcmd(e,
"\nscr_printspeed 1000000\n");
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
bool SetResourceExplicit(entity e, Resource res_type, float amount)
Sets the resource amount of an entity without calling any hooks.
#define PHYS_INPUT_BUTTON_JUMP(s)
#define PHYS_INPUT_BUTTON_HOOK(s)
#define PHYS_INPUT_BUTTON_USE(s)
#define PHYS_INPUT_BUTTON_ATCK(s)
#define PHYS_INPUT_BUTTON_ATCK2(s)
int cvar_settemp_restore()
int autocvar_minplayers_per_team
#define pass(name, colormin, colormax)
ERASEABLE bool fexists(string f)
string Map_Filename(string m)
void Set_NextMap(string mapname)
void Map_Goto_SetIndex(int position)
void FixIntermissionClient(entity e)
void IntermissionThink(entity this)
bool MapHasRightSize(string map)
void Map_Goto_SetStr(string nextmapname)
int MaplistMethod_Iterate(void)
bool Map_IsRecent(string m)
int MaplistMethod_Random(void)
bool Map_Check(string m, int pass)
int MaplistMethod_Repeat(void)
void Map_Goto(float reinit)
float DoNextMapOverride(float reinit)
void Send_NextMap_To_Player(entity pl)
void Map_MarkAsRecent(string m)
void GotoNextMap(float reinit)
string autocvar_sv_intermission_cdtrack
bool intermission_running
float intermission_exittime
bool autocvar_sv_autoscreenshot
#define FOREACH_WORD(words, cond, body)
bool MapReadSizes(string map)
float MapInfo_CheckMap(string s)
int MapInfo_RequiredFlags()
string MapInfo_Type_ToString(Gametype t)
void MapInfo_LoadMap(string s, float reinit)
Gametype MapInfo_CurrentGametype()
int MapInfo_ForbiddenFlags()
string MapInfo_ListAllowedMaps(Gametype type, float pRequiredFlags, float pForbiddenFlags)
float _MapInfo_GetTeamPlayBool(Gametype t)
Gametype MapInfo_LoadedGametype
const int MAPINFO_FLAG_DONOTWANT
strcat(_("^F4Countdown stopped!"), "\n^BG", _("Teams are too unbalanced."))
ERASEABLE void RandomSelection_Init()
string RandomSelection_chosen_string
#define RandomSelection_AddString(s, weight, priority)
void CampaignPostIntermission()
string GameTypeVote_MapInfo_FixName(string m)
float autocvar_g_maplist_shuffle
bool autocvar_g_maplist_check_waypoints
bool autocvar_sv_vote_gametype
int autocvar_g_maplist_index
int autocvar_g_maplist_mostrecent_count
bool autocvar_g_maplist_sizes_count_maxplayers
bool autocvar_g_maplist_ignore_sizes
bool autocvar_g_maplist_sizes_count_bots
#define autocvar_g_maplist
float mapvote_initialized
string autocvar_g_maplist_mostrecent
bool autocvar_g_maplist_selectrandom
ERASEABLE string strwords(string s, int w)
ERASEABLE string cons(string a, string b)
#define IS_REAL_CLIENT(v)
#define FOREACH_CLIENT(cond, body)
const int MAX_WEAPONSLOTS
entity weaponentities[MAX_WEAPONSLOTS]
string autocvar_quit_and_redirect
bool autocvar_quit_when_empty
bool autocvar_sv_dedicated
string redirection_target