11 float pmin = 2, pmax = 16, pstep = 1;
13 cvar_set(
"timelimit_override",
"10");
15 bool check_probability_distribution =
true;
19 if (!check_probability_distribution)
29 else if((r -= 0.25) < 0)
36 else if((r -= 0.15) < 0)
43 else if((r -= 0.10) < 0)
50 else if((r -= 0.10) < 0)
57 else if((r -= 0.05) < 0)
68 if (check_probability_distribution)
71 error(
"Incorrect probability distribution.");
72 check_probability_distribution =
false;
84 cvar_set(
"timelimit_override",
"-1");
116 while(!
fexists(sprintf(
"maps/%s.waypoints", s)));
127 pmin = pstep *
ceil(pmin / pstep);
128 pmax = pstep *
floor(pmax / pstep);
129 p = pmin + pstep *
floor(
random() * ((pmax - pmin) / pstep + 1));
141 entity e, btnPrev, btnNext, lblTitle;
144 me.TDempty(me, (me.columns - 3) / 2);
145 me.TD(me, 2, 3, e =
makeXonoticBigButton(_(
"Instant action! (random map with bots)"),
'0 0 0'));
147 e.onClickEntity =
NULL;
157 btnPrev.onClickEntity = me.campaignBox;
159 btnNext.onClickEntity = me.campaignBox;
160 me.campaignBox.buttonNext = btnNext;
161 me.campaignBox.buttonPrev = btnPrev;
162 me.campaignBox.labelTitle = lblTitle;
164 me.gotoRC(me, me.rows - 2, 0);
170 me.TD(me, 1, me.columns, e =
makeXonoticButton(_(
"Start Singleplayer!"),
'0 0 0'));
172 e.onClickEntity = me.campaignBox;
int MapInfo_RequiredFlags()
entity makeXonoticTextLabel(float theAlign, string theText)
int MapInfo_ForbiddenFlags()
Gametype MapInfo_CurrentGametype()
int MapInfo_CurrentFeatures()
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"))
void InstantAction_LoadMap(entity btn, entity dummy)
void MapInfo_LoadMap(string s, float reinit)
float MapInfo_FilterGametype(Gametype pGametype, int pFeatures, int pFlagsRequired, int pFlagsForbidden, bool pAbortOnGenerate)
ERASEABLE bool fexists(string f)
string MapInfo_BSPName_ByID(float i)
void MapInfo_SwitchGameType(Gametype t)
void XonoticSingleplayerDialog_fill(entity me)