]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into LegendaryGuard/bai_mod and deleted Survival gamemode
authorLegendaryGuard <rootuser999@gmail.com>
Thu, 15 Apr 2021 09:36:54 +0000 (11:36 +0200)
committerLegendaryGuard <rootuser999@gmail.com>
Thu, 15 Apr 2021 09:36:54 +0000 (11:36 +0200)
28 files changed:
gamemodes-client.cfg
gamemodes-server.cfg
gfx/menu/luma/gametype_sv.tga [deleted file]
gfx/menu/luminos/gametype_sv.tga [deleted file]
gfx/menu/wickedx/gametype_sv.tga [deleted file]
gfx/menu/xaw/gametype_sv.tga [deleted file]
notifications.cfg
qcsrc/common/ent_cs.qc
qcsrc/common/gamemodes/gamemode/_mod.inc
qcsrc/common/gamemodes/gamemode/_mod.qh
qcsrc/common/gamemodes/gamemode/clanarena/sv_clanarena.qc
qcsrc/common/gamemodes/gamemode/clanarena/sv_clanarena.qh
qcsrc/common/gamemodes/gamemode/freezetag/sv_freezetag.qc
qcsrc/common/gamemodes/gamemode/freezetag/sv_freezetag.qh
qcsrc/common/gamemodes/gamemode/survival/_mod.inc [deleted file]
qcsrc/common/gamemodes/gamemode/survival/_mod.qh [deleted file]
qcsrc/common/gamemodes/gamemode/survival/cl_survival.qc [deleted file]
qcsrc/common/gamemodes/gamemode/survival/cl_survival.qh [deleted file]
qcsrc/common/gamemodes/gamemode/survival/survival.qc [deleted file]
qcsrc/common/gamemodes/gamemode/survival/survival.qh [deleted file]
qcsrc/common/gamemodes/gamemode/survival/sv_survival.qc [deleted file]
qcsrc/common/gamemodes/gamemode/survival/sv_survival.qh [deleted file]
qcsrc/common/notifications/all.inc
qcsrc/common/notifications/all.qh
qcsrc/common/stats.qh
qcsrc/menu/xonotic/util.qc
qcsrc/server/round_handler.qc
qcsrc/server/weapons/accuracy.qh

index 4bd648f674d840cb7073050ae3bc8f6eb868cea6..dc56f6b3adfaaf8186109bafa7622da5d5a8c5d8 100644 (file)
@@ -32,7 +32,6 @@ alias cl_hook_gamestart_ka
 alias cl_hook_gamestart_ft
 alias cl_hook_gamestart_inv
 alias cl_hook_gamestart_duel
-alias cl_hook_gamestart_sv //LegendGuard adds survival client hook from Mario/survival 15-02-2021
 alias cl_hook_gamestart_tka //LegendGuard adds team keepaway client hook from Mario/team_keepaway 15-02-2021
 alias cl_hook_gameend "rpn /cl_matchcount dup load 1 + =" // increase match count every time a game ends
 alias cl_hook_shutdown
index 4a39bfe4961e9b9ff9f7ff2e3e6c53b5bd981d48..7418c5f8d27e7684c41e223112bcc6a2031a2db8 100644 (file)
@@ -29,7 +29,6 @@ alias sv_hook_gamestart_ka
 alias sv_hook_gamestart_ft
 alias sv_hook_gamestart_inv
 alias sv_hook_gamestart_duel
-alias sv_hook_gamestart_sv //LegendGuard adds survival hook from Mario/survival 15-02-2021
 // there is currently no hook for when the match is restarted
 // see sv_hook_readyrestart for previous uses of this hook
 //alias sv_hook_gamerestart
@@ -59,7 +58,6 @@ alias sv_vote_gametype_hook_ons
 alias sv_vote_gametype_hook_rc
 alias sv_vote_gametype_hook_tdm
 alias sv_vote_gametype_hook_duel
-alias sv_vote_gametype_hook_sv //LegendGuard adds survival hook from Mario/survival 15-02-2021
 alias sv_hook_gamestart_tka //LegendGuard adds team keepaway hook from Mario/team_keepaway 15-02-2021
 
 // Example preset to allow 1v1ctf to be used for the gametype voting screen.
@@ -211,13 +209,6 @@ set g_duel_respawn_delay_large_count 0
 set g_duel_respawn_delay_max 0
 set g_duel_respawn_waves 0
 set g_duel_weapon_stay 0
-set g_sv_respawn_delay_small 0 //LegendGuard adds survival cvars from Mario/survival 15-02-2021
-set g_sv_respawn_delay_small_count 0
-set g_sv_respawn_delay_large 0
-set g_sv_respawn_delay_large_count 0
-set g_sv_respawn_delay_max 0
-set g_sv_respawn_waves 0
-set g_sv_weapon_stay 0
 set g_tka_respawn_delay_small 0 //LegendGuard adds team keepaway cvars from Mario/team_keepaway 15-02-2021
 set g_tka_respawn_delay_small_count 0
 set g_tka_respawn_delay_large 0
@@ -575,18 +566,6 @@ set g_duel 0 "Duel: frag the opponent more in a one versus one arena battle"
 set g_duel_with_powerups 0 "Enable powerups to spawn in the duel gamemode"
 set g_duel_not_dm_maps 0 "when this is set, DM maps will NOT be listed in duel"
 
-//LegendGuard adds survival cvars from Mario/survival 15-02-2021
-// ==========
-//  survival
-// ==========
-set g_survival 0 "Survival: identify and eliminate all the hunters before all your allies are gone"
-set g_survival_not_lms_maps 0 "when this is set, LMS maps will NOT be listed in survival"
-set g_survival_hunter_count 0.25 "number of players who will become hunters, set between 0 and 0.9 to use a multiplier of the current players, or 1 and above to specify an exact number of players"
-set g_survival_punish_teamkill 1 "kill the player when they kill an ally"
-set g_survival_reward_survival 1 "give a point to all surviving players if the round timelimit is reached, in addition to the points given for kills"
-set g_survival_warmup 10 "how long the players will have time to run around the map before the round starts"
-set g_survival_round_timelimit 180 "round time limit in seconds"
-
 //LegendGuard adds tema keepaway cvars from Mario/team_keepaway 15-02-2021
 // ===============
 //  team keepaway
diff --git a/gfx/menu/luma/gametype_sv.tga b/gfx/menu/luma/gametype_sv.tga
deleted file mode 100644 (file)
index 050fb7b..0000000
Binary files a/gfx/menu/luma/gametype_sv.tga and /dev/null differ
diff --git a/gfx/menu/luminos/gametype_sv.tga b/gfx/menu/luminos/gametype_sv.tga
deleted file mode 100644 (file)
index c548665..0000000
Binary files a/gfx/menu/luminos/gametype_sv.tga and /dev/null differ
diff --git a/gfx/menu/wickedx/gametype_sv.tga b/gfx/menu/wickedx/gametype_sv.tga
deleted file mode 100644 (file)
index c548665..0000000
Binary files a/gfx/menu/wickedx/gametype_sv.tga and /dev/null differ
diff --git a/gfx/menu/xaw/gametype_sv.tga b/gfx/menu/xaw/gametype_sv.tga
deleted file mode 100644 (file)
index debbce0..0000000
Binary files a/gfx/menu/xaw/gametype_sv.tga and /dev/null differ
index 437050fd1a1cb2baa73f47dcff9b0d52a48c7559..8152b3e2805a511bf8923aa9d59e6149ab0eccde 100644 (file)
@@ -284,10 +284,6 @@ seta notification_INFO_SPECTATE_WARNING "1" "0 = off, 1 = print to console, 2 =
 seta notification_INFO_SUPERSPEC_MISSING_UID "2" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
 seta notification_INFO_SUPERWEAPON_PICKUP "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
 
