13 float pmin = 2, pmax = 16, pstep = 1;
15 cvar_set(
"timelimit_override",
"10");
17 bool check_probability_distribution =
true;
21 if (!check_probability_distribution)
31 else if((r -= 0.25) < 0)
38 else if((r -= 0.15) < 0)
45 else if((r -= 0.10) < 0)
52 else if((r -= 0.10) < 0)
59 else if((r -= 0.05) < 0)
70 if (check_probability_distribution)
73 error(
"Incorrect probability distribution.");
74 check_probability_distribution =
false;
86 cvar_set(
"timelimit_override",
"-1");
118 while(!
fexists(sprintf(
"maps/%s.waypoints", s)));
131 pmin = pstep *
ceil(pmin / pstep);
132 pmax = pstep *
floor(pmax / pstep);
133 p = pmin + pstep *
floor(
random() * ((pmax - pmin) / pstep + 1));
145 entity e, btnPrev, btnNext, lblTitle;
148 me.TDempty(me, (me.columns - 3) * 0.5);
151 e.onClickEntity =
NULL;
161 btnPrev.onClickEntity = me.campaignBox;
163 btnNext.onClickEntity = me.campaignBox;
164 me.campaignBox.buttonNext = btnNext;
165 me.campaignBox.buttonPrev = btnPrev;
166 me.campaignBox.labelTitle = lblTitle;
168 me.gotoRC(me, me.rows - 2, 0);
174 me.TDempty(me, me.columns * 1/13);
176 me.TDempty(me, me.columns * 1/13);
177 me.TD(me, 1, me.columns * 5/13, e =
makeXonoticButton(_(
"Play campaign!"),
'0 0 0'));
179 e.onClickEntity = me.campaignBox;
entity makeXonoticTextLabel(float theAlign, string theText)
entity makeXonoticHeaderLabel(string theText)