]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Rework the scoring configuration a bit for CTF, strip out some older
authorSamual Lenks <samual@xonotic.org>
Thu, 6 Sep 2012 06:08:01 +0000 (02:08 -0400)
committerSamual Lenks <samual@xonotic.org>
Thu, 6 Sep 2012 06:08:01 +0000 (02:08 -0400)
unnecessary configs

ctfscoring-ai.cfg
ctfscoring-alien.cfg [deleted file]
ctfscoring-alpha.cfg [deleted file]
ctfscoring-div0.cfg
ctfscoring-nex242.cfg
ctfscoring-z-lowdeposit.cfg [deleted file]
ctfscoring-z.cfg [deleted file]
qcsrc/server/autocvars.qh
qcsrc/server/mutators/gamemode_ctf.qc

index 711373647864160c111a36aec9e7295409e1a6bd..2ba30450e21697d2377b2b6d9dfc469f134b98ae 100644 (file)
@@ -1,19 +1,9 @@
-set g_ctf_personalscore_pickup_base                   1
-set g_ctf_personalscore_pickup_dropped_early          0
-set g_ctf_personalscore_pickup_dropped_late           1
-set g_ctf_personalscore_capture                      20
-set g_ctf_personalscore_kill                          5
-set g_ctf_personalpenalty_drop                        0
-set g_ctf_personalpenalty_suicidedrop                 1
-set g_ctf_personalpenalty_returned                    1
-set g_ctf_personalscore_return                        5
-set g_ctf_personalscore_return_rogue                  3
-set g_ctf_personalscore_return_by_killer              5
-set g_ctf_personalscore_return_rogue_by_killer        5
-// AWIN = 21
-// AFAIL = 0
-// AFAILVOID = 1
-// DWIN = 10
-// ARETRY = -1..0
-// DRETRY = 5
-// ATAKE = 1
+set g_ctf_score_capture 20
+set g_ctf_score_kill 5
+set g_ctf_score_penalty_drop 0
+set g_ctf_score_penalty_suicidedrop 1
+set g_ctf_score_penalty_returned 1
+set g_ctf_score_pickup_base 1
+set g_ctf_score_pickup_dropped_early 0
+set g_ctf_score_pickup_dropped_late 1
+set g_ctf_score_return 5
diff --git a/ctfscoring-alien.cfg b/ctfscoring-alien.cfg
deleted file mode 100644 (file)
index dd5758d..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-set g_ctf_personalscore_pickup_base                   1
-set g_ctf_personalscore_pickup_dropped_early          1
-set g_ctf_personalscore_pickup_dropped_late           1
-set g_ctf_personalscore_capture                      30
-set g_ctf_personalscore_kill                          1
-set g_ctf_personalpenalty_drop                        2
-set g_ctf_personalpenalty_suicidedrop                 2
-set g_ctf_personalpenalty_returned                    0
-set g_ctf_personalscore_return                        5
-set g_ctf_personalscore_return_rogue                 10
-set g_ctf_personalscore_return_by_killer              6
-set g_ctf_personalscore_return_rogue_by_killer       11
-// AWIN = 31
-// AFAIL = -1
-// AFAILVOID = 1
-// DWIN = 6..7
-// ARETRY = -1
-// DRETRY = 1
-// ATAKE = 1
diff --git a/ctfscoring-alpha.cfg b/ctfscoring-alpha.cfg
deleted file mode 100644 (file)
index c15cee8..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-set g_ctf_personalscore_pickup_base                   0
-set g_ctf_personalscore_pickup_dropped_early          0
-set g_ctf_personalscore_pickup_dropped_late           0
-set g_ctf_personalscore_capture                      20
-set g_ctf_personalscore_kill                          0
-set g_ctf_personalpenalty_drop                        0
-set g_ctf_personalpenalty_suicidedrop                 0
-set g_ctf_personalpenalty_returned                    0
-set g_ctf_personalscore_return                        5
-set g_ctf_personalscore_return_rogue                 10
-set g_ctf_personalscore_return_by_killer              5
-set g_ctf_personalscore_return_rogue_by_killer       10
-// AWIN = 20
-// AFAIL = 0
-// AFAILVOID = 0
-// DWIN = 5
-// ARETRY = 0
-// DRETRY = 0
-// ATAKE = 0
index 33c8ab1b72bd9f7d7b7c0da352db959719a74a43..8af8a23a108dfc7c52fd48b7246056fc3e0193a9 100644 (file)
@@ -1,19 +1,9 @@
-set g_ctf_personalscore_pickup_base                   0
-set g_ctf_personalscore_pickup_dropped_early          1
-set g_ctf_personalscore_pickup_dropped_late           1
-set g_ctf_personalscore_capture                      25
-set g_ctf_personalscore_kill                          3
-set g_ctf_personalpenalty_drop                        2
-set g_ctf_personalpenalty_suicidedrop                 2
-set g_ctf_personalpenalty_returned                    1
-set g_ctf_personalscore_return                        2 // lowered so it's better if the killer does the return
-set g_ctf_personalscore_return_rogue                 10
-set g_ctf_personalscore_return_by_killer              5
-set g_ctf_personalscore_return_rogue_by_killer       10
-// AWIN = 25
-// AFAIL = -3
-// AFAILVOID = -2
-// DWIN = 8 (5 if someone else returned)
-// ARETRY = -1
-// DRETRY = 3
-// ATAKE = 0
+set g_ctf_score_capture 25
+set g_ctf_score_kill 3
+set g_ctf_score_penalty_drop 2
+set g_ctf_score_penalty_suicidedrop 2
+set g_ctf_score_penalty_returned 1
+set g_ctf_score_pickup_base 0
+set g_ctf_score_pickup_dropped_early 1
+set g_ctf_score_pickup_dropped_late 1
+set g_ctf_score_return 2 // lowered so it's better if the killer does the return
index 861ead4613d165ecef7681adb90dc87f691dc2bb..78d5b52409aaea7d7d957f718a713971122f8010 100644 (file)
@@ -1,19 +1,9 @@
-set g_ctf_personalscore_pickup_base                   1
-set g_ctf_personalscore_pickup_dropped_early          1
-set g_ctf_personalscore_pickup_dropped_late           1
-set g_ctf_personalscore_capture                      20
-set g_ctf_personalscore_kill                          1
-set g_ctf_personalpenalty_drop                        0
-set g_ctf_personalpenalty_suicidedrop                 1
-set g_ctf_personalpenalty_returned                    0
-set g_ctf_personalscore_return                        5
-set g_ctf_personalscore_return_rogue                 10
-set g_ctf_personalscore_return_by_killer              5
-set g_ctf_personalscore_return_rogue_by_killer       10
-// AWIN = 21
-// AFAIL = 1
-// AFAILVOID = 1
-// DWIN = 6
-// ARETRY = 1
-// DRETRY = 1
-// ATAKE = 1
+set g_ctf_score_capture 20
+set g_ctf_score_kill 1
+set g_ctf_score_penalty_drop 0
+set g_ctf_score_penalty_suicidedrop 1
+set g_ctf_score_penalty_returned 0
+set g_ctf_score_pickup_base 1
+set g_ctf_score_pickup_dropped_early 1
+set g_ctf_score_pickup_dropped_late 1
+set g_ctf_score_return 5
diff --git a/ctfscoring-z-lowdeposit.cfg b/ctfscoring-z-lowdeposit.cfg
deleted file mode 100644 (file)
index c75b306..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-set g_ctf_personalscore_pickup_base                  -1
-set g_ctf_personalscore_pickup_dropped_early          5
-set g_ctf_personalscore_pickup_dropped_late           9
-set g_ctf_personalscore_capture                      26
-set g_ctf_personalscore_kill                          5
-set g_ctf_personalpenalty_drop                        9
-set g_ctf_personalpenalty_suicidedrop                 9
-set g_ctf_personalpenalty_returned                    0
-set g_ctf_personalscore_return                        3
-set g_ctf_personalscore_return_rogue                 10
-set g_ctf_personalscore_return_by_killer              3
-set g_ctf_personalscore_return_rogue_by_killer       10
-// AWIN = 25
-// AFAIL = -10
-// AFAILVOID = -10
-// DWIN = 8
-// ARETRY = -1..-4
-// DRETRY = 5
-// ATAKE = -1
diff --git a/ctfscoring-z.cfg b/ctfscoring-z.cfg
deleted file mode 100644 (file)
index e45bdd9..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-set g_ctf_personalscore_pickup_base                  -5
-set g_ctf_personalscore_pickup_dropped_early          1
-set g_ctf_personalscore_pickup_dropped_late           5
-set g_ctf_personalscore_capture                      30
-set g_ctf_personalscore_kill                          5
-set g_ctf_personalpenalty_drop                        5
-set g_ctf_personalpenalty_suicidedrop                 5
-set g_ctf_personalpenalty_returned                    0
-set g_ctf_personalscore_return                        3
-set g_ctf_personalscore_return_rogue                 10
-set g_ctf_personalscore_return_by_killer              3
-set g_ctf_personalscore_return_rogue_by_killer       10
-// AWIN = 25
-// AFAIL = -10
-// AFAILVOID = -10
-// DWIN = 8
-// ARETRY = -1..-4
-// DRETRY = 5
-// ATAKE = -5
index 39c2cbebc38a2e2f01664d25d37b020a0faed6c0..630c1dc0a5afc4136bd5dfc6d2e7b29ccc928235 100644 (file)
@@ -800,6 +800,17 @@ float autocvar_g_ctf_flagcarrier_waypointforenemy_stalemate;
 float autocvar_g_ctf_flagcarrier_waypointforenemy_spotting;
 float autocvar_g_ctf_fullbrightflags;
 float autocvar_g_ctf_ignore_frags;
