ATTRIB(Gametype, gametype_description, string);
#ifdef CSQC
ATTRIB(Gametype, m_modicons, void(vector pos, vector mySize));
+ ATTRIB(Gametype, m_modicons_reset, void());
#endif
ATTRIB(Gametype, m_mutators, string);
{
return false;
}
+ METHOD(Gametype, m_isAlwaysSupported, bool(Gametype this, int spawnpoints, float diameter))
+ {
+ return false;
+ }
METHOD(Gametype, describe, string(Gametype this))
{
{
this.gametype_init(this, _("Deathmatch"),"dm","g_dm",false,"","timelimit=20 pointlimit=30 leadlimit=0",_("Score as many frags as you can"));
}
+ METHOD(Deathmatch, m_isAlwaysSupported, bool(Gametype this, int spawnpoints, float diameter))
+ {
+ return true;
+ }
ENDCLASS(Deathmatch)
REGISTER_GAMETYPE(DEATHMATCH, NEW(Deathmatch));
{
this.gametype_init(this, _("Last Man Standing"),"lms","g_lms",false,"","timelimit=20 lives=9 leadlimit=0",_("Survive and kill until the enemies have no lives left"));
}
+ METHOD(LastManStanding, m_isAlwaysSupported, bool(Gametype this, int spawnpoints, float diameter))
+ {
+ return true;
+ }
ENDCLASS(LastManStanding)
REGISTER_GAMETYPE(LMS, NEW(LastManStanding));
if(v == "target_startTimer")
MapInfo_Map_supportedGametypes |= this.m_flags;
}
+ METHOD(RaceCTS, m_setTeams, void(string sa))
+ {
+ // this is the skill of the map
+ // not parsed by anything yet
+ // for map databases
+ // cvar_set("fraglimit", sa);
+ }
#ifdef CSQC
ATTRIB(RaceCTS, m_modicons, void(vector pos, vector mySize), HUD_Mod_Race);
#endif
}
return false;
}
+ METHOD(TeamDeathmatch, m_isAlwaysSupported, bool(Gametype this, int spawnpoints, float diameter))
+ {
+ if(spawnpoints >= 8 && diameter > 4096)
+ return true;
+ return false;
+ }
+ METHOD(TeamDeathmatch, m_setTeams, void(string sa))
+ {
+ cvar_set("g_tdm_teams", sa);
+ }
ENDCLASS(TeamDeathmatch)
REGISTER_GAMETYPE(TEAM_DEATHMATCH, NEW(TeamDeathmatch));
#define g_tdm IS_GAMETYPE(TEAM_DEATHMATCH)
#ifdef CSQC
void HUD_Mod_CTF(vector pos, vector mySize);
+void HUD_Mod_CTF_Reset();
#endif
CLASS(CaptureTheFlag, Gametype)
INIT(CaptureTheFlag)
{
return true;
}
+ METHOD(CaptureTheFlag, m_setTeams, void(string sa))
+ {
+ cvar_set("fraglimit", sa);
+ }
#ifdef CSQC
ATTRIB(CaptureTheFlag, m_modicons, void(vector pos, vector mySize), HUD_Mod_CTF);
+ ATTRIB(CaptureTheFlag, m_modicons_reset, void(), HUD_Mod_CTF_Reset);
#endif
ENDCLASS(CaptureTheFlag)
REGISTER_GAMETYPE(CTF, NEW(CaptureTheFlag));
}
return false;
}
+ METHOD(ClanArena, m_isAlwaysSupported, bool(Gametype this, int spawnpoints, float diameter))
+ {
+ if(spawnpoints >= 8 && diameter > 4096)
+ return true;
+ return false;
+ }
+ METHOD(ClanArena, m_setTeams, void(string sa))
+ {
+ cvar_set("g_ca_teams", sa);
+ }
#ifdef CSQC
ATTRIB(ClanArena, m_modicons, void(vector pos, vector mySize), HUD_Mod_CA);
#endif
}
return false;
}
- METHOD(KeyHunt, m_modicons, void(vector pos, vector mySize))
+ METHOD(KeyHunt, m_isAlwaysSupported, bool(Gametype this, int spawnpoints, float diameter))
+ {
+ if(spawnpoints >= 12 && diameter > 5120)
+ return true;
+ return false;
+ }
+ METHOD(KeyHunt, m_setTeams, void(string sa))
{
- #ifdef CSQC
- HUD_Mod_KH(pos, mySize);
- #endif
+ cvar_set("g_keyhunt_teams", sa);
}
#ifdef CSQC
ATTRIB(KeyHunt, m_modicons, void(vector pos, vector mySize), HUD_Mod_KH);
}
return false;
}
+ METHOD(FreezeTag, m_isAlwaysSupported, bool(Gametype this, int spawnpoints, float diameter))
+ {
+ if(spawnpoints >= 8 && diameter > 4096)
+ return true;
+ return false;
+ }
+ METHOD(FreezeTag, m_setTeams, void(string sa))
+ {
+ cvar_set("g_freezetag_teams", sa);
+ }
#ifdef CSQC
ATTRIB(FreezeTag, m_modicons, void(vector pos, vector mySize), HUD_Mod_CA);
#endif
{
this.gametype_init(this, _("Keepaway"),"ka","g_keepaway",true,"","timelimit=20 pointlimit=30",_("Hold the ball to get points for kills"));
}
+ METHOD(Keepaway, m_isAlwaysSupported, bool(Gametype this, int spawnpoints, float diameter))
+ {
+ return true;
+ }
#ifdef CSQC
ATTRIB(Keepaway, m_modicons, void(vector pos, vector mySize), HUD_Mod_Keepaway);
#endif