float n;
me.TR(me);
- n = 6;
- me.TD(me, 1, me.columns / n, e = makeXonoticGametypeButton(1, "g_dm", "DM"));
- e0 = e;
- me.TD(me, 1, me.columns / n, e = makeXonoticGametypeButton(1, "g_lms", "LMS"));
- if(e.checked) e0 = NULL;
- me.TD(me, 1, me.columns / n, e = makeXonoticGametypeButton(1, "g_arena", "Arena"));
- if(e.checked) e0 = NULL;
- me.TD(me, 1, me.columns / n, e = makeXonoticGametypeButton(1, "g_keepaway", "Keepaway"));
- if(e.checked) e0 = NULL;
- me.TD(me, 1, me.columns / n, e = makeXonoticGametypeButton(1, "g_race", "Race"));
- if(e.checked) e0 = NULL;
- me.TD(me, 1, me.columns / n, e = makeXonoticGametypeButton(1, "g_cts", "Race CTS"));
- if(e.checked) e0 = NULL;
- me.TR(me);
- n = 9;
- me.TD(me, 1, me.columns / n, e = makeXonoticGametypeButton(1, "g_tdm", "TDM"));
- if(e.checked) e0 = NULL;
- me.TD(me, 1, me.columns / n, e = makeXonoticGametypeButton(1, "g_ctf", "CTF"));
- if(e.checked) e0 = NULL;
- me.TD(me, 1, me.columns / n, e = makeXonoticGametypeButton(1, "g_ca", "CA"));
- if(e.checked) e0 = NULL;
- me.TD(me, 1, me.columns / n, e = makeXonoticGametypeButton(1, "g_freezetag", "Freeze Tag"));
- if(e.checked) e0 = NULL;
- me.TD(me, 1, me.columns / n, e = makeXonoticGametypeButton(1, "g_domination", "Domination"));
- if(e.checked) e0 = NULL;
- me.TD(me, 1, me.columns / n, e = makeXonoticGametypeButton(1, "g_keyhunt", "Key Hunt"));
- if(e.checked) e0 = NULL;
- me.TD(me, 1, me.columns / n, e = makeXonoticGametypeButton(1, "g_assault", "Assault"));
- if(e.checked) e0 = NULL;
- me.TD(me, 1, me.columns / n, e = makeXonoticGametypeButton(1, "g_onslaught", "Onslaught"));
- if(e.checked) e0 = NULL;
- me.TD(me, 1, me.columns / n, e = makeXonoticGametypeButton(1, "g_nexball", "Nexball"));
- if(e.checked) e0 = NULL;
- if(e0)
- {
- //print("NO CHECK\n");
- e0.setChecked(e0, 1);
- }
+ me.TD(me, 1, 3, e = makeXonoticTextLabel(0, "Game type:"));
+ me.TR(me);
+ me.TD(me, 9, 3, e = makeXonoticGametypeList());
+ me.TR(me);
+ me.TR(me);
+ me.TR(me);
+ me.TR(me);
+ me.TR(me);
+ me.TR(me);
me.TR(me);
me.TR(me);
- me.mapListBox = makeXonoticMapList();
- me.TD(me, 1, 3, e = makeXonoticTextLabel(0, "Map list:"));
- makeCallback(e, me.mapListBox, me.mapListBox.refilterCallback);
me.TR(me);
- me.TD(me, me.rows - 7, 3, me.mapListBox);
- me.gotoRC(me, me.rows - 3, 0);
- me.TDempty(me, 0.5);
- me.TD(me, 1, 1, e = makeXonoticButton("All", '0 0 0'));
- e.onClick = MapList_All;
- e.onClickEntity = me.mapListBox;
- me.TD(me, 1, 1, e = makeXonoticButton("None", '0 0 0'));
- e.onClick = MapList_None;
- e.onClickEntity = me.mapListBox;
- me.TDempty(me, 0.5);
-
- me.gotoRC(me, 3, 3.5); me.setFirstColumn(me, me.currentColumn);
me.TD(me, 1, 3, e = makeXonoticTextLabel(0, "Match settings:"));
me.TR(me);
me.sliderTimelimit = makeXonoticSlider(1.0, 60.0, 0.5, "timelimit_override");
me.TDempty(me, 0.2);
me.TD(me, 1, 2.8, e = makeXonoticSliderCheckBox(-1, 0, me.sliderFraglimit, "Use map specified default"));
me.checkboxFraglimitMapinfo = e;
- me.TR(me);
me.TR(me);
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Player slots:"));
me.TD(me, 1, 2, makeXonoticSlider(1, 32, 1, "menu_maxplayers"));
e.addValue(e, "Godlike", "10");
e.configureXonoticTextSliderValues(e);
setDependent(e, "bot_number", 0, -1);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, "Bot names:"));
- me.TD(me, 1, 0.7, e = makeXonoticInputBox(1, "bot_prefix"));
- setDependent(e, "bot_number", 0, -1);
- me.TD(me, 1, 0.6, e = makeXonoticTextLabel(0.5, "Shadow"));
- setDependent(e, "bot_number", 0, -1);
- me.TD(me, 1, 0.7, e = makeXonoticInputBox(1, "bot_suffix"));
- setDependent(e, "bot_number", 0, -1);
- me.TR(me);
- me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Map voting:"));
- me.TD(me, 1, 2, e = makeXonoticTextSlider("g_maplist_votable"));
- e.addValue(e, "No voting", "0");
- e.addValue(e, "2 choices", "2");
- e.addValue(e, "3 choices", "3");
- e.addValue(e, "4 choices", "4");
- e.addValue(e, "5 choices", "5");
- e.addValue(e, "6 choices", "6");
- e.addValue(e, "7 choices", "7");
- e.addValue(e, "8 choices", "8");
- e.addValue(e, "9 choices", "9");
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(0.5, 0, "sv_vote_simple_majority_factor", "Simple majority wins vcall"));
me.TR(me);
me.TR(me);
me.TDempty(me, 0.5);
e0.textEntity = main.mutatorsDialog;
e0.allowCut = 1;
+ me.gotoRC(me, 0, 3.5); me.setFirstColumn(me, me.currentColumn);
+ me.mapListBox = makeXonoticMapList();
+ me.TD(me, 1, 3, e = makeXonoticTextLabel(0, "Map list:"));
+ makeCallback(e, me.mapListBox, me.mapListBox.refilterCallback);
+ me.TR(me);
+ me.TD(me, me.rows - 4, 3, me.mapListBox);
+ me.gotoRC(me, me.rows - 3, 3.5);
+ me.TDempty(me, 0.5);
+ me.TD(me, 1, 1, e = makeXonoticButton("All", '0 0 0'));
+ e.onClick = MapList_All;
+ e.onClickEntity = me.mapListBox;
+ me.TD(me, 1, 1, e = makeXonoticButton("None", '0 0 0'));
+ e.onClick = MapList_None;
+ e.onClickEntity = me.mapListBox;
+ me.TDempty(me, 0.5);
+
me.gotoRC(me, me.rows - 1, 0);
me.TD(me, 1, me.columns, e = makeXonoticButton("Start Multiplayer!", '0 0 0'));
e.onClick = MapList_LoadMap;
ATTRIB(XonoticAdvancedDialog, title, string, "Advanced server settings")
ATTRIB(XonoticAdvancedDialog, color, vector, SKINCOLOR_DIALOG_ADVANCED)
ATTRIB(XonoticAdvancedDialog, intendedWidth, float, 0.5)
- ATTRIB(XonoticAdvancedDialog, rows, float, 14)
+ ATTRIB(XonoticAdvancedDialog, rows, float, 17)
ATTRIB(XonoticAdvancedDialog, columns, float, 3)
ATTRIB(XonoticAdvancedDialog, refilterEntity, entity, NULL)
ENDCLASS(XonoticAdvancedDialog)
e.addValue(e, "3 teams", "3");
e.addValue(e, "4 teams", "4");
e.configureXonoticTextSliderValues(e);
+ me.TR(me);
+ me.TR(me);
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Map voting:"));
+ me.TD(me, 1, 2, e = makeXonoticTextSlider("g_maplist_votable"));
+ e.addValue(e, "No voting", "0");
+ e.addValue(e, "2 choices", "2");
+ e.addValue(e, "3 choices", "3");
+ e.addValue(e, "4 choices", "4");
+ e.addValue(e, "5 choices", "5");
+ e.addValue(e, "6 choices", "6");
+ e.addValue(e, "7 choices", "7");
+ e.addValue(e, "8 choices", "8");
+ e.addValue(e, "9 choices", "9");
+ e.configureXonoticTextSliderValues(e);
+ me.TR(me);
+ me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(0.5, 0, "sv_vote_simple_majority_factor", "Simple majority wins vcall"));
me.gotoRC(me, me.rows - 1, 0);
me.TD(me, 1, me.columns, e = makeXonoticButton("OK", '0 0 0'));
#ifdef IMPLEMENTATION
#define GAMETYPES \
- GAMETYPE(MAPINFO_TYPE_DEATHMATCH, "Deathmatch") \
- GAMETYPE(MAPINFO_TYPE_LMS, "LMS") \
GAMETYPE(MAPINFO_TYPE_ARENA, "Arena") \
- GAMETYPE(MAPINFO_TYPE_RUNEMATCH, "Runematch") \
- GAMETYPE(MAPINFO_TYPE_RACE, "Race") \
- GAMETYPE(MAPINFO_TYPE_CTS, "Race CTS") \
- GAMETYPE(MAPINFO_TYPE_TEAM_DEATHMATCH, "TDM") \
- GAMETYPE(MAPINFO_TYPE_CTF, "CTF") \
+ GAMETYPE(MAPINFO_TYPE_ASSAULT, "Assault") \
+ GAMETYPE(MAPINFO_TYPE_CTF, "Capture The Flag") \
GAMETYPE(MAPINFO_TYPE_CA, "Clan Arena") \
+ GAMETYPE(MAPINFO_TYPE_DEATHMATCH, "Deathmatch") \
GAMETYPE(MAPINFO_TYPE_DOMINATION, "Domination") \
- GAMETYPE(MAPINFO_TYPE_KEYHUNT, "Key Hunt") \
- GAMETYPE(MAPINFO_TYPE_ASSAULT, "Assault") \
- GAMETYPE(MAPINFO_TYPE_ONSLAUGHT, "Onslaught") \
- GAMETYPE(MAPINFO_TYPE_NEXBALL, "Nexball") \
GAMETYPE(MAPINFO_TYPE_FREEZETAG, "Freeze Tag") \
GAMETYPE(MAPINFO_TYPE_KEEPAWAY, "Keepaway") \
+ GAMETYPE(MAPINFO_TYPE_KEYHUNT, "Key Hunt") \
+ GAMETYPE(MAPINFO_TYPE_LMS, "Last Man Standing") \
+ GAMETYPE(MAPINFO_TYPE_NEXBALL, "Nexball") \
+ GAMETYPE(MAPINFO_TYPE_ONSLAUGHT, "Onslaught") \
+ GAMETYPE(MAPINFO_TYPE_RACE, "Race") \
+ GAMETYPE(MAPINFO_TYPE_CTS, "Race CTS") \
+ GAMETYPE(MAPINFO_TYPE_RUNEMATCH, "Runematch") \
+ GAMETYPE(MAPINFO_TYPE_TEAM_DEATHMATCH, "Team Deathmatch") \
/* nothing */
float GameType_GetID(float cnt)
void XonoticGametypeList_loadCvars(entity me)
{
- if not(me.cvarName)
- return;
-
float t;
t = MapInfo_CurrentGametype();
float i;
if(t == GameType_GetID(i))
break;
if(i >= GameType_GetCount())
- i = 0;
+ {
+ for(i = 0; i < GameType_GetCount(); ++i)
+ if(t == MAPINFO_TYPE_DEATHMATCH)
+ break;
+ if(i >= GameType_GetCount())
+ i = 0;
+ }
me.setSelected(me, i);
// do we need this: me.parent.gameTypeChangeNotify(me.parent); // to make sure
}