+
+float autocvar_g_ctf_score_capture;
+float autocvar_g_ctf_score_kill;
+float autocvar_g_ctf_score_penalty_drop;
+float autocvar_g_ctf_score_penalty_suicidedrop;
+float autocvar_g_ctf_score_penalty_returned;
+float autocvar_g_ctf_score_pickup_base;
+float autocvar_g_ctf_score_pickup_dropped_early;
+float autocvar_g_ctf_score_pickup_dropped_late;
+float autocvar_g_ctf_score_return;
+
 float autocvar_g_ctf_shield_force;
 float autocvar_g_ctf_shield_max_ratio;
 float autocvar_g_ctf_shield_min_negscore;
index 241313b93d8e2f305bb0a9368917548a14fc7e93..053a619c1bf5a2a6763d7d3d93483dc628a4967e 100644 (file)
@@ -3,14 +3,6 @@
 //  Last updated: March 30th, 2012
 // ================================================================
 
-float ctf_ReadScore(string parameter) // make this obsolete
-{
-       //if(g_ctf_win_mode != 2)
-               return cvar(strcat("g_ctf_personal", parameter));
-       //else
-       //      return cvar(strcat("g_ctf_flag", parameter));
-}
-
 void ctf_FakeTimeLimit(entity e, float t)
 {
        msg_entity = e;
@@ -184,7 +176,7 @@ void ctf_Handle_Drop(entity flag, entity player, float droptype)
        ctf_EventLog("dropped", player.team, player);
 
        // scoring
-       PlayerTeamScore_AddScore(player, -ctf_ReadScore("penalty_drop"));       
+       PlayerTeamScore_AddScore(player, autocvar_g_ctf_score_penalty_drop);    
        PlayerScore_Add(player, SP_CTF_DROPS, 1);
        
        // waypoints
@@ -369,7 +361,7 @@ void ctf_Handle_Capture(entity flag, entity toucher, float capturetype)
        }
        
        // scoring
