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");
117 while(!
fexists(sprintf(
"maps/%s.waypoints", s)));
129 pmin = pstep *
ceil(pmin / pstep);
130 pmax = pstep *
floor(pmax / pstep);
131 float p = pmin + pstep *
floor(
random() * ((pmax - pmin) / pstep + 1));
143 entity e, btnPrev, btnNext, lblTitle;
146 me.TDempty(me, (me.columns - 3) * 0.5);
149 e.onClickEntity =
NULL;
159 btnPrev.onClickEntity = me.campaignBox;
161 btnNext.onClickEntity = me.campaignBox;
162 me.campaignBox.buttonNext = btnNext;
163 me.campaignBox.buttonPrev = btnPrev;
164 me.campaignBox.labelTitle = lblTitle;
166 me.gotoRC(me, me.rows - 2, 0);
172 me.TDempty(me, me.columns * 1/13);
174 me.TDempty(me, me.columns * 1/13);
175 me.TD(me, 1, me.columns * 5/13, e =
makeXonoticButton(_(
"Play campaign!"),
'0 0 0'));
177 e.onClickEntity = me.campaignBox;
entity makeXonoticTextLabel(float theAlign, string theText)
entity makeXonoticHeaderLabel(string theText)