-//LegendGuard adds survival notifications from Mario/survival 15-02-2021
-seta notification_INFO_SURVIVAL_HUNTER_WIN "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
-seta notification_INFO_SURVIVAL_SUVIVOR_WIN "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
-
 seta notification_INFO_TEAMCHANGE_LARGERTEAM "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
 seta notification_INFO_TEAMCHANGE_NOTALLOWED "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
 seta notification_INFO_VERSION_BETA "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
@@ -537,11 +533,6 @@ seta notification_CENTER_SEQUENCE_COUNTER_FEWMORE "1" "0 = off, 1 = centerprint"
 seta notification_CENTER_SUPERWEAPON_BROKEN "1" "0 = off, 1 = centerprint"
 seta notification_CENTER_SUPERWEAPON_LOST "1" "0 = off, 1 = centerprint"
 seta notification_CENTER_SUPERWEAPON_PICKUP "1" "0 = off, 1 = centerprint"
-//LegendGuard adds survival notification from Mario/survival 15-02-2021
-seta notification_CENTER_SURVIVAL_HUNTER "1" "0 = off, 1 = centerprint"
-seta notification_CENTER_SURVIVAL_HUNTER_WIN "1" "0 = off, 1 = centerprint"
-seta notification_CENTER_SURVIVAL_SURVIVOR "1" "0 = off, 1 = centerprint"
-seta notification_CENTER_SURVIVAL_SURVIVOR_WIN "1" "0 = off, 1 = centerprint"
 
 seta notification_CENTER_TEAMCHANGE_AUTO "1" "0 = off, 1 = centerprint"
 seta notification_CENTER_TEAMCHANGE "1" "0 = off, 1 = centerprint"
index 3c780890123f00d1da5794e352b7ab43ac0979df..b4e277a64e9825aca7b64028ed05d9f3ed343187 100644 (file)
@@ -166,12 +166,6 @@ ENTCS_PROP(ACTIVEWEPID, false, activewepid, activewepid, ENTCS_SET_NORMAL,
        { WriteByte(chan, ent.activewepid); },
        { ent.activewepid = ReadByte(); })
 
-//LegendGuard adds ENTCS_PROP from Mario/survival 15-02-2021
-// gamemode specific player survival status (independent of score and frags)
-ENTCS_PROP(SURVIVAL_STATUS, true, survival_status, survival_status, ENTCS_SET_NORMAL,
-       { WriteShort(chan, ent.survival_status); },
-       { ent.survival_status = ReadShort(); })
-
 
 #ifdef SVQC
 
index 19c1589b73f7bea706d4f0fc0ae3744262ff37db..87c0faefde39d5ac7110c2b5e5a6c7df1f914789 100644 (file)
@@ -15,6 +15,5 @@
 #include <common/gamemodes/gamemode/nexball/_mod.inc>
 #include <common/gamemodes/gamemode/onslaught/_mod.inc>
 #include <common/gamemodes/gamemode/race/_mod.inc>
-#include <common/gamemodes/gamemode/survival/_mod.inc> //LegendGuard adds _mod.inc from Mario/survival 15-02-2021
 #include <common/gamemodes/gamemode/tdm/_mod.inc>
 #include <common/gamemodes/gamemode/tka/_mod.inc> //LegendGuard adds _mod.inc from Mario/team_keepaway 15-02-2021
\ No newline at end of file
index 91dd1c6467badd27b441bea5c9ba01bd60efbded..54ed4a676494bd43a7f012ad7dcdfe8855ceaca1 100644 (file)
@@ -15,6 +15,5 @@
 #include <common/gamemodes/gamemode/nexball/_mod.qh>
 #include <common/gamemodes/gamemode/onslaught/_mod.qh>
 #include <common/gamemodes/gamemode/race/_mod.qh>
-#include <common/gamemodes/gamemode/survival/_mod.qh> //LegendGuard adds _mod.qh from Mario/survival 15-02-2021
 #include <common/gamemodes/gamemode/tdm/_mod.qh>
-#include <common/gamemodes/gamemode/tka/_mod.qh> //LegendGuard adds _mod.qh from Mario/team_keepaway 15-02-2021
\ No newline at end of file
+#include <common/gamemodes/gamemode/tka/_mod.qh> //LegendGuard adds _mod.qh from Mario/team_keepaway 15-02-2021
index 26219ec9246b0d5843b5c6001217025618bf4f70..bd67709f1f6aa860d61f18ad1cd7346beb179f13 100644 (file)
@@ -9,22 +9,15 @@ void CA_count_alive_players()
        for (int i = 1; i <= NUM_TEAMS; ++i)
        {
                Team_SetNumberOfAlivePlayers(Team_GetTeamFromIndex(i), 0);
-               Team_SetNumberOfPlayers(Team_GetTeamFromIndex(i), 0);
        }
-       FOREACH_CLIENT(Entity_HasValidTeam(it),
+       FOREACH_CLIENT(IS_PLAYER(it) && Entity_HasValidTeam(it),
        {
                ++total_players;
-               entity team_ = Entity_GetTeam(it);
-               
-               int num_total = Team_GetNumberOfPlayers(team_);
-               ++num_total;
-               Team_SetNumberOfPlayers(team_, num_total);
-               
-               if (IS_DEAD(it) || !IS_PLAYER(it))
+               if (IS_DEAD(it))
                {
                        continue;
                }
-               
+               entity team_ = Entity_GetTeam(it);
                int num_alive = Team_GetNumberOfAlivePlayers(team_);
                ++num_alive;
                Team_SetNumberOfAlivePlayers(team_, num_alive);
@@ -69,6 +62,7 @@ int CA_GetWinnerTeam()
 
 void nades_Clear(entity player);
 
+//z411
 entity ca_LastPlayer(float tm)
 {
        entity last_pl = NULL;
@@ -84,19 +78,16 @@ entity ca_LastPlayer(float tm)
        return last_pl;
 }
 
-
 float CA_CheckWinner()
 {
        if(round_handler_GetEndTime() > 0 && round_handler_GetEndTime() - time <= 0)
        {
                Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, CENTER_ROUND_OVER);
                Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_ROUND_OVER);
-               Send_Notification(NOTIF_ALL, NULL, MSG_ANNCE, ANNCE_ROUND_OVER);
                FOREACH_CLIENT(IS_PLAYER(it), { nades_Clear(it); });
 
                allowed_to_spawn = false;
-               if(autocvar_g_ca_round_stop)
-                       game_stopped = true;
+               game_stopped = true;
                round_handler_Init(5, autocvar_g_ca_warmup, autocvar_g_ca_round_timelimit);
                return 1;
        }
@@ -108,40 +99,36 @@ float CA_CheckWinner()
        }
 
        int winner_team = CA_GetWinnerTeam();
-       bool perfect = false;
+    bool perfect = false; //z411
        if(winner_team > 0)
        {
-               entity tm = Team_GetTeam(winner_team);
+        //z411
+        entity tm = Team_GetTeam(winner_team);
                entity last_pl = ca_LastPlayer(winner_team);
                
                if(last_pl && Team_GetNumberOfPlayers(tm) >= 3) {
                        Give_Medal(last_pl, DEFENSE);
                }
-               
+        // ----
+
                Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, APP_TEAM_NUM(winner_team, CENTER_ROUND_TEAM_WIN));
                Send_Notification(NOTIF_ALL, NULL, MSG_INFO, APP_TEAM_NUM(winner_team, INFO_ROUND_TEAM_WIN));
-               if(fragsleft > 1) Send_Notification(NOTIF_ALL, NULL, MSG_ANNCE, APP_TEAM_NUM(winner_team, ANNCE_ROUND_TEAM_WIN));
                TeamScore_AddToTeam(winner_team, ST_CA_ROUNDS, +1);
-               
-               if (Team_GetNumberOfPlayers(tm) >= 3 &&
-                       Team_GetNumberOfAlivePlayers(tm) == Team_GetNumberOfPlayers(tm))
-                               perfect = true;
        }
        else if(winner_team == -1)
        {
                Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, CENTER_ROUND_TIED);
                Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_ROUND_TIED);