-       PlayerTeamScore_AddScore(player, ctf_ReadScore("score_capture"));
+       PlayerTeamScore_AddScore(player, autocvar_g_ctf_score_capture);
        PlayerTeamScore_Add(player, SP_CTF_CAPS, ST_CTF_CAPS, 1);
 
        old_time = PlayerScore_Add(player, SP_CTF_CAPTIME, 0);
@@ -405,14 +397,14 @@ void ctf_Handle_Return(entity flag, entity player)
        ctf_EventLog("return", flag.team, player);
 
        // scoring
-       PlayerTeamScore_AddScore(player, ctf_ReadScore("score_return")); // reward for return
+       PlayerTeamScore_AddScore(player, autocvar_g_ctf_score_return); // reward for return
        PlayerScore_Add(player, SP_CTF_RETURNS, 1); // add to count of returns
 
-       TeamScore_AddToTeam(flag.team, ST_SCORE, -ctf_ReadScore("penalty_returned")); // punish the team who was last carrying it
+       TeamScore_AddToTeam(flag.team, ST_SCORE, -autocvar_g_ctf_score_penalty_returned); // punish the team who was last carrying it
        
        if(flag.ctf_dropper) 
        {
-               PlayerScore_Add(flag.ctf_dropper, SP_SCORE, -ctf_ReadScore("penalty_returned")); // punish the player who dropped the flag
+               PlayerScore_Add(flag.ctf_dropper, SP_SCORE, -autocvar_g_ctf_score_penalty_returned); // punish the player who dropped the flag
                ctf_CaptureShield_Update(flag.ctf_dropper, 0); // shield player from picking up flag 
                flag.ctf_dropper.next_take_time = time + autocvar_g_ctf_flag_collect_delay; // set next take time
        }
