From: drjaska Date: Sat, 23 Oct 2021 14:09:12 +0000 (+0300) Subject: added the todo.txt in mh's folder X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3669cfbd53a308929d0fd1d005a1aa61a54ed10a;p=xonotic%2Fxonotic-data.pk3dir.git added the todo.txt in mh's folder removed lead limit removed dynamic team counts, trying to force 2 teams removed mh_teams and mh_teams_override I couldn't find anything using g_mh_not_lms_maps 0 "when this is set, LMS maps will NOT be listed in MH" so I removed it from gamemodes-server.cfg changed 4 spaces indentation to 1 tab indentation --- diff --git a/gamemodes-server.cfg b/gamemodes-server.cfg index 8dcc0a875..662f06ded 100644 --- a/gamemodes-server.cfg +++ b/gamemodes-server.cfg @@ -574,11 +574,5 @@ set g_duel_not_dm_maps 0 "when this is set, DM maps will NOT be listed in duel" // ========= set g_mh 0 "Manhunt: Hunters go in search of the runners" set g_mh_not_dm_maps 0 "when this is set, DM maps will NOT be listed in MH" -set g_mh_not_lms_maps 0 "when this is set, LMS maps will NOT be listed in MH" - -// TODO: change this? -set g_mh_teams 2 "how many teams are in team deathmatch (set by mapinfo)" set g_mh_team_spawns 0 "when 1, players spawn from the team spawnpoints of the map, if any" -set g_mh_teams_override 0 "how many teams are in manhunt" set g_mh_point_limit -1 "MH point limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)" -set g_mh_point_leadlimit -1 "MH point lead limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)" diff --git a/qcsrc/common/gamemodes/gamemode/mh/TODO.txt b/qcsrc/common/gamemodes/gamemode/mh/TODO.txt new file mode 100644 index 000000000..19745be79 --- /dev/null +++ b/qcsrc/common/gamemodes/gamemode/mh/TODO.txt @@ -0,0 +1,15 @@ +everything xd + +have players be in 2 teams +round based +support for weaponarena, by default players are weaponless +shuffle teams after every round +have players change teams upon dying +decide names for teams, runners and hunters? +mid-round joins go into hunters(?) +collision detection which kills the runner(?), check if goombastomp's or touchexplode's code is reusable +avoid players bumping into each other and losing speed regardless of team without affecting ^ +score for hunters(?) for each kill and score for runners(?) for staying alive +on-screen notification (and sound?) for getting tagged +add more TODO: notes + diff --git a/qcsrc/common/gamemodes/gamemode/mh/mh.qh b/qcsrc/common/gamemodes/gamemode/mh/mh.qh index abbb8c243..5390f9fe9 100644 --- a/qcsrc/common/gamemodes/gamemode/mh/mh.qh +++ b/qcsrc/common/gamemodes/gamemode/mh/mh.qh @@ -7,50 +7,35 @@ void HUD_Mod_MH(vector pos, vector mySize); void HUD_Mod_MH_Export(int fh); #endif CLASS(Manhunt, Gametype) - INIT(Manhunt) - { - this.gametype_init(this, _("Manhunt"),"mh","g_mh",GAMETYPE_FLAG_TEAMPLAY | GAMETYPE_FLAG_USEPOINTS | GAMETYPE_FLAG_PRIORITY,"","timelimit=15 pointlimit=10 teams=2 leadlimit=0",_("Help your team score the most frags against the enemy team")); - } - METHOD(Manhunt, m_parse_mapinfo, bool(string k, string v)) - { - if (!k) { - cvar_set("g_mh_teams", cvar_defstring("g_mh_teams")); - return true; - } - switch (k) { - case "teams": - cvar_set("g_mh_teams", v); - return true; - } - return false; - } - METHOD(Manhunt, m_isAlwaysSupported, bool(Gametype this, int spawnpoints, float diameter)) - { - if(spawnpoints >= 8 && diameter > 4096) - return true; - return false; - } - METHOD(Manhunt, m_isForcedSupported, bool(Gametype this)) - { - if(!cvar("g_mh_not_dm_maps")) - { - // if this is unset, all DM maps support MMM too - 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) - } + INIT(Manhunt) + { + this.gametype_init(this, _("Manhunt"),"mh","g_mh",GAMETYPE_FLAG_TEAMPLAY | GAMETYPE_FLAG_USEPOINTS | GAMETYPE_FLAG_PRIORITY,"","timelimit=15 pointlimit=10 teams=2 leadlimit=0",_("Help your team score the most frags against the enemy team")); + } + METHOD(Manhunt, m_isAlwaysSupported, bool(Gametype this, int spawnpoints, float diameter)) + { + if(spawnpoints >= 8 && diameter > 4096) + return true; + return false; + } + METHOD(Manhunt, m_isForcedSupported, bool(Gametype this)) + { + if(!cvar("g_mh_not_dm_maps")) + { + // if this is unset, all DM maps support MMM too + 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; - } - METHOD(Manhunt, m_setTeams, void(string sa)) - { - cvar_set("g_mh_teams", sa); - } - METHOD(Manhunt, m_configuremenu, void(Gametype this, entity menu, void(entity me, string pLabel, float pMin, float pMax, float pStep, string pCvar, string tCvar, string pTooltip) returns)) - { - TC(Gametype, this); - returns(menu, _("Point limit:"), 5, 100, 5, "g_mh_point_limit", "g_mh_teams_override", _("The amount of points needed before the match will end")); - } - ATTRIB(Manhunt, m_legacydefaults, string, "50 20 2 0"); + return false; + } + + //is g_mh_teams_override just removeable as there will only ever be 2 teams or does it need to be replaced something like 2 or "null"? + METHOD(Manhunt, m_configuremenu, void(Gametype this, entity menu, void(entity me, string pLabel, float pMin, float pMax, float pStep, string pCvar, string tCvar, string pTooltip) returns)) + { + TC(Gametype, this); + returns(menu, _("Point limit:"), 5, 100, 5, "g_mh_point_limit", "g_mh_teams_override", _("The amount of points needed before the match will end")); + } + ATTRIB(Manhunt, m_legacydefaults, string, "50 20 2 0"); ENDCLASS(Manhunt) REGISTER_GAMETYPE(MANHUNT, NEW(Manhunt)); #define g_mh IS_GAMETYPE(MANHUNT) diff --git a/qcsrc/common/gamemodes/gamemode/mh/sv_mh.qc b/qcsrc/common/gamemodes/gamemode/mh/sv_mh.qc index 65771d8cc..2479f1c67 100644 --- a/qcsrc/common/gamemodes/gamemode/mh/sv_mh.qc +++ b/qcsrc/common/gamemodes/gamemode/mh/sv_mh.qc @@ -1,9 +1,5 @@ #include "sv_mh.qh" -// TODO: change this? -int autocvar_g_mh_teams; -int autocvar_g_mh_teams_override; - spawnfunc(mh_team) { if(!g_mh || !this.cnt) { delete(this); return; } @@ -31,8 +27,7 @@ void mh_DelayedInit(entity this) { LOG_TRACE("No \"mh_team\" entities found on this map, creating them anyway."); - int numteams = autocvar_g_mh_teams_override; - if(numteams < 2) { numteams = autocvar_g_mh_teams; } + int numteams = 2; int teams = BITS(bound(2, numteams, 2)); if(teams & BIT(0)) @@ -47,7 +42,6 @@ void mh_Initialize() GameRules_teams(true); GameRules_spawning_teams(autocvar_g_mh_team_spawns); GameRules_limit_score(autocvar_g_mh_point_limit); - GameRules_limit_lead(autocvar_g_mh_point_leadlimit); InitializeEntity(NULL, mh_DelayedInit, INITPRIO_GAMETYPE); } diff --git a/qcsrc/common/gamemodes/gamemode/mh/sv_mh.qh b/qcsrc/common/gamemodes/gamemode/mh/sv_mh.qh index 4dcdafcb7..512697621 100644 --- a/qcsrc/common/gamemodes/gamemode/mh/sv_mh.qh +++ b/qcsrc/common/gamemodes/gamemode/mh/sv_mh.qh @@ -3,14 +3,13 @@ #include // TODO: change this? -int autocvar_g_mh_point_limit; -int autocvar_g_mh_point_leadlimit; +float autocvar_g_mh_point_limit; bool autocvar_g_mh_team_spawns; void mh_Initialize(); REGISTER_MUTATOR(mh, false) { - MUTATOR_STATIC(); + MUTATOR_STATIC(); MUTATOR_ONADD { mh_Initialize();