-               Send_Notification(NOTIF_ALL, NULL, MSG_ANNCE, ANNCE_ROUND_TIED);
        }
 
        allowed_to_spawn = false;
-       if(autocvar_g_ca_round_stop)
-               game_stopped = true;
+       game_stopped = true;
        round_handler_Init(5, autocvar_g_ca_warmup, autocvar_g_ca_round_timelimit);
 
        FOREACH_CLIENT(IS_PLAYER(it), {
                nades_Clear(it);
                
+        //z411
                // Give perfect medal if everyone in the winner team is alive
                if(perfect && it.team == winner_team) {
                        Give_Medal(it, PERFECT);
@@ -282,12 +269,6 @@ MUTATOR_HOOKFUNCTION(ca, reset_map_players)
        return true;
 }
 
-MUTATOR_HOOKFUNCTION(ca, Scores_CountFragsRemaining)
-{
-       // announce remaining frags
-       return true;
-}
-
 MUTATOR_HOOKFUNCTION(ca, ClientConnect)
 {
        entity player = M_ARGV(0, entity);
@@ -328,10 +309,8 @@ void ca_LastPlayerForTeam_Notify(entity this)
        if (!warmup_stage && round_handler_IsActive() && round_handler_IsRoundStarted())
        {
                entity pl = ca_LastPlayerForTeam(this);
-               if (pl) {
+               if (pl)
                        Send_Notification(NOTIF_ONE, pl, MSG_CENTER, CENTER_ALONE);
-                       Send_Notification(NOTIF_ONE, pl, MSG_ANNCE, ANNCE_ALONE);
-               }
        }
 }
 
@@ -465,6 +444,12 @@ MUTATOR_HOOKFUNCTION(ca, PlayerRegen)
        return true;
 }
 
+MUTATOR_HOOKFUNCTION(ca, Scores_CountFragsRemaining)
+{
+       // announce remaining frags
+       return true;
+}
+
 MUTATOR_HOOKFUNCTION(ca, SpectateSet)
 {
        entity client = M_ARGV(0, entity);
index e614ac7d0fd7e8e424063b9b722dd1cc90d35e7b..869860f7dc258cec43c0e5d6b666aabb16f0323d 100644 (file)
@@ -8,7 +8,6 @@
 int autocvar_g_ca_point_limit;
 int autocvar_g_ca_point_leadlimit;
 float autocvar_g_ca_round_timelimit;
-bool autocvar_g_ca_round_stop;
 bool autocvar_g_ca_team_spawns;
 //int autocvar_g_ca_teams;
 int autocvar_g_ca_teams_override;
index 460a1c300e35bc1a6ecdc51f8f674f6583e2a160..f947d6565027de626b39973fb415778ca15339f3 100644 (file)
@@ -106,6 +106,7 @@ int freezetag_getWinnerTeam()
 void nades_Clear(entity);
 void nades_GiveBonus(entity player, float score);
 
+//z411
 entity freezetag_LastPlayer(float tm)
 {
        entity last_pl = NULL;
@@ -127,15 +128,12 @@ bool freezetag_CheckWinner()
        {
                Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, CENTER_ROUND_OVER);
                Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_ROUND_OVER);
-               Send_Notification(NOTIF_ALL, NULL, MSG_ANNCE, ANNCE_ROUND_OVER);
-               
                FOREACH_CLIENT(IS_PLAYER(it), {
                        it.freezetag_frozen_timeout = 0;
                        it.freezetag_revive_time = 0;
                        nades_Clear(it);
                });
-               if(autocvar_g_freezetag_round_stop)
-                       game_stopped = true;
+               game_stopped = true;
                round_handler_Init(5, autocvar_g_freezetag_warmup, autocvar_g_freezetag_round_timelimit);
                return true;
        }
@@ -148,21 +146,21 @@ bool freezetag_CheckWinner()
        int winner_team = freezetag_getWinnerTeam();
        if(winner_team > 0)
        {
-               entity last_pl = freezetag_LastPlayer(winner_team);
+        //z411
+        entity last_pl = freezetag_LastPlayer(winner_team);
                if(last_pl) {
                        Give_Medal(last_pl, DEFENSE);
                }
-       
-               Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, APP_TEAM_NUM(winner_team, CENTER_ROUND_TEAM_SCORES));
-               Send_Notification(NOTIF_ALL, NULL, MSG_INFO, APP_TEAM_NUM(winner_team, INFO_ROUND_TEAM_SCORES));
+        // ----
+
+               Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, APP_TEAM_NUM(winner_team, CENTER_ROUND_TEAM_WIN));
+               Send_Notification(NOTIF_ALL, NULL, MSG_INFO, APP_TEAM_NUM(winner_team, INFO_ROUND_TEAM_WIN));
                TeamScore_AddToTeam(winner_team, ST_FT_ROUNDS, +1);
-               if(fragsleft > 1) AnnounceScores(winner_team);
        }
        else if(winner_team == -1)
        {
                Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, CENTER_ROUND_TIED);
                Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_ROUND_TIED);
-               Send_Notification(NOTIF_ALL, NULL, MSG_ANNCE, ANNCE_ROUND_TIED);
        }
 
        FOREACH_CLIENT(IS_PLAYER(it), {
@@ -171,8 +169,7 @@ bool freezetag_CheckWinner()
                nades_Clear(it);
        });
 
-       if(autocvar_g_freezetag_round_stop)
-               game_stopped = true;
+       game_stopped = true;
        round_handler_Init(5, autocvar_g_freezetag_warmup, autocvar_g_freezetag_round_timelimit);
        return true;
 }
@@ -198,10 +195,8 @@ void freezetag_LastPlayerForTeam_Notify(entity this)
        if(round_handler_IsRoundStarted())
        {
                entity pl = freezetag_LastPlayerForTeam(this);
-               if(pl) {
+               if(pl)
                        Send_Notification(NOTIF_ONE, pl, MSG_CENTER, CENTER_ALONE);
-                       Send_Notification(NOTIF_ONE, pl, MSG_ANNCE, ANNCE_ALONE);
-               }
        }
 }
 