@@ -477,14 +469,14 @@ void ctf_Handle_Pickup(entity flag, entity player, float pickuptype)
        {               
                case PICKUP_BASE:
                {
-                       PlayerTeamScore_AddScore(player, ctf_ReadScore("score_pickup_base"));
+                       PlayerTeamScore_AddScore(player, autocvar_g_ctf_score_pickup_base);
                        break;
                }
                
                case PICKUP_DROPPED:
                {
                        pickup_dropped_score = (autocvar_g_ctf_flag_return_time ? bound(0, ((flag.ctf_droptime + autocvar_g_ctf_flag_return_time) - time) / autocvar_g_ctf_flag_return_time, 1) : 1);
-                       pickup_dropped_score = floor((ctf_ReadScore("score_pickup_dropped_late") * (1 - pickup_dropped_score) + ctf_ReadScore("score_pickup_dropped_early") * pickup_dropped_score) + 0.5);
+                       pickup_dropped_score = floor((autocvar_g_ctf_score_pickup_dropped_late * (1 - pickup_dropped_score) + autocvar_g_ctf_score_pickup_dropped_early * pickup_dropped_score) + 0.5);
                        print("pickup_dropped_score is ", ftos(pickup_dropped_score), "\n");
                        PlayerTeamScore_AddScore(player, pickup_dropped_score);
                        break;
@@ -1059,7 +1051,7 @@ MUTATOR_HOOKFUNCTION(ctf_PlayerDies)
 {
        if((frag_attacker != frag_target) && (frag_attacker.classname == "player") && (frag_target.flagcarried))
        {
-               PlayerTeamScore_AddScore(frag_attacker, ctf_ReadScore("score_kill"));
+               PlayerTeamScore_AddScore(frag_attacker, autocvar_g_ctf_score_kill);
                PlayerScore_Add(frag_attacker, SP_CTF_FCKILLS, 1);
        }