#include "gametypelist.qh"
#include "dialog_multiplayer_create.qh"
+#include <common/gamemodes/_mod.qh>
#include <common/mapinfo.qh>
entity makeXonoticGametypeList()
void XonoticGametypeList_loadCvars(entity me)
{
Gametype t = MapInfo_CurrentGametype();
+ int cnt = GameType_GetCount();
float i;
- for(i = 0; i < GameType_GetCount(); ++i)
+ for(i = 0; i < cnt; ++i)
if(t == GameType_GetID(i))
break;
- if(i >= GameType_GetCount())
+ if(i >= cnt)
{
- for(i = 0; i < GameType_GetCount(); ++i)
+ for(i = 0; i < cnt; ++i)
if(t == MAPINFO_TYPE_DEATHMATCH)
break;
- if(i >= GameType_GetCount())
+ if(i >= cnt)
i = 0;
}
me.setSelected(me, i);