@@ -468,14 +463,9 @@ MUTATOR_HOOKFUNCTION(ft, reset_map_players)
 {
        FOREACH_CLIENT(IS_PLAYER(it), {
                CS(it).killcount = 0;
-               
-               if(autocvar_g_freezetag_round_respawn) {
-                       it.freezetag_frozen_timeout = -1;
-                       PutClientInServer(it);
-               } else {
-                       ResetPlayerResources(it);
-               }
-               
+               it.freezetag_revive_time = 0;
+               it.freezetag_frozen_timeout = -1;
+               PutClientInServer(it);
                it.freezetag_frozen_timeout = 0;
        });
        freezetag_count_alive_players();
@@ -492,12 +482,6 @@ MUTATOR_HOOKFUNCTION(ft, Unfreeze)
 {
        entity targ = M_ARGV(0, entity);
        targ.freezetag_frozen_time = 0;
-       
-       if(autocvar_g_freezetag_revive_respawn) {
-               targ.freezetag_frozen_timeout = -1;
-               PutClientInServer(targ);
-       }
-       
        targ.freezetag_frozen_timeout = 0;
 }
 
@@ -649,7 +633,7 @@ MUTATOR_HOOKFUNCTION(ft, PlayerPreThink, CBC_ORDER_FIRST)
                        Send_Notification(NOTIF_ONE, revivers_first, MSG_CENTER, CENTER_FREEZETAG_REVIVE, player.netname);
                        Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_FREEZETAG_REVIVED, player.netname, revivers_first.netname);
                        Give_Medal(revivers_first, ASSIST);
