ATTRIB(Gametype, m_modicons_reset, void());
#endif
+ /** DO NOT USE, this is compatibility for legacy maps! */
+ ATTRIB(Gametype, m_legacydefaults, string, "");
+
ATTRIB(Gametype, m_mutators, string);
METHOD(Gametype, m_parse_mapinfo, bool(string k, string v))
{
{
return true;
}
+ ATTRIB(Deathmatch, m_legacydefaults, string, "30 20 0");
ENDCLASS(Deathmatch)
REGISTER_GAMETYPE(DEATHMATCH, NEW(Deathmatch));
CLASS(LastManStanding, Gametype)
INIT(LastManStanding)
{
- this.gametype_init(this, _("Last Man Standing"),"lms","g_lms",false,true,"","timelimit=20 lives=9 leadlimit=0",_("Survive and kill until the enemies have no lives left"));
+ this.gametype_init(this, _("Last Man Standing"),"lms","g_lms",false,true,"","timelimit=20 lives=5 leadlimit=0",_("Survive and kill until the enemies have no lives left"));
}
METHOD(LastManStanding, m_isAlwaysSupported, bool(Gametype this, int spawnpoints, float diameter))
{
TC(Gametype, this);
returns(menu, _("Lives:"), 3, 50, 1, "g_lms_lives_override", string_null, string_null);
}
+ ATTRIB(LastManStanding, m_legacydefaults, string, "9 20 0");
ENDCLASS(LastManStanding)
REGISTER_GAMETYPE(LMS, NEW(LastManStanding));
#ifdef CSQC
ATTRIB(Race, m_modicons, void(vector pos, vector mySize), HUD_Mod_Race);
#endif
+ ATTRIB(Race, m_legacydefaults, string, "20 5 7 15 0");
ENDCLASS(Race)
REGISTER_GAMETYPE(RACE, NEW(Race));
#define g_race IS_GAMETYPE(RACE)
#ifdef CSQC
ATTRIB(RaceCTS, m_modicons, void(vector pos, vector mySize), HUD_Mod_Race);
#endif
+ ATTRIB(RaceCTS, m_legacydefaults, string, "20 0 0");
ENDCLASS(RaceCTS)
REGISTER_GAMETYPE(CTS, NEW(RaceCTS));
#define g_cts IS_GAMETYPE(CTS)
TC(Gametype, this);
returns(menu, _("Point limit:"), 5, 100, 5, "g_tdm_point_limit", "g_tdm_teams_override", _("The amount of points needed before the match will end"));
}
+ ATTRIB(TeamDeathmatch, m_legacydefaults, string, "50 20 2 0");
ENDCLASS(TeamDeathmatch)
REGISTER_GAMETYPE(TEAM_DEATHMATCH, NEW(TeamDeathmatch));
#define g_tdm IS_GAMETYPE(TEAM_DEATHMATCH)
ATTRIB(CaptureTheFlag, m_modicons, void(vector pos, vector mySize), HUD_Mod_CTF);
ATTRIB(CaptureTheFlag, m_modicons_reset, void(), HUD_Mod_CTF_Reset);
#endif
+ ATTRIB(CaptureTheFlag, m_legacydefaults, string, "300 20 10 0");
ENDCLASS(CaptureTheFlag)
REGISTER_GAMETYPE(CTF, NEW(CaptureTheFlag));
#define g_ctf IS_GAMETYPE(CTF)
CLASS(ClanArena, Gametype)
INIT(ClanArena)
{
- this.gametype_init(this, _("Clan Arena"),"ca","g_ca",true,true,"","timelimit=20 pointlimit=10 teams=2 leadlimit=0",_("Kill all enemy teammates to win the round"));
+ this.gametype_init(this, _("Clan Arena"),"ca","g_ca",true,true,"","timelimit=20 pointlimit=10 teams=2 leadlimit=6",_("Kill all enemy teammates to win the round"));
}
METHOD(ClanArena, m_parse_mapinfo, bool(string k, string v))
{
#ifdef CSQC
ATTRIB(ClanArena, m_modicons, void(vector pos, vector mySize), HUD_Mod_CA);
#endif
+ ATTRIB(ClanArena, m_legacydefaults, string, "10 20 0");
ENDCLASS(ClanArena)
REGISTER_GAMETYPE(CA, NEW(ClanArena));
#define g_ca IS_GAMETYPE(CA)
#ifdef CSQC
ATTRIB(Domination, m_modicons, void(vector pos, vector mySize), HUD_Mod_Dom);
#endif
+ ATTRIB(Domination, m_legacydefaults, string, "200 20 0");
ENDCLASS(Domination)
REGISTER_GAMETYPE(DOMINATION, NEW(Domination));
#ifdef CSQC
ATTRIB(KeyHunt, m_modicons, void(vector pos, vector mySize), HUD_Mod_KH);
#endif
+ ATTRIB(KeyHunt, m_legacydefaults, string, "1000 20 3 0");
ENDCLASS(KeyHunt)
REGISTER_GAMETYPE(KEYHUNT, NEW(KeyHunt));
TC(Gametype, this);
returns(menu, _("Point limit:"), 50, 500, 10, string_null, string_null, string_null);
}
+ ATTRIB(Assault, m_legacydefaults, string, "20 0");
ENDCLASS(Assault)
REGISTER_GAMETYPE(ASSAULT, NEW(Assault));
#define g_assault IS_GAMETYPE(ASSAULT)
TC(Gametype, this);
returns(menu, _("Point limit:"), 50, 500, 10, string_null, string_null, string_null);
}
+ ATTRIB(Onslaught, m_legacydefaults, string, "20 0");
ENDCLASS(Onslaught)
REGISTER_GAMETYPE(ONSLAUGHT, NEW(Onslaught));
#ifdef CSQC
ATTRIB(NexBall, m_modicons, void(vector pos, vector mySize), HUD_Mod_NexBall);
#endif
+ ATTRIB(NexBall, m_legacydefaults, string, "5 20 0");
ENDCLASS(NexBall)
REGISTER_GAMETYPE(NEXBALL, NEW(NexBall));
#define g_nexball IS_GAMETYPE(NEXBALL)
CLASS(FreezeTag, Gametype)
INIT(FreezeTag)
{
- this.gametype_init(this, _("Freeze Tag"),"ft","g_freezetag",true,true,"","timelimit=20 pointlimit=10 teams=2 leadlimit=0",_("Kill enemies to freeze them, stand next to frozen teammates to revive them; freeze all enemies to win"));
+ this.gametype_init(this, _("Freeze Tag"),"ft","g_freezetag",true,true,"","timelimit=20 pointlimit=10 teams=2 leadlimit=6",_("Kill enemies to freeze them, stand next to frozen teammates to revive them; freeze all enemies to win"));
}
METHOD(FreezeTag, m_parse_mapinfo, bool(string k, string v))
{
#ifdef CSQC
ATTRIB(FreezeTag, m_modicons, void(vector pos, vector mySize), HUD_Mod_CA);
#endif
+ ATTRIB(FreezeTag, m_legacydefaults, string, "10 20 0");
ENDCLASS(FreezeTag)
REGISTER_GAMETYPE(FREEZETAG, NEW(FreezeTag));
#define g_freezetag IS_GAMETYPE(FREEZETAG)
}
METHOD(Duel, m_isForcedSupported, bool(Gametype this))
{
- // force all DM maps to work in duel?!
- // TODO: we should really check the size of maps, some DM maps do not work for duel!
- if(!(MapInfo_Map_supportedGametypes & this.m_flags) && (MapInfo_Map_supportedGametypes & MAPINFO_TYPE_DEATHMATCH.m_flags))
- return true;
+ if(!cvar("g_duel_not_dm_maps"))
+ {
+ // if this is set, all DM maps support duel too
+ // TODO: we should really check the size of maps, some DM maps do not work for duel!
+ if(!(MapInfo_Map_supportedGametypes & this.m_flags) && (MapInfo_Map_supportedGametypes & MAPINFO_TYPE_DEATHMATCH.m_flags))
+ return true; // TODO: references another gametype (alternatively, we could check which gamemodes are always enabled and append this if any are supported)
+ }
return false;
}
ENDCLASS(Duel)
void MapInfo_Shutdown(); // call this in the shutdown handler
#define MAPINFO_SETTEMP_ACL_USER cvar_string("g_mapinfo_settemp_acl")
-#define MAPINFO_SETTEMP_ACL_SYSTEM "-g_mapinfo_* -rcon_* -_* -g_ban* +*"
+#define MAPINFO_SETTEMP_ACL_SYSTEM "-g_mapinfo_* -rcon_* -_* -g_ban* -r_water +*"