// team keepaway
// ===============
set g_tka 0 "another game mode which focuses around a ball"
-set g_tka_on_dm_maps 0 "when this is set, all DM and KA maps automatically support TKA"
+set g_tka_on_ka_maps 1 "when this is set, all KA maps automatically support TKA"
+set g_tka_on_tdm_maps 0 "when this is set, all TDM maps automatically support TKA"
set g_tka_teams 2 "how many teams are in team keepaway (set by mapinfo)"
set g_tka_team_spawns 0 "when 1, players spawn from the team spawnpoints of the map, if any"
set g_tka_teams_override 0 "how many teams are in team keepaway"
}
METHOD(TeamKeepaway, m_isForcedSupported, bool(Gametype this))
{
- if(cvar("g_tka_on_dm_maps"))
+ if(cvar("g_tka_on_ka_maps"))
{
- // if this is set, all DM and KA maps support TKA too
- if(!(MapInfo_Map_supportedGametypes & this.m_flags) && ((MapInfo_Map_supportedGametypes & MAPINFO_TYPE_DEATHMATCH.m_flags) || (MapInfo_Map_supportedGametypes & MAPINFO_TYPE_KEEPAWAY.m_flags)))
+ // if this is set, all KA maps support TKA too
+ if(!(MapInfo_Map_supportedGametypes & this.m_flags) && (MapInfo_Map_supportedGametypes & MAPINFO_TYPE_KEEPAWAY.m_flags))
+ return true; // TODO: references another gametype (alternatively, we could check which gamemodes are always enabled and append this if any are supported)
+ }
+ if(cvar("g_tka_on_tdm_maps"))
+ {
+ // if this is set, all TDM maps support TKA too
+ if(!(MapInfo_Map_supportedGametypes & this.m_flags) && (MapInfo_Map_supportedGametypes & MAPINFO_TYPE_TEAM_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;
BADCVAR("g_tdm_on_dm_maps");
BADCVAR("g_tdm_teams");
BADCVAR("g_tka");
- BADCVAR("g_tka_on_dm_maps");
+ BADCVAR("g_tka_on_ka_maps");
+ BADCVAR("g_tka_on_tdm_maps");
BADCVAR("g_tka_teams");
BADCVAR("g_vip");
BADCVAR("leadlimit");