-                       if(autocvar_sv_eventlog)
+            if(autocvar_sv_eventlog)
                        {
                                string revivers = "";
                                for(entity it = revivers_first; it; it = it.chain)
index 00082fd618ce9c2b6afc3f29b348539020bfc6ed..4c88b20de448ebafc0d8aa6195e4da21e0404c2a 100644 (file)
@@ -8,9 +8,6 @@ int autocvar_g_freezetag_point_leadlimit;
 bool autocvar_g_freezetag_team_spawns;
 string autocvar_g_freezetag_weaponarena = "most_available";
 
-bool autocvar_g_freezetag_round_respawn;
-bool autocvar_g_freezetag_round_stop;
-
 const int ST_FT_ROUNDS = 1;
 
 void freezetag_Initialize();
@@ -46,4 +43,3 @@ float autocvar_g_freezetag_revive_speed;
 float autocvar_g_freezetag_revive_time_to_score = 1.5;
 bool autocvar_g_freezetag_revive_nade;
 float autocvar_g_freezetag_revive_nade_health;
-bool autocvar_g_freezetag_revive_respawn;
diff --git a/qcsrc/common/gamemodes/gamemode/survival/_mod.inc b/qcsrc/common/gamemodes/gamemode/survival/_mod.inc
deleted file mode 100644 (file)
index 7121d39..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-// generated file; do not modify
-#include <common/gamemodes/gamemode/survival/survival.qc>
-#ifdef CSQC
-    #include <common/gamemodes/gamemode/survival/cl_survival.qc>
-#endif
-#ifdef SVQC
-    #include <common/gamemodes/gamemode/survival/sv_survival.qc>
-#endif
diff --git a/qcsrc/common/gamemodes/gamemode/survival/_mod.qh b/qcsrc/common/gamemodes/gamemode/survival/_mod.qh
deleted file mode 100644 (file)
index 875e4d2..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-// generated file; do not modify
-#include <common/gamemodes/gamemode/survival/survival.qh>
-#ifdef CSQC
-    #include <common/gamemodes/gamemode/survival/cl_survival.qh>
-#endif
-#ifdef SVQC
-    #include <common/gamemodes/gamemode/survival/sv_survival.qh>
-#endif
diff --git a/qcsrc/common/gamemodes/gamemode/survival/cl_survival.qc b/qcsrc/common/gamemodes/gamemode/survival/cl_survival.qc
deleted file mode 100644 (file)
index 83893e6..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-#include "cl_survival.qh"
-
-#include <client/draw.qh>
-#include <client/hud/panel/modicons.qh>
-
-void HUD_Mod_Survival(vector pos, vector mySize)
-{
-       mod_active = 1; // survival should always show the mod HUD
-
-       int mystatus = entcs_receiver(player_localnum).survival_status;
-       string player_text = "";
-       vector player_color = '1 1 1';
-       //string player_icon = "";
-       if(mystatus == SV_STATUS_HUNTER)
-       {
-               player_text = _("Hunter");
-               player_color = '1 0 0';
-               //player_icon = "player_red";
-       }
-       else if(mystatus == SV_STATUS_PREY)
-       {
-               player_text = _("Survivor");
-               player_color = '0 1 0';
-               //player_icon = "player_neutral";
-       }
-       else
-       {
-               // if the player has no valid status, don't draw anything
-               return;
-       }
-
-       string time_text = string_null;
-       vector timer_color = '1 1 1';
-       if(!STAT(GAME_STOPPED) && !warmup_stage && STAT(SURVIVAL_ROUNDTIMER) > 0)
-       {
-               float timeleft = max(0, STAT(SURVIVAL_ROUNDTIMER) - time);
-               timeleft = ceil(timeleft);
-               float minutesLeft = floor(timeleft / 60);
-               time_text = seconds_tostring(timeleft);
-               if(intermission_time || minutesLeft >= 5 || warmup_stage || STAT(SURVIVAL_ROUNDTIMER) == 0)
-                       timer_color = '1 1 1'; //white
-               else if(minutesLeft >= 1)
-                       timer_color = '1 1 0'; //yellow
-               else
-                       timer_color = '1 0 0'; //red
-       }
-
-       //drawpic_aspect_skin(pos, player_icon, vec2(0.5 * mySize.x, mySize.y), '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
-       if(!time_text)
-               drawstring_aspect(pos, player_text, vec2(mySize.x, mySize.y), player_color, panel_fg_alpha, DRAWFLAG_NORMAL);
-       else
-       {
-               drawstring_aspect(pos, player_text, vec2(0.5 * mySize.x, mySize.y), player_color, panel_fg_alpha, DRAWFLAG_NORMAL);
-               drawstring_aspect(pos + eX * (0.5 * mySize.x), time_text, vec2(0.5 * mySize.x, mySize.y), timer_color, panel_fg_alpha, DRAWFLAG_NORMAL);
-       }
-}
-
-REGISTER_MUTATOR(cl_sv, true);
-
-MUTATOR_HOOKFUNCTION(cl_sv, ForcePlayercolors_Skip, CBC_ORDER_LAST)
-{
-       if(!ISGAMETYPE(SURVIVAL))
-               return false;
-               
-       entity player = M_ARGV(0, entity);
-       entity e = entcs_receiver(player.entnum - 1);
-       int surv_status = ((e) ? e.survival_status : 0);
-       int mystatus = entcs_receiver(player_localnum).survival_status;
-
-       int plcolor = SV_COLOR_PREY; // default to survivor
-       if((mystatus == SV_STATUS_HUNTER || intermission || STAT(GAME_STOPPED)) && surv_status == SV_STATUS_HUNTER)
-               plcolor = SV_COLOR_HUNTER;
-
-       player.colormap = 1024 + plcolor;
-       return true;
-}
-
-MUTATOR_HOOKFUNCTION(cl_sv, DrawScoreboard_Force)
-{
-       // show the scoreboard when the round ends, so players can see who the hunter was
-       return STAT(GAME_STOPPED);
-}
diff --git a/qcsrc/common/gamemodes/gamemode/survival/cl_survival.qh b/qcsrc/common/gamemodes/gamemode/survival/cl_survival.qh
deleted file mode 100644 (file)
index 057120a..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#pragma once
-
-void HUD_Mod_Survival(vector pos, vector mySize);
diff --git a/qcsrc/common/gamemodes/gamemode/survival/survival.qc b/qcsrc/common/gamemodes/gamemode/survival/survival.qc
deleted file mode 100644 (file)
index 1f2d144..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include "survival.qh"
diff --git a/qcsrc/common/gamemodes/gamemode/survival/survival.qh b/qcsrc/common/gamemodes/gamemode/survival/survival.qh
deleted file mode 100644 (file)
index 17a01d8..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-#pragma once
-
-#include <common/gamemodes/gamemode/lms/lms.qh>
-#include <common/mapinfo.qh>
-
-#ifdef CSQC
-void HUD_Mod_Survival(vector pos, vector mySize);
-#endif
-CLASS(Survival, Gametype)
-    INIT(Survival)
-    {
-        this.gametype_init(this, _("Survival"),"sv","g_survival",GAMETYPE_FLAG_USEPOINTS,"","timelimit=30 pointlimit=20",_("Identify and eliminate all the hunters before all your allies are gone"));
-    }
-    METHOD(Survival, m_isAlwaysSupported, bool(Gametype this, int spawnpoints, float diameter))
-    {
-        return true;
-    }
-    METHOD(Survival, m_isForcedSupported, bool(Gametype this))
-    {
-        if(!cvar("g_survival_not_lms_maps"))
-        {
-            // if this is unset, all LMS maps support Survival too
-            if(!(MapInfo_Map_supportedGametypes & this.m_flags) && (MapInfo_Map_supportedGametypes & MAPINFO_TYPE_LMS.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;
-    }
-#ifdef CSQC
-    ATTRIB(Survival, m_modicons, void(vector pos, vector mySize), HUD_Mod_Survival);
-#endif
-ENDCLASS(Survival)
-REGISTER_GAMETYPE(SURVIVAL, NEW(Survival));
-
-#ifdef GAMEQC
-// shared state signalling the player's survival status
-.int survival_status;
-const int SV_STATUS_PREY = 1;
-const int SV_STATUS_HUNTER = 2;
-
-// hardcoded player colors for survival
-const int SV_COLOR_PREY = 51; // green
-const int SV_COLOR_HUNTER = 68; // red
-#endif
diff --git a/qcsrc/common/gamemodes/gamemode/survival/sv_survival.qc b/qcsrc/common/gamemodes/gamemode/survival/sv_survival.qc
deleted file mode 100644 (file)
index 1c066d8..0000000
+++ /dev/null
@@ -1,459 +0,0 @@
-#include "sv_survival.qh"
-
-float autocvar_g_survival_hunter_count = 0.25;
-float autocvar_g_survival_round_timelimit = 180;
-float autocvar_g_survival_warmup = 10;
-bool autocvar_g_survival_punish_teamkill = true;
-bool autocvar_g_survival_reward_survival = true;
-
-void surv_FakeTimeLimit(entity e, float t)
-{
-       if(!IS_REAL_CLIENT(e))
-               return;
-#if 0
-       msg_entity = e;
-       WriteByte(MSG_ONE, 3); // svc_updatestat
-       WriteByte(MSG_ONE, 236); // STAT_TIMELIMIT
-       if(t < 0)
-               WriteCoord(MSG_ONE, autocvar_timelimit);
-       else
-               WriteCoord(MSG_ONE, (t + 1) / 60);
-#else
-       STAT(SURVIVAL_ROUNDTIMER, e) = t;
-#endif
-}
-
-void nades_Clear(entity player);
-
-void Surv_UpdateScores(bool timed_out)
-{
-       // give players their hard-earned kills now that the round is over
-       FOREACH_CLIENT(true,
-       {
-               it.totalfrags += it.survival_validkills;
-               if(it.survival_validkills)
-                       GameRules_scoring_add(it, SCORE, it.survival_validkills);
-               it.survival_validkills = 0;
-               // player survived the round
-               if(IS_PLAYER(it) && !IS_DEAD(it))
-               {
-                       if(autocvar_g_survival_reward_survival && timed_out && it.survival_status == SV_STATUS_PREY)
-                               GameRules_scoring_add(it, SCORE, 1); // reward survivors who make it to the end of the round time limit
-                       if(it.survival_status == SV_STATUS_PREY)
-                               GameRules_scoring_add(it, SV_SURVIVALS, 1);
-                       else if(it.survival_status == SV_STATUS_HUNTER)
-                               GameRules_scoring_add(it, SV_HUNTS, 1);
-               }
-       });
-}
-
-float Surv_CheckWinner()
-{
-       if(round_handler_GetEndTime() > 0 && round_handler_GetEndTime() - time <= 0)
-       {
-               // if the match times out, survivors win too!
-               Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, CENTER_SURVIVAL_SURVIVOR_WIN);
-               Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_SURVIVAL_SURVIVOR_WIN);
-               FOREACH_CLIENT(true,
-               {
-                       if(IS_PLAYER(it))
-                               nades_Clear(it);
-                       surv_FakeTimeLimit(it, -1);
-               });
-
-               Surv_UpdateScores(true);
-
-               allowed_to_spawn = false;
-               game_stopped = true;
-               round_handler_Init(5, autocvar_g_survival_warmup, autocvar_g_survival_round_timelimit);
-               return 1;
-       }
-
-       int survivor_count = 0, hunter_count = 0;
-       FOREACH_CLIENT(IS_PLAYER(it) && !IS_DEAD(it),
-       {
-               if(it.survival_status == SV_STATUS_PREY)
-                       survivor_count++;
-               else if(it.survival_status == SV_STATUS_HUNTER)
-                       hunter_count++;
-       });
-       if(survivor_count > 0 && hunter_count > 0)
-       {
-               return 0;
-       }
-
-       if(hunter_count > 0) // hunters win
-       {
-               Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, CENTER_SURVIVAL_HUNTER_WIN);
-               Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_SURVIVAL_HUNTER_WIN);
-       }
-       else if(survivor_count > 0) // survivors win
-       {
-               Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, CENTER_SURVIVAL_SURVIVOR_WIN);
-               Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_SURVIVAL_SURVIVOR_WIN);
-       }
-       else
-       {
-               Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, CENTER_ROUND_TIED);
-               Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_ROUND_TIED);
-       }
-
-       Surv_UpdateScores(false);
-
-       allowed_to_spawn = false;
-       game_stopped = true;
-       round_handler_Init(5, autocvar_g_survival_warmup, autocvar_g_survival_round_timelimit);
-
-       FOREACH_CLIENT(true,
-       {
-               if(IS_PLAYER(it))
-                       nades_Clear(it);
-               surv_FakeTimeLimit(it, -1);
-       });
-
-       return 1;
-}
-
-void Surv_RoundStart()
-{
-       allowed_to_spawn = boolean(warmup_stage);
-       int playercount = 0;
-       FOREACH_CLIENT(true,
-       {
-               if(IS_PLAYER(it) && !IS_DEAD(it))
-               {
-                       ++playercount;
-                       it.survival_status = SV_STATUS_PREY;
-               }
-               else
-                       it.survival_status = 0; // this is mostly a safety check; if a client manages to somehow maintain a survival status, clear it before the round starts!
-               it.survival_validkills = 0;
-       });
-       int hunter_count = bound(1, ((autocvar_g_survival_hunter_count >= 1) ? autocvar_g_survival_hunter_count : floor(playercount * autocvar_g_survival_hunter_count)), playercount - 1); // 20%, but ensure at least 1 and less than total
-       int total_hunters = 0;
-       FOREACH_CLIENT_RANDOM(IS_PLAYER(it) && !IS_DEAD(it),
-       {
-               if(total_hunters >= hunter_count)
-                       break;
-               total_hunters++;
-               it.survival_status = SV_STATUS_HUNTER;
-       });
-
-       FOREACH_CLIENT(IS_PLAYER(it) && !IS_DEAD(it),
-       {
-               if(it.survival_status == SV_STATUS_PREY)
-                       Send_Notification(NOTIF_ONE_ONLY, it, MSG_CENTER, CENTER_SURVIVAL_SURVIVOR);
-               else if(it.survival_status == SV_STATUS_HUNTER)
-                       Send_Notification(NOTIF_ONE_ONLY, it, MSG_CENTER, CENTER_SURVIVAL_HUNTER);
-
-               surv_FakeTimeLimit(it, round_handler_GetEndTime());
-       });
-}
-
-bool Surv_CheckPlayers()
-{
-       static int prev_missing_players;
-       allowed_to_spawn = true;
-       int playercount = 0;
-       FOREACH_CLIENT(IS_PLAYER(it) && !IS_DEAD(it),
-       {
-               ++playercount;
-       });
-       if (playercount >= 2)
-       {
-               if(prev_missing_players > 0)
-                       Kill_Notification(NOTIF_ALL, NULL, MSG_CENTER, CPID_MISSING_PLAYERS);
-               prev_missing_players = -1;
-               return true;
-       }
-       if(playercount == 0)
-       {
-               if(prev_missing_players > 0)
-                       Kill_Notification(NOTIF_ALL, NULL, MSG_CENTER, CPID_MISSING_PLAYERS);
-               prev_missing_players = -1;
-               return false;
-       }
-       // if we get here, only 1 player is missing
-       if(prev_missing_players != 1)
-       {
-               Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, CENTER_MISSING_PLAYERS, 1);
-               prev_missing_players = 1;
-       }
-       return false;
-}
-
-bool surv_isEliminated(entity e)
-{
-       if(e.caplayer == 1 && (IS_DEAD(e) || e.frags == FRAGS_PLAYER_OUT_OF_GAME))
-               return true;
-       if(e.caplayer == 0.5)
-               return true;
-       return false;
-}
-
-void surv_Initialize() // run at the start of a match, initiates game mode
-{
-       GameRules_scoring(0, SFL_SORT_PRIO_PRIMARY, 0, {
-               field(SP_SV_SURVIVALS, "survivals", 0);
-               field(SP_SV_HUNTS, "hunts", SFL_SORT_PRIO_SECONDARY);
-       });
-
-       allowed_to_spawn = true;
-       round_handler_Spawn(Surv_CheckPlayers, Surv_CheckWinner, Surv_RoundStart);
-       round_handler_Init(5, autocvar_g_survival_warmup, autocvar_g_survival_round_timelimit);
-       EliminatedPlayers_Init(surv_isEliminated);
-}
-
-
-// ==============
-// Hook Functions
-// ==============
-
-MUTATOR_HOOKFUNCTION(sv, ClientObituary)
-{
-       // in survival, announcing a frag would tell everyone who the hunter is
-       entity frag_attacker = M_ARGV(1, entity);
-       entity frag_target = M_ARGV(2, entity);
-       if(IS_PLAYER(frag_attacker) && frag_attacker != frag_target)
-       {
-               float frag_deathtype = M_ARGV(3, float);
-               entity wep_ent = M_ARGV(4, entity);
-               // "team" kill, a point is awarded to the player by default so we must take it away plus an extra one
-               // unless the player is going to be punished for suicide, in which case just remove one
-               if(frag_attacker.survival_status == frag_target.survival_status)
-                       GiveFrags(frag_attacker, frag_target, ((autocvar_g_survival_punish_teamkill) ? -1 : -2), frag_deathtype, wep_ent.weaponentity_fld);
-       }
-
-       M_ARGV(5, bool) = true; // anonymous attacker
-}
-
-MUTATOR_HOOKFUNCTION(sv, PlayerPreThink)
-{
-       entity player = M_ARGV(0, entity);
-
-       if(IS_PLAYER(player) || player.caplayer)
-       {
-               // update the scoreboard colour display to out the real killer at the end of the round
-               // running this every frame to avoid cheats
-               int plcolor = SV_COLOR_PREY;
-               if(player.survival_status == SV_STATUS_HUNTER && game_stopped)
-                       plcolor = SV_COLOR_HUNTER;
-               setcolor(player, plcolor);
-       }
-}
-
-MUTATOR_HOOKFUNCTION(sv, PlayerSpawn)
-{
-       entity player = M_ARGV(0, entity);
-
-       player.survival_status = 0;
-       player.survival_validkills = 0;
-       player.caplayer = 1;
-       if (!warmup_stage)
-               eliminatedPlayers.SendFlags |= 1;
-}
-
-MUTATOR_HOOKFUNCTION(sv, ForbidSpawn)
-{
-       entity player = M_ARGV(0, entity);
-
-       // spectators / observers that weren't playing can join; they are
-       // immediately forced to observe in the PutClientInServer hook
-       // this way they are put in a team and can play in the next round
-       if (!allowed_to_spawn && player.caplayer)
-               return true;
-       return false;
-}
-
-MUTATOR_HOOKFUNCTION(sv, PutClientInServer)
-{
-       entity player = M_ARGV(0, entity);
-
-       if (!allowed_to_spawn && IS_PLAYER(player)) // this is true even when player is trying to join
-       {
-               TRANSMUTE(Observer, player);
-               if (CS(player).jointime != time && !player.caplayer) // not when connecting
-               {
-                       player.caplayer = 0.5;
-                       Send_Notification(NOTIF_ONE_ONLY, player, MSG_INFO, INFO_CA_JOIN_LATE);
-               }
-       }
-}
-
-MUTATOR_HOOKFUNCTION(sv, reset_map_players)
-{
-       FOREACH_CLIENT(true, {
-               CS(it).killcount = 0;
-               it.survival_status = 0;
-               surv_FakeTimeLimit(it, -1); // restore original timelimit
-               if (!it.caplayer && IS_BOT_CLIENT(it))
-                       it.caplayer = 1;
-               if (it.caplayer)
-               {
-                       TRANSMUTE(Player, it);
-                       it.caplayer = 1;
-                       PutClientInServer(it);
-               }
-       });
-       bot_relinkplayerlist();
-       return true;
-}
-
-MUTATOR_HOOKFUNCTION(sv, reset_map_global)
-{
-       allowed_to_spawn = true;
-       return true;
-}
-
-entity surv_LastPlayerForTeam(entity this)
-{
-       entity last_pl = NULL;
-       FOREACH_CLIENT(IS_PLAYER(it) && it != this, {
-               if (!IS_DEAD(it) && this.survival_status == it.survival_status)
-               {
-                       if (!last_pl)
-                               last_pl = it;
-                       else
-                               return NULL;
-               }
-       });
-       return last_pl;
-}
-
-void surv_LastPlayerForTeam_Notify(entity this)
-{
-       if (!warmup_stage && round_handler_IsActive() && round_handler_IsRoundStarted())
-       {
-               entity pl = surv_LastPlayerForTeam(this);
-               if (pl)
-                       Send_Notification(NOTIF_ONE_ONLY, pl, MSG_CENTER, CENTER_ALONE);
-       }
-}
-
-MUTATOR_HOOKFUNCTION(sv, PlayerDies)
-{
-       entity frag_attacker = M_ARGV(1, entity);
-       entity frag_target = M_ARGV(2, entity);
-       float frag_deathtype = M_ARGV(3, float);
-
-       surv_LastPlayerForTeam_Notify(frag_target);
-       if (!allowed_to_spawn)
-       {
-               frag_target.respawn_flags = RESPAWN_SILENT;
-               // prevent unwanted sudden rejoin as spectator and movement of spectator camera
-               frag_target.respawn_time = time + 2;
-       }
-       frag_target.respawn_flags |= RESPAWN_FORCE;
-       if (!warmup_stage)
-       {
-               eliminatedPlayers.SendFlags |= 1;
-               if (IS_BOT_CLIENT(frag_target))
-                       bot_clear(frag_target);
-       }
-
-       // killed an ally! punishment is death
-       if(autocvar_g_survival_punish_teamkill && frag_attacker != frag_target && IS_PLAYER(frag_attacker) && IS_PLAYER(frag_target) && frag_attacker.survival_status == frag_target.survival_status && !ITEM_DAMAGE_NEEDKILL(frag_deathtype))
-       if(!warmup_stage && round_handler_IsActive() && round_handler_IsRoundStarted()) // don't autokill if the round hasn't
-               Damage(frag_attacker, frag_attacker, frag_attacker, 100000, DEATH_MIRRORDAMAGE.m_id, DMG_NOWEP, frag_attacker.origin, '0 0 0');
-       return true;
-}
-
-MUTATOR_HOOKFUNCTION(sv, ClientDisconnect)
-{
-       entity player = M_ARGV(0, entity);
-
-       if (IS_PLAYER(player) && !IS_DEAD(player))
-               surv_LastPlayerForTeam_Notify(player);
-       return true;
-}
-
-MUTATOR_HOOKFUNCTION(sv, MakePlayerObserver)
-{
-       entity player = M_ARGV(0, entity);
-
-       if (IS_PLAYER(player) && !IS_DEAD(player))
-               surv_LastPlayerForTeam_Notify(player);
-       if (player.killindicator_teamchange == -2) // player wants to spectate
-               player.caplayer = 0;
-       if (player.caplayer)
-               player.frags = FRAGS_PLAYER_OUT_OF_GAME;
-       if (!warmup_stage)
-               eliminatedPlayers.SendFlags |= 1;
-       if (!player.caplayer)
-       {
-               player.survival_validkills = 0;
-               player.survival_status = 0;
-               surv_FakeTimeLimit(player, -1); // restore original timelimit
-               return false;  // allow team reset
-       }
-       return true;  // prevent team reset
-}
-
-MUTATOR_HOOKFUNCTION(sv, Scores_CountFragsRemaining)
-{
-       // announce remaining frags?
-       return true;
-}
-
-MUTATOR_HOOKFUNCTION(sv, GiveFragsForKill, CBC_ORDER_FIRST)
-{
-       entity frag_attacker = M_ARGV(0, entity);
-       if(!warmup_stage && round_handler_IsActive() && round_handler_IsRoundStarted())
-               frag_attacker.survival_validkills += M_ARGV(2, float);
-       M_ARGV(2, float) = 0; // score will be given to the winner when the round ends
-       return true;
-}
-
-MUTATOR_HOOKFUNCTION(sv, AddPlayerScore)
-{
-       entity scorefield = M_ARGV(0, entity);
-       if(scorefield == SP_KILLS || scorefield == SP_DEATHS || scorefield == SP_SUICIDES || scorefield == SP_DMG || scorefield == SP_DMGTAKEN)
-               M_ARGV(1, float) = 0; // don't report that the player has killed or been killed, that would out them as a hunter!
-}
-
-MUTATOR_HOOKFUNCTION(sv, CalculateRespawnTime)
-{
-       // no respawn calculations needed, player is forced to spectate anyway
-       return true;
-}
-
-MUTATOR_HOOKFUNCTION(sv, Bot_FixCount, CBC_ORDER_EXCLUSIVE)
-{
-       FOREACH_CLIENT(IS_REAL_CLIENT(it), {
-               if (IS_PLAYER(it) || it.caplayer == 1)
-                       ++M_ARGV(0, int);
-               ++M_ARGV(1, int);
-       });
-       return true;
-}
-
-MUTATOR_HOOKFUNCTION(sv, ClientCommand_Spectate)
-{
-       entity player = M_ARGV(0, entity);
-
-       if (player.caplayer)
-       {
-               // they're going to spec, we can do other checks
-               if (autocvar_sv_spectate && (IS_SPEC(player) || IS_OBSERVER(player)))
-                       Send_Notification(NOTIF_ONE_ONLY, player, MSG_INFO, INFO_CA_LEAVE);
-               return MUT_SPECCMD_FORCE;
-       }
-
-       return MUT_SPECCMD_CONTINUE;
-}
-
-MUTATOR_HOOKFUNCTION(sv, GetPlayerStatus)
-{
-       entity player = M_ARGV(0, entity);
-
-       return player.caplayer == 1;
-}
-
-MUTATOR_HOOKFUNCTION(sv, BotShouldAttack)
-{
-       entity bot = M_ARGV(0, entity);
-       entity targ = M_ARGV(1, entity);
-
-       if(targ.survival_status == bot.survival_status)
-               return true;
-}
diff --git a/qcsrc/common/gamemodes/gamemode/survival/sv_survival.qh b/qcsrc/common/gamemodes/gamemode/survival/sv_survival.qh
deleted file mode 100644 (file)
index 822cfd0..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-#pragma once
-
-#include <common/mutators/base.qh>
-#include <common/scores.qh>
-void surv_Initialize();
-
-REGISTER_MUTATOR(sv, false)
-{
-    MUTATOR_STATIC();
-       MUTATOR_ONADD
-       {
-               surv_Initialize();
-       }
-       return false;
-}
-
-.int survival_validkills; // store the player's valid kills to be given at the end of the match (avoid exposing their score until then)
index 074447b733591ec895a307cf0857e2567aa13630..6935e614af7a9ce120c9a76402a051e917cdb4af 100644 (file)
@@ -509,10 +509,6 @@ string multiteam_info_sprintf(string input, string teamname) { return ((input !=
     MSG_INFO_NOTIF(SPECTATE_WARNING,                        N_CONSOLE,  0, 1, "f1secs", "",     "",                     _("^F2You have to become a player within the next %s, otherwise you will be kicked, because spectating isn't allowed at this time!"), "")
 
     MSG_INFO_NOTIF(SUPERWEAPON_PICKUP,                      N_CONSOLE,  1, 0, "s1", "s1",       "superweapons",         _("^BG%s^K1 picked up a Superweapon"), "")
-//LegendGuard adds MSG_INFO_NOTIF from Mario/survival 15-02-2021
-    MSG_INFO_NOTIF(SURVIVAL_HUNTER_WIN,                     N_CONSOLE,  0, 0, "", "",           "",                     _("^K1Hunters^BG win the round"), "")
-    MSG_INFO_NOTIF(SURVIVAL_SURVIVOR_WIN,                   N_CONSOLE,  0, 0, "", "",           "",                     _("^F1Survivors^BG win the round"), "")
-
     MSG_INFO_NOTIF(TEAMCHANGE_LARGERTEAM,                   N_CONSOLE,  0, 0, "", "",           "",                     _("^BGYou cannot change to a larger team"), "")
     MSG_INFO_NOTIF(TEAMCHANGE_NOTALLOWED,                   N_CONSOLE,  0, 0, "", "",           "",                     _("^BGYou are not allowed to change teams"), "")
 
@@ -842,12 +838,6 @@ string multiteam_info_sprintf(string input, string teamname) { return ((input !=
     MSG_CENTER_NOTIF(SUPERWEAPON_BROKEN,                N_ENABLE,    0, 0, "",               CPID_POWERUP,           "0 0",  _("^F2Superweapons have broken down"), "")
     MSG_CENTER_NOTIF(SUPERWEAPON_LOST,                  N_ENABLE,    0, 0, "",               CPID_POWERUP,           "0 0",  _("^F2Superweapons have been lost"), "")
     MSG_CENTER_NOTIF(SUPERWEAPON_PICKUP,                N_ENABLE,    0, 0, "",               CPID_POWERUP,           "0 0",  _("^F2You now have a superweapon"), "")
-//LegendGuard adds MSG_CENTER_NOTIF from Mario/survival 15-02-2021
-    MSG_CENTER_NOTIF(SURVIVAL_HUNTER,                   N_ENABLE,    0, 0, "",               CPID_SURVIVAL,          "5 0",  strcat(BOLD_OPERATOR, _("^BGYou are a ^K1hunter^BG! Eliminate the survivor(s) without raising suspicion!")), "")
-    MSG_CENTER_NOTIF(SURVIVAL_HUNTER_WIN,               N_ENABLE,    0, 0, "",               CPID_ROUND,             "0 0",  _("^K1Hunters^BG win the round"), "")
-    MSG_CENTER_NOTIF(SURVIVAL_SURVIVOR,                 N_ENABLE,    0, 0, "",               CPID_SURVIVAL,          "5 0",  strcat(BOLD_OPERATOR, _("^BGYou are a ^F1survivor^BG! Identify and eliminate the hunter(s)!")), "")
-    MSG_CENTER_NOTIF(SURVIVAL_SURVIVOR_WIN,             N_ENABLE,    0, 0, "",               CPID_ROUND,             "0 0",  _("^F1Survivors^BG win the round"), "")
-
     MULTITEAM_CENTER(TEAMCHANGE,                        N_ENABLE,    0, 1, "",               CPID_TEAMCHANGE,        "1 f1", _("^K1Changing to ^TC^TT^K1 in ^COUNT"), "", NAME)
     MSG_CENTER_NOTIF(TEAMCHANGE_AUTO,                   N_ENABLE,    0, 1, "",               CPID_TEAMCHANGE,        "1 f1", _("^K1Changing team in ^COUNT"), "")
     MSG_CENTER_NOTIF(TEAMCHANGE_SPECTATE,               N_ENABLE,    0, 1, "",               CPID_TEAMCHANGE,        "1 f1", _("^K1Spectating in ^COUNT"), "")
index 85d96f9179599bb4b72929d35fe37be5f4798875..e35609896c54c7a852b6babd73f992e8f3db82d7 100644 (file)
@@ -43,7 +43,7 @@ string Get_Notif_TypeName(MSG net_type)
        LOG_WARNF("Get_Notif_TypeName(%d): Improper net type!", ORDINAL(net_type));
        return "";
 }
-//LegendGuard adds CASE(CPID, SURVIVAL) after RACE_FINISHLAP from Mario/survival 15-02-2021
+
 ENUMCLASS(CPID)
        CASE(CPID, ASSAULT_ROLE)
        CASE(CPID, ROUND)
@@ -73,7 +73,6 @@ ENUMCLASS(CPID)
        CASE(CPID, OVERTIME)
        CASE(CPID, POWERUP)
        CASE(CPID, RACE_FINISHLAP)
-       CASE(CPID, SURVIVAL)
        CASE(CPID, TEAMCHANGE)
        CASE(CPID, TIMEOUT)
        CASE(CPID, TIMEIN)
index 4ee4211623527097d93361891e466a2508c79124..791cf8599064266645a01e6253b87fefb144616f 100644 (file)
@@ -74,8 +74,6 @@ float game_stopped;
 float game_starttime; //point in time when the countdown to game start is over
 float round_starttime; //point in time when the countdown to round start is over
 
-float overtime_starttime; // z411 point in time where first overtime started
-
 float checkrules_overtimesadded; // z411 add
 float timeout_last;
 float timeout_total_time;
@@ -457,5 +455,3 @@ REGISTER_STAT(GUNALIGN, int)
 #ifdef SVQC
 SPECTATE_COPYFIELD(_STAT(GUNALIGN))
 #endif
-
-REGISTER_STAT(SURVIVAL_ROUNDTIMER, float) //LegendGuard adds SURVIVAL_ROUNDTIMER from Mario/survival 15-02-2021
index 67ee965d7d457a9b3dfd6bae1dd5ff6bee63ebf1..d95bac40e0c772d75f119b03e48961efe0771503 100644 (file)
@@ -684,8 +684,6 @@ float updateCompression()
        GAMETYPE(MAPINFO_TYPE_ASSAULT) \
        /* GAMETYPE(MAPINFO_TYPE_DUEL) */ \
        /* GAMETYPE(MAPINFO_TYPE_INVASION) */ \
-       GAMETYPE(MAPINFO_TYPE_SURVIVAL) \
-       //LegendGuard adds GAMETYPE for menu from Mario/survival 15-02-2021
        //LegendGuard adds GAMETYPE for menu from Mario/team_keepaway 15-02-2021
        /**/
 
index d8163cd0e3d6326f280cef4d86905322caa91aea..5086b4a3f4135bb728851a0197f13644fa5168f7 100644 (file)
@@ -44,7 +44,6 @@ void round_handler_Think(entity this)
                                this.cnt = 0;
                                this.round_endtime = (this.round_timelimit) ? time + this.round_timelimit : 0;
                                this.nextthink = time;
-                               FOREACH_CLIENT(IS_PLAYER(it), { roundaccuracy_clear(it); });
                                if (this.roundStart) this.roundStart();
                                return;
                        }
index 0183ccdc311ca2a835d46d2632a3aaf869a00dde..c1ee579606bd87c2f981ee3f6fdae2547544a16e 100644 (file)
@@ -44,7 +44,6 @@ void accuracy_resend(entity e);
 
 // update accuracy stats
 void accuracy_add(entity e, Weapon w, float fired, float hit);
-void roundaccuracy_clear(entity this);
 
 // helper
 bool accuracy_isgooddamage(entity attacker, entity targ);