-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
+++ /dev/null
-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
+++ /dev/null
-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
-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
-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
+++ /dev/null
-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
+++ /dev/null
-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
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;
// 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;
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
}
// 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);
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
}
{
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;
{
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);
}