]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Move all gamemode cvars into their files, also renamed a couple of freezetag frozen...
authorMario <mario@smbclan.net>
Wed, 14 Oct 2015 12:36:56 +0000 (22:36 +1000)
committerMario <mario@smbclan.net>
Wed, 14 Oct 2015 12:37:20 +0000 (22:37 +1000)
21 files changed:
defaultXonotic.cfg
gamemodes.cfg
qcsrc/common/gamemodes/gamemode/nexball/nexball.qc
qcsrc/server/autocvars.qh
qcsrc/server/cl_client.qc
qcsrc/server/cl_client.qh
qcsrc/server/g_damage.qc
qcsrc/server/mutators/events.qh
qcsrc/server/mutators/gamemode_ca.qc
qcsrc/server/mutators/gamemode_ctf.qc
qcsrc/server/mutators/gamemode_cts.qc
qcsrc/server/mutators/gamemode_domination.qc
qcsrc/server/mutators/gamemode_freezetag.qc
qcsrc/server/mutators/gamemode_invasion.qc
qcsrc/server/mutators/gamemode_keepaway.qc
qcsrc/server/mutators/gamemode_keyhunt.qc
qcsrc/server/mutators/gamemode_lms.qc
qcsrc/server/mutators/gamemode_onslaught.qc
qcsrc/server/mutators/gamemode_race.qc
qcsrc/server/mutators/gamemode_tdm.qc
qcsrc/server/race.qc

index 3735e55349da0713a11e59317ead64ebe0d13610..c972168b0dfacd1b87dc6e3fd4ceb066b0abf119 100644 (file)
@@ -1340,6 +1340,12 @@ set g_weapon_charge_colormod_red_full 1
 set g_weapon_charge_colormod_green_full -0.5
 set g_weapon_charge_colormod_blue_full -1
 
+// frozen
+set g_frozen_revive_falldamage 0 "Enable reviving from this amount of fall damage"
+set g_frozen_revive_falldamage_health 40 "Amount of health player has if they revived from falling"
+set g_frozen_damage_trigger 1 "if 1, frozen players falling into the void will die instead of teleporting to spawn"
+set g_frozen_force 0.6 "How much to multiply the force on a frozen player with"
+
 // player statistics server URI
 set g_playerstats_uri "" "Output player statistics information to either: URL (with ://), console (with a dash like this: -), or supply a filename to output to data directory."
 
index 31a0f33d3b04116ccafc567b3e5bb0e8de509ab1..2d8d54067f17038c15779770e1381e08828c59d1 100644 (file)
@@ -380,11 +380,7 @@ set g_freezetag_revive_clearspeed 1.6 "Speed at which reviving progress gets los
 set g_freezetag_revive_extra_size 100 "Distance in qu that you can stand from a frozen teammate to keep reviving him"
 set g_freezetag_revive_nade 1 "Enable reviving from own nade explosion"
 set g_freezetag_revive_nade_health 40 "Amount of health player has if they revived from their own nade explosion"
-set g_freezetag_revive_falldamage 0 "Enable reviving from this amount of fall damage"
-set g_freezetag_revive_falldamage_health 40 "Amount of health player has if they revived from falling"
 set g_freezetag_round_timelimit 180 "round time limit in seconds"
-set g_freezetag_frozen_damage_trigger 1 "if 1, frozen players falling into the void will die instead of teleporting to spawn"
-set g_freezetag_frozen_force 0.6 "How much to multiply the force on a frozen player with"
 set g_freezetag_frozen_maxtime 60 "frozen players will be automatically unfrozen after this time in seconds"
 seta g_freezetag_teams_override 0
 set g_freezetag_team_spawns 0 "when 1, players spawn from the team spawnpoints of the map, if any"
index f06e1ec8a7469674ca8eb7c206475b09d1c55038..1e60ab8eae3c0e49b492d106096a765808b50ce8 100644 (file)
@@ -2,6 +2,9 @@
 
 #ifdef IMPLEMENTATION
 #ifdef SVQC
+int autocvar_g_nexball_goalleadlimit;
+#define autocvar_g_nexball_goallimit cvar("g_nexball_goallimit")
+
 float autocvar_g_nexball_basketball_bouncefactor;
 float autocvar_g_nexball_basketball_bouncestop;
 float autocvar_g_nexball_basketball_carrier_highspeed;
index affd9437ed279b83675d7fdd3d9ab9b12d3cda6a..2904d5c22f643afd3b080d5978f7888cafe2e562 100644 (file)
@@ -196,15 +196,6 @@ string autocvar_g_banned_list;
 bool autocvar_g_banned_list_idmode;
 bool autocvar_g_botclip_collisions;
 bool autocvar_g_bugrigs;
-float autocvar_g_ca_damage2score_multiplier;
-int autocvar_g_ca_point_leadlimit;
-int autocvar_g_ca_point_limit;
-float autocvar_g_ca_round_timelimit;
-bool autocvar_g_ca_spectate_enemies;
-int autocvar_g_ca_teams;
-int autocvar_g_ca_teams_override;
-bool autocvar_g_ca_team_spawns;
-float autocvar_g_ca_warmup;
 bool autocvar_g_campaign;
 #define autocvar_g_campaign_forceteam cvar("g_campaign_forceteam")
 int autocvar_g_campaign_skill;
@@ -223,112 +214,13 @@ float autocvar_g_chat_flood_spl_tell;
 int autocvar_g_chat_nospectators;
 bool autocvar_g_chat_teamcolors;
 bool autocvar_g_chat_tellprivacy;
-bool autocvar_g_ctf_allow_vehicle_carry;
-bool autocvar_g_ctf_allow_vehicle_touch;
-bool autocvar_g_ctf_allow_monster_touch;
-bool autocvar_g_ctf_throw;
-float autocvar_g_ctf_throw_angle_max;
-float autocvar_g_ctf_throw_angle_min;
-int autocvar_g_ctf_throw_punish_count;
-float autocvar_g_ctf_throw_punish_delay;
-float autocvar_g_ctf_throw_punish_time;
-float autocvar_g_ctf_throw_strengthmultiplier;
-float autocvar_g_ctf_throw_velocity_forward;
-float autocvar_g_ctf_throw_velocity_up;
-float autocvar_g_ctf_drop_velocity_up;
-float autocvar_g_ctf_drop_velocity_side;
-bool autocvar_g_ctf_oneflag_reverse;
-bool autocvar_g_ctf_portalteleport;
-bool autocvar_g_ctf_pass;
-float autocvar_g_ctf_pass_arc;
-float autocvar_g_ctf_pass_arc_max;
-float autocvar_g_ctf_pass_directional_max;
-float autocvar_g_ctf_pass_directional_min;
-float autocvar_g_ctf_pass_radius;
-float autocvar_g_ctf_pass_wait;
-bool autocvar_g_ctf_pass_request;
-float autocvar_g_ctf_pass_turnrate;
-float autocvar_g_ctf_pass_timelimit;
-float autocvar_g_ctf_pass_velocity;
-bool autocvar_g_ctf_dynamiclights;
-float autocvar_g_ctf_flag_collect_delay;
-float autocvar_g_ctf_flag_damageforcescale;
-bool autocvar_g_ctf_flag_dropped_waypoint;
-bool autocvar_g_ctf_flag_dropped_floatinwater;
-bool autocvar_g_ctf_flag_glowtrails;
-int autocvar_g_ctf_flag_health;
-bool autocvar_g_ctf_flag_return;
-float autocvar_g_ctf_flag_return_carried_radius;
-float autocvar_g_ctf_flag_return_time;
-bool autocvar_g_ctf_flag_return_when_unreachable;
-float autocvar_g_ctf_flag_return_damage;
-float autocvar_g_ctf_flag_return_damage_delay;
-float autocvar_g_ctf_flag_return_dropped;
-float autocvar_g_ctf_flagcarrier_auto_helpme_damage;
-float autocvar_g_ctf_flagcarrier_auto_helpme_time;
-float autocvar_g_ctf_flagcarrier_selfdamagefactor;
-float autocvar_g_ctf_flagcarrier_selfforcefactor;
-float autocvar_g_ctf_flagcarrier_damagefactor;
-float autocvar_g_ctf_flagcarrier_forcefactor;
-//float autocvar_g_ctf_flagcarrier_waypointforenemy_spotting;
-bool autocvar_g_ctf_fullbrightflags;
-bool autocvar_g_ctf_ignore_frags;
-int autocvar_g_ctf_score_capture;
-int autocvar_g_ctf_score_capture_assist;
-int autocvar_g_ctf_score_kill;
-int autocvar_g_ctf_score_penalty_drop;
-int autocvar_g_ctf_score_penalty_returned;
-int autocvar_g_ctf_score_pickup_base;
-int autocvar_g_ctf_score_pickup_dropped_early;
-int autocvar_g_ctf_score_pickup_dropped_late;
-int autocvar_g_ctf_score_return;
-float autocvar_g_ctf_shield_force;
-float autocvar_g_ctf_shield_max_ratio;
-int autocvar_g_ctf_shield_min_negscore;
-bool autocvar_g_ctf_stalemate;
-int autocvar_g_ctf_stalemate_endcondition;
-float autocvar_g_ctf_stalemate_time;
-bool autocvar_g_ctf_reverse;
-float autocvar_g_ctf_dropped_capture_delay;
-float autocvar_g_ctf_dropped_capture_radius;
-float autocvar_g_cts_finish_kill_delay;
-bool autocvar_g_cts_selfdamage;
 bool autocvar_g_debug_bot_commands;
-int autocvar_g_domination_default_teams;
-bool autocvar_g_domination_disable_frags;
-int autocvar_g_domination_point_amt;
-bool autocvar_g_domination_point_fullbright;
-int autocvar_g_domination_point_leadlimit;
-bool autocvar_g_domination_roundbased;
-int autocvar_g_domination_roundbased_point_limit;
-float autocvar_g_domination_round_timelimit;
-float autocvar_g_domination_warmup;
-#define autocvar_g_domination_point_limit cvar("g_domination_point_limit")
-float autocvar_g_domination_point_rate;
-int autocvar_g_domination_teams_override;
 bool autocvar_g_forced_respawn;
 string autocvar_g_forced_team_blue;
 string autocvar_g_forced_team_otherwise;
 string autocvar_g_forced_team_pink;
 string autocvar_g_forced_team_red;
 string autocvar_g_forced_team_yellow;
-bool autocvar_g_freezetag_frozen_damage_trigger;
-float autocvar_g_freezetag_frozen_force;
-float autocvar_g_freezetag_frozen_maxtime;
-float autocvar_g_freezetag_revive_falldamage;
-float autocvar_g_freezetag_revive_falldamage_health;
-bool autocvar_g_freezetag_revive_nade;
-float autocvar_g_freezetag_revive_nade_health;
-int autocvar_g_freezetag_point_leadlimit;
-int autocvar_g_freezetag_point_limit;
-float autocvar_g_freezetag_revive_extra_size;
-float autocvar_g_freezetag_revive_speed;
-float autocvar_g_freezetag_revive_clearspeed;
-float autocvar_g_freezetag_round_timelimit;
-int autocvar_g_freezetag_teams;
-int autocvar_g_freezetag_teams_override;
-bool autocvar_g_freezetag_team_spawns;
-float autocvar_g_freezetag_warmup;
 #define autocvar_g_friendlyfire cvar("g_friendlyfire")
 #define autocvar_g_friendlyfire_virtual cvar("g_friendlyfire_virtual")
 #define autocvar_g_friendlyfire_virtual_force cvar("g_friendlyfire_virtual_force")
@@ -347,35 +239,6 @@ float autocvar_g_jetpack_antigravity;
 int autocvar_g_jetpack_fuel;
 float autocvar_g_jetpack_maxspeed_side;
 float autocvar_g_jetpack_maxspeed_up;
-int autocvar_g_keepaway_ballcarrier_effects;
-float autocvar_g_keepaway_ballcarrier_damage;
-float autocvar_g_keepaway_ballcarrier_force;
-float autocvar_g_keepaway_ballcarrier_highspeed;
-float autocvar_g_keepaway_ballcarrier_selfdamage;
-float autocvar_g_keepaway_ballcarrier_selfforce;
-float autocvar_g_keepaway_noncarrier_damage;
-float autocvar_g_keepaway_noncarrier_force;
-float autocvar_g_keepaway_noncarrier_selfdamage;
-float autocvar_g_keepaway_noncarrier_selfforce;
-bool autocvar_g_keepaway_noncarrier_warn;
-int autocvar_g_keepaway_score_bckill;
-int autocvar_g_keepaway_score_killac;
-int autocvar_g_keepaway_score_timepoints;
-float autocvar_g_keepaway_score_timeinterval;
-float autocvar_g_keepawayball_damageforcescale;
-int autocvar_g_keepawayball_effects;
-float autocvar_g_keepawayball_respawntime;
-int autocvar_g_keepawayball_trail_color;
-int autocvar_g_keyhunt_point_leadlimit;
-bool autocvar_g_keyhunt_team_spawns;
-#define autocvar_g_keyhunt_point_limit cvar("g_keyhunt_point_limit")
-int autocvar_g_keyhunt_teams;
-int autocvar_g_keyhunt_teams_override;
-int autocvar_g_lms_extra_lives;
-bool autocvar_g_lms_join_anytime;
-int autocvar_g_lms_last_join;
-#define autocvar_g_lms_lives_override cvar("g_lms_lives_override")
-bool autocvar_g_lms_regenerate;
 #define autocvar_g_maplist cvar_string("g_maplist")
 bool autocvar_g_maplist_check_waypoints;
 int autocvar_g_maplist_index;
@@ -414,8 +277,6 @@ float autocvar_g_multijump_speed;
 float autocvar_g_multijump_maxspeed;
 float autocvar_g_multijump_dodging = 1;
 string autocvar_g_mutatormsg;
-int autocvar_g_nexball_goalleadlimit;
-#define autocvar_g_nexball_goallimit cvar("g_nexball_goallimit")
 //float autocvar_g_nick_flood_penalty;
 int autocvar_g_nick_flood_penalty_red;
 int autocvar_g_nick_flood_penalty_yellow;
@@ -445,10 +306,6 @@ int autocvar_g_projectiles_newton_style;
 float autocvar_g_projectiles_newton_style_2_maxfactor;
 float autocvar_g_projectiles_newton_style_2_minfactor;
 int autocvar_g_projectiles_spread_style;
-#define autocvar_g_race_laps_limit cvar("g_race_laps_limit")
-float autocvar_g_race_qualifying_timelimit;
-float autocvar_g_race_qualifying_timelimit_override;
-int autocvar_g_race_teams;
 float autocvar_g_respawn_delay_small;
 int autocvar_g_respawn_delay_small_count;
 float autocvar_g_respawn_delay_large;
@@ -470,11 +327,6 @@ float autocvar_g_spawn_furthest;
 bool autocvar_g_spawn_useallspawns;
 bool autocvar_g_spawnpoints_auto_move_out_of_solid;
 #define autocvar_g_spawnshieldtime cvar("g_spawnshieldtime")
-bool autocvar_g_tdm_team_spawns;
-int autocvar_g_tdm_point_limit;
-int autocvar_g_tdm_point_leadlimit;
-int autocvar_g_tdm_teams;
-int autocvar_g_tdm_teams_override;
 float autocvar_g_teamdamage_resetspeed;
 float autocvar_g_teamdamage_threshold;
 bool autocvar_g_telefrags;
@@ -706,15 +558,6 @@ float autocvar_g_touchexplode_radius;
 float autocvar_g_touchexplode_damage;
 float autocvar_g_touchexplode_edgedamage;
 float autocvar_g_touchexplode_force;
-float autocvar_g_invasion_round_timelimit;
-int autocvar_g_invasion_teams;
-bool autocvar_g_invasion_team_spawns;
-float autocvar_g_invasion_spawnpoint_spawn_delay;
-#define autocvar_g_invasion_point_limit cvar("g_invasion_point_limit")
-float autocvar_g_invasion_warmup;
-int autocvar_g_invasion_monster_count;
-bool autocvar_g_invasion_zombies_only;
-float autocvar_g_invasion_spawn_delay;
 #define autocvar_g_bloodloss cvar("g_bloodloss")
 float autocvar_g_random_gravity_negative_chance;
 float autocvar_g_random_gravity_min;
@@ -792,30 +635,6 @@ float autocvar_g_spawn_near_teammate_distance;
 int autocvar_g_spawn_near_teammate_ignore_spawnpoint;
 float autocvar_g_spawn_near_teammate_ignore_spawnpoint_delay;
 float autocvar_g_spawn_near_teammate_ignore_spawnpoint_delay_death;
-float autocvar_g_onslaught_debug;
-float autocvar_g_onslaught_teleport_wait;
-bool autocvar_g_onslaught_spawn_at_controlpoints;
-bool autocvar_g_onslaught_spawn_at_generator;
-float autocvar_g_onslaught_cp_proxydecap;
-float autocvar_g_onslaught_cp_proxydecap_distance = 512;
-float autocvar_g_onslaught_cp_proxydecap_dps = 100;
-float autocvar_g_onslaught_spawn_at_controlpoints_chance = 0.5;
-float autocvar_g_onslaught_spawn_at_controlpoints_random;
-float autocvar_g_onslaught_spawn_at_generator_chance;
-float autocvar_g_onslaught_spawn_at_generator_random;
-float autocvar_g_onslaught_cp_buildhealth;
-float autocvar_g_onslaught_cp_buildtime;
-float autocvar_g_onslaught_cp_health;
-float autocvar_g_onslaught_cp_regen;
-float autocvar_g_onslaught_gen_health;
-float autocvar_g_onslaught_shield_force = 100;
-float autocvar_g_onslaught_allow_vehicle_touch;
-float autocvar_g_onslaught_round_timelimit;
-float autocvar_g_onslaught_point_limit;
-float autocvar_g_onslaught_warmup;
-float autocvar_g_onslaught_teleport_radius;
-float autocvar_g_onslaught_spawn_choose;
-float autocvar_g_onslaught_click_radius;
 int autocvar_g_spawn_near_teammate_ignore_spawnpoint_check_health;
 bool autocvar_g_spawn_near_teammate_ignore_spawnpoint_closetodeath;
 bool autocvar_g_physics_clientselect;
@@ -881,4 +700,8 @@ float autocvar_g_rm_laser_rapid_refire;
 float autocvar_g_rm_laser_rapid_delay;
 float autocvar_g_rm_laser_radius;
 float autocvar_g_rm_laser_force;
+float autocvar_g_frozen_revive_falldamage;
+int autocvar_g_frozen_revive_falldamage_health;
+bool autocvar_g_frozen_damage_trigger;
+float autocvar_g_frozen_force;
 #endif
index c608c5b2c74a78325a2343556b1a679ff4137fd8..608a05adca6dab7c993d8b68cb147e80c38faaa6 100644 (file)
@@ -884,14 +884,8 @@ void ClientKill_TeamChange (float targetteam) // 0 = don't change, -1 = auto, -2
        if(g_race_qualifying || g_cts)
                killtime = 0;
 
-    if(g_cts && self.killindicator && self.killindicator.health == 1) // self.killindicator.health == 1 means that the kill indicator was spawned by CTS_ClientKill
-    {
-               remove(self.killindicator);
-               self.killindicator = world;
-
-        ClientKill_Now(); // allow instant kill in this case
-        return;
-    }
+    if(MUTATOR_CALLHOOK(ClientKill, self, killtime))
+       return;
 
        self.killindicator_teamchange = targetteam;
 
@@ -983,23 +977,10 @@ void ClientKill (void)
        ClientKill_TeamChange(0);
 }
 
-void CTS_ClientKill (entity e) // silent version of ClientKill, used when player finishes a CTS run. Useful to prevent cheating by running back to the start line and starting out with more speed
-{
-    e.killindicator = spawn();
-    e.killindicator.owner = e;
-    e.killindicator.think = KillIndicator_Think;
-    e.killindicator.nextthink = time + (e.lip) * 0.05;
-    e.killindicator.cnt = ceil(autocvar_g_cts_finish_kill_delay);
-    e.killindicator.health = 1; // this is used to indicate that it should be silent
-    e.lip = 0;
-}
-
 void FixClientCvars(entity e)
 {
        // send prediction settings to the client
        stuffcmd(e, "\nin_bindmap 0 0\n");
-       if(g_race || g_cts)
-               stuffcmd(e, "cl_cmd settemp cl_movecliptokeyboard 2\n");
        if(autocvar_g_antilag == 3) // client side hitscan
                stuffcmd(e, "cl_cmd settemp cl_prydoncursor_notrace 0\n");
        if(autocvar_sv_gentle)
@@ -1829,49 +1810,23 @@ void SetSpectator(entity player, entity spectatee)
 
 bool Spectate(entity pl)
 {SELFPARAM();
-       if(g_ca && !autocvar_g_ca_spectate_enemies && self.caplayer)
-       if(DIFF_TEAM(pl, self))
+       if(MUTATOR_CALLHOOK(SpectateSet, self, pl))
                return false;
+       pl = spec_player;
 
        SetSpectator(self, pl);
        return SpectateSet();
 }
 
-// Returns next available player to spectate if g_ca_spectate_enemies == 0
-entity CA_SpectateNext(entity start)
-{SELFPARAM();
-       if(SAME_TEAM(start, self))
-               return start;
-
-       other = start;
-       // continue from current player
-       while(other && DIFF_TEAM(other, self))
-               other = find(other, classname, "player");
-
-       if (!other)
-       {
-               // restart from begining
-               other = find(other, classname, "player");
-               while(other && DIFF_TEAM(other, self))
-                       other = find(other, classname, "player");
-       }
-
-       return other;
-}
-
 bool SpectateNext()
 {SELFPARAM();
        other = find(self.enemy, classname, "player");
 
-       if (g_ca && !autocvar_g_ca_spectate_enemies && self.caplayer)
-               // CA and ca players when spectating enemies is forbidden
-               other = CA_SpectateNext(other);
-       else
-       {
-               // other modes and ca spectators or spectating enemies is allowed
-               if (!other)
-                       other = find(other, classname, "player");
-       }
+       bool mutator_returnvalue = MUTATOR_CALLHOOK(SpectateNext, self, other);
+       other = spec_player;
+
+       if(!mutator_returnvalue && !other)
+               other = find(other, classname, "player");
 
        if(other) { SetSpectator(self, other); }
 
@@ -1891,27 +1846,24 @@ bool SpectatePrev()
        while(other && other != self.enemy)
                other = other.chain;
 
-       if (g_ca && !autocvar_g_ca_spectate_enemies && self.caplayer)
-       {
-               do { other = other.chain; }
-               while(other && DIFF_TEAM(other, self));
+       int mutator_returnvalue = MUTATOR_CALLHOOK(SpectatePrev, self, other, first);
+       other = spec_player;
 
-               if (!other)
+       switch(mutator_returnvalue)
+       {
+               case MUT_SPECPREV_FOUND: break;
+               case MUT_SPECPREV_RETURN: return true;
+               case MUT_SPECPREV_CONTINUE:
+               default:
                {
-                       other = first;
-                       while(other && DIFF_TEAM(other, self))
+                       if(other.chain)
                                other = other.chain;
-                       if(other == self.enemy)
-                               return true;
+                       else
+                               other = first;
+                       break;
                }
        }
-       else
-       {
-               if(other.chain)
-                       other = other.chain;
-               else
-                       other = first;
-       }
+
        SetSpectator(self, other);
        return SpectateSet();
 }
index 213a02945905db6e2ff65ab856cc236e3807ad74..1b462a329538ab3c6527a43b187a08f416d28804 100644 (file)
@@ -8,6 +8,4 @@ float CalcRotRegen(float current, float regenstable, float regenfactor, float re
 
 float Spectate(entity pl);
 
-void CTS_ClientKill (entity e);
-
 #endif
index b005da47a24e48e7a5b70eaa7cd143273eb03f30..6a80f7e5e1abfcec5211a34a617e5edf016d1edb 100644 (file)
@@ -748,22 +748,22 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, int d
                if(targ.frozen)
                if(deathtype != DEATH_HURTTRIGGER.m_id && deathtype != DEATH_TEAMCHANGE.m_id && deathtype != DEATH_AUTOTEAMCHANGE.m_id)
                {
-                       if(autocvar_g_freezetag_revive_falldamage > 0)
+                       if(autocvar_g_frozen_revive_falldamage > 0)
                        if(deathtype == DEATH_FALL.m_id)
-                       if(damage >= autocvar_g_freezetag_revive_falldamage)
+                       if(damage >= autocvar_g_frozen_revive_falldamage)
                        {
                                Unfreeze(targ);
-                               targ.health = autocvar_g_freezetag_revive_falldamage_health;
+                               targ.health = autocvar_g_frozen_revive_falldamage_health;
                                Send_Effect(EFFECT_ICEORGLASS, targ.origin, '0 0 0', 3);
                                Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_FREEZETAG_REVIVED_FALL, targ.netname);
                                Send_Notification(NOTIF_ONE, targ, MSG_CENTER, CENTER_FREEZETAG_REVIVE_SELF);
                        }
 
                        damage = 0;
-                       force *= autocvar_g_freezetag_frozen_force;
+                       force *= autocvar_g_frozen_force;
                }
 
-               if(targ.frozen && deathtype == DEATH_HURTTRIGGER.m_id && !autocvar_g_freezetag_frozen_damage_trigger)
+               if(targ.frozen && deathtype == DEATH_HURTTRIGGER.m_id && !autocvar_g_frozen_damage_trigger)
                {
                        Send_Effect(EFFECT_TELEPORT, targ.origin, '0 0 0', 1);
 
index bc034a6607c1164413546b986083abfe69c1de48..b71d9f94f966c581608aa589d93b4c434d03f61a 100644 (file)
@@ -643,4 +643,51 @@ MUTATOR_HOOKABLE(BuffTouch, EV_BuffTouch);
     /**/
 int record_page;
 MUTATOR_HOOKABLE(GetRecords, EV_GetRecords);
+
+#define EV_Race_FinalCheckpoint(i, o) \
+    /**/ i(entity, race_player) \
+    /**/
+entity race_player;
+MUTATOR_HOOKABLE(Race_FinalCheckpoint, EV_Race_FinalCheckpoint);
+
+/** called when player triggered kill (or is changing teams), return error to not do anything */
+#define EV_ClientKill(i, o) \
+    /** player */ i(entity, __self) \
+    /* kill delay */ i(float, ret_float) \
+    /* kill delay */ o(float, ret_float) \
+    /**/
+MUTATOR_HOOKABLE(ClientKill, EV_ClientKill);
+
+#define EV_FixClientCvars(i, o) \
+    /**/ i(entity, fix_client) \
+    /**/
+entity fix_client;
+MUTATOR_HOOKABLE(FixClientCvars, EV_FixClientCvars);
+
+#define EV_SpectateSet(i, o) \
+    /**/ i(entity, __self) \
+    /**/ i(entity, spec_player) \
+    /**/
+entity spec_player;
+MUTATOR_HOOKABLE(SpectateSet, EV_SpectateSet);
+
+#define EV_SpectateNext(i, o) \
+    /**/ i(entity, __self) \
+    /**/ i(entity, spec_player) \
+    /**/
+MUTATOR_HOOKABLE(SpectateNext, EV_SpectateNext);
+
+#define EV_SpectatePrev(i, o) \
+    /**/ i(entity, __self) \
+    /**/ i(entity, spec_player) \
+    /**/ i(entity, spec_first) \
+    /**/
+entity spec_first;
+MUTATOR_HOOKABLE(SpectatePrev, EV_SpectatePrev);
+
+enum {
+    MUT_SPECPREV_CONTINUE, // return this flag to make the function continue as normal
+    MUT_SPECPREV_RETURN, // return this flag to make the function return (handled entirely by mutator)
+    MUT_SPECPREV_FOUND // return this flag to make the function continue without default functions (handled mostly by mutator)
+};
 #endif
index fb66bb28f1c816a998b0ce4215aaa04e53d91930..b514fa296a0050cca7d2b3890c33057f4f982fc6 100644 (file)
@@ -2,6 +2,16 @@
 
 #include "gamemode.qh"
 
+float autocvar_g_ca_damage2score_multiplier;
+int autocvar_g_ca_point_leadlimit;
+int autocvar_g_ca_point_limit;
+float autocvar_g_ca_round_timelimit;
+bool autocvar_g_ca_spectate_enemies;
+int autocvar_g_ca_teams;
+int autocvar_g_ca_teams_override;
+bool autocvar_g_ca_team_spawns;
+float autocvar_g_ca_warmup;
+
 float ca_teams;
 float allowed_to_spawn;
 
@@ -161,6 +171,28 @@ float ca_isEliminated(entity e)
        return false;
 }
 
+// Returns next available player to spectate if g_ca_spectate_enemies == 0
+entity CA_SpectateNext(entity player, entity start)
+{
+       if(SAME_TEAM(start, player))
+               return start;
+
+       entity spec_other = start;
+       // continue from current player
+       while(spec_other && DIFF_TEAM(spec_other, player))
+               spec_other = find(spec_other, classname, "player");
+
+       if (!spec_other)
+       {
+               // restart from begining
+               spec_other = find(spec_other, classname, "player");
+               while(spec_other && DIFF_TEAM(spec_other, player))
+                       spec_other = find(spec_other, classname, "player");
+       }
+
+       return spec_other;
+}
+
 MUTATOR_HOOKFUNCTION(ca, PlayerSpawn)
 {SELFPARAM();
        self.caplayer = 1;
@@ -360,6 +392,44 @@ MUTATOR_HOOKFUNCTION(ca, Scores_CountFragsRemaining)
        return true;
 }
 
+MUTATOR_HOOKFUNCTION(ca, SpectateSet)
+{
+       if(!autocvar_g_ca_spectate_enemies && self.caplayer)
+       if(DIFF_TEAM(spec_player, self))
+               return true;
+       return false;
+}
+
+MUTATOR_HOOKFUNCTION(ca, SpectateNext)
+{SELFPARAM();
+       if(!autocvar_g_ca_spectate_enemies && self.caplayer)
+       {
+               spec_player = CA_SpectateNext(self, spec_player);
+               return true;
+       }
+       return false;
+}
+
+MUTATOR_HOOKFUNCTION(ca, SpectatePrev)
+{SELFPARAM();
+       if(!autocvar_g_ca_spectate_enemies && self.caplayer)
+       {
+               do { spec_player = spec_player.chain; }
+               while(spec_player && DIFF_TEAM(spec_player, self));
+
+               if (!spec_player)
+               {
+                       spec_player = spec_first;
+                       while(spec_player && DIFF_TEAM(spec_player, self))
+                               spec_player = spec_player.chain;
+                       if(spec_player == self.enemy)
+                               return MUT_SPECPREV_RETURN;
+               }
+       }
+
+       return MUT_SPECPREV_FOUND;
+}
+
 void ca_Initialize()
 {
        allowed_to_spawn = true;
index 0b2cad28c9b51767bd482c3240d6be344151bb89..b813ed87f1c3f0ab42b698211cf846c58c3711a5 100644 (file)
@@ -9,6 +9,75 @@
 
 #include "../../lib/warpzone/common.qh"
 
+bool autocvar_g_ctf_allow_vehicle_carry;
+bool autocvar_g_ctf_allow_vehicle_touch;
+bool autocvar_g_ctf_allow_monster_touch;
+bool autocvar_g_ctf_throw;
+float autocvar_g_ctf_throw_angle_max;
+float autocvar_g_ctf_throw_angle_min;
+int autocvar_g_ctf_throw_punish_count;
+float autocvar_g_ctf_throw_punish_delay;
+float autocvar_g_ctf_throw_punish_time;
+float autocvar_g_ctf_throw_strengthmultiplier;
+float autocvar_g_ctf_throw_velocity_forward;
+float autocvar_g_ctf_throw_velocity_up;
+float autocvar_g_ctf_drop_velocity_up;
+float autocvar_g_ctf_drop_velocity_side;
+bool autocvar_g_ctf_oneflag_reverse;
+bool autocvar_g_ctf_portalteleport;
+bool autocvar_g_ctf_pass;
+float autocvar_g_ctf_pass_arc;
+float autocvar_g_ctf_pass_arc_max;
+float autocvar_g_ctf_pass_directional_max;
+float autocvar_g_ctf_pass_directional_min;
+float autocvar_g_ctf_pass_radius;
+float autocvar_g_ctf_pass_wait;
+bool autocvar_g_ctf_pass_request;
+float autocvar_g_ctf_pass_turnrate;
+float autocvar_g_ctf_pass_timelimit;
+float autocvar_g_ctf_pass_velocity;
+bool autocvar_g_ctf_dynamiclights;
+float autocvar_g_ctf_flag_collect_delay;
+float autocvar_g_ctf_flag_damageforcescale;
+bool autocvar_g_ctf_flag_dropped_waypoint;
+bool autocvar_g_ctf_flag_dropped_floatinwater;
+bool autocvar_g_ctf_flag_glowtrails;
+int autocvar_g_ctf_flag_health;
+bool autocvar_g_ctf_flag_return;
+float autocvar_g_ctf_flag_return_carried_radius;
+float autocvar_g_ctf_flag_return_time;
+bool autocvar_g_ctf_flag_return_when_unreachable;
+float autocvar_g_ctf_flag_return_damage;
+float autocvar_g_ctf_flag_return_damage_delay;
+float autocvar_g_ctf_flag_return_dropped;
+float autocvar_g_ctf_flagcarrier_auto_helpme_damage;
+float autocvar_g_ctf_flagcarrier_auto_helpme_time;
+float autocvar_g_ctf_flagcarrier_selfdamagefactor;
+float autocvar_g_ctf_flagcarrier_selfforcefactor;
+float autocvar_g_ctf_flagcarrier_damagefactor;
+float autocvar_g_ctf_flagcarrier_forcefactor;
+//float autocvar_g_ctf_flagcarrier_waypointforenemy_spotting;
+bool autocvar_g_ctf_fullbrightflags;
+bool autocvar_g_ctf_ignore_frags;
+int autocvar_g_ctf_score_capture;
+int autocvar_g_ctf_score_capture_assist;
+int autocvar_g_ctf_score_kill;
+int autocvar_g_ctf_score_penalty_drop;
+int autocvar_g_ctf_score_penalty_returned;
+int autocvar_g_ctf_score_pickup_base;
+int autocvar_g_ctf_score_pickup_dropped_early;
+int autocvar_g_ctf_score_pickup_dropped_late;
+int autocvar_g_ctf_score_return;
+float autocvar_g_ctf_shield_force;
+float autocvar_g_ctf_shield_max_ratio;
+int autocvar_g_ctf_shield_min_negscore;
+bool autocvar_g_ctf_stalemate;
+int autocvar_g_ctf_stalemate_endcondition;
+float autocvar_g_ctf_stalemate_time;
+bool autocvar_g_ctf_reverse;
+float autocvar_g_ctf_dropped_capture_delay;
+float autocvar_g_ctf_dropped_capture_radius;
+
 void ctf_FakeTimeLimit(entity e, float t)
 {
        msg_entity = e;
index 21d96d82f262afa8e741504fdc4c71a59c0028e6..ae148fd47d1d26e65c6477c6ca50d6d3a5e127b8 100644 (file)
@@ -4,6 +4,9 @@
 
 #include "../race.qh"
 
+float autocvar_g_cts_finish_kill_delay;
+bool autocvar_g_cts_selfdamage;
+
 // legacy bot roles
 .float race_checkpoint;
 void havocbot_role_cts()
@@ -55,6 +58,17 @@ void cts_EventLog(string mode, entity actor) // use an alias for easy changing a
                GameLogEcho(strcat(":cts:", mode, ":", ((actor != world) ? (strcat(":", ftos(actor.playerid))) : "")));
 }
 
+void CTS_ClientKill(entity e) // silent version of ClientKill, used when player finishes a CTS run. Useful to prevent cheating by running back to the start line and starting out with more speed
+{
+    e.killindicator = spawn();
+    e.killindicator.owner = e;
+    e.killindicator.think = KillIndicator_Think;
+    e.killindicator.nextthink = time + (e.lip) * 0.05;
+    e.killindicator.cnt = ceil(autocvar_g_cts_finish_kill_delay);
+    e.killindicator.health = 1; // this is used to indicate that it should be silent
+    e.lip = 0;
+}
+
 MUTATOR_HOOKFUNCTION(cts, PlayerPhysics)
 {SELFPARAM();
        // force kbd movement for fairness
@@ -304,6 +318,35 @@ MUTATOR_HOOKFUNCTION(cts, GetRecords)
        return false;
 }
 
+MUTATOR_HOOKFUNCTION(cts, ClientKill)
+{
+       ret_float = 0;
+
+       if(self.killindicator && self.killindicator.health == 1) // self.killindicator.health == 1 means that the kill indicator was spawned by CTS_ClientKill
+       {
+               remove(self.killindicator);
+               self.killindicator = world;
+
+               ClientKill_Now(); // allow instant kill in this case
+               return;
+       }
+
+}
+
+MUTATOR_HOOKFUNCTION(cts, Race_FinalCheckpoint)
+{
+       if(autocvar_g_cts_finish_kill_delay)
+               CTS_ClientKill(self);
+
+       return false;
+}
+
+MUTATOR_HOOKFUNCTION(cts, FixClientCvars)
+{
+       stuffcmd(fix_client, "cl_cmd settemp cl_movecliptokeyboard 2\n");
+       return false;
+}
+
 void cts_Initialize()
 {
        cts_ScoreRules();
index 732022019a003e9374d786200054eef98e4861a7..740d16c621522778b564340ecf22de6e524bd95a 100644 (file)
@@ -4,6 +4,19 @@
 
 #include "../teamplay.qh"
 
+int autocvar_g_domination_default_teams;
+bool autocvar_g_domination_disable_frags;
+int autocvar_g_domination_point_amt;
+bool autocvar_g_domination_point_fullbright;
+int autocvar_g_domination_point_leadlimit;
+bool autocvar_g_domination_roundbased;
+int autocvar_g_domination_roundbased_point_limit;
+float autocvar_g_domination_round_timelimit;
+float autocvar_g_domination_warmup;
+#define autocvar_g_domination_point_limit cvar("g_domination_point_limit")
+float autocvar_g_domination_point_rate;
+int autocvar_g_domination_teams_override;
+
 void dom_EventLog(string mode, float team_before, entity actor) // use an alias for easy changing and quick editing later
 {
        if(autocvar_sv_eventlog)
index bcddf704dbc818ad5773e96fbc98697bdc78876e..22d51590951a48da47db2f4bf8e1d9651cff34aa 100644 (file)
@@ -2,6 +2,20 @@
 
 #include "gamemode.qh"
 
+float autocvar_g_freezetag_frozen_maxtime;
+bool autocvar_g_freezetag_revive_nade;
+float autocvar_g_freezetag_revive_nade_health;
+int autocvar_g_freezetag_point_leadlimit;
+int autocvar_g_freezetag_point_limit;
+float autocvar_g_freezetag_revive_extra_size;
+float autocvar_g_freezetag_revive_speed;
+float autocvar_g_freezetag_revive_clearspeed;
+float autocvar_g_freezetag_round_timelimit;
+int autocvar_g_freezetag_teams;
+int autocvar_g_freezetag_teams_override;
+bool autocvar_g_freezetag_team_spawns;
+float autocvar_g_freezetag_warmup;
+
 const float SP_FREEZETAG_REVIVALS = 4;
 void freezetag_ScoreRules(float teams)
 {
index afad193f5f1ba439f41d8499a077885eeb4836a0..c6f6a02f63f521d3d2a1b0d73927ecffa23c9419 100644 (file)
@@ -7,6 +7,16 @@
 
 #include "../teamplay.qh"
 
+float autocvar_g_invasion_round_timelimit;
+int autocvar_g_invasion_teams;
+bool autocvar_g_invasion_team_spawns;
+float autocvar_g_invasion_spawnpoint_spawn_delay;
+#define autocvar_g_invasion_point_limit cvar("g_invasion_point_limit")
+float autocvar_g_invasion_warmup;
+int autocvar_g_invasion_monster_count;
+bool autocvar_g_invasion_zombies_only;
+float autocvar_g_invasion_spawn_delay;
+
 spawnfunc(invasion_spawnpoint)
 {
        if(!g_invasion) { remove(self); return; }
index 991285c92e89c65113b5de642afd46c64a87b291..ca1f241d6517bcc4c43e8ef66d6378dc8ef6c612 100644 (file)
@@ -2,10 +2,25 @@
 
 #include "gamemode.qh"
 
-// ===========================================================
-//  Keepaway game mode coding, written by Samual and Diabolik
-//  Last updated: September, 2012
-// ===========================================================
+int autocvar_g_keepaway_ballcarrier_effects;
+float autocvar_g_keepaway_ballcarrier_damage;
+float autocvar_g_keepaway_ballcarrier_force;
+float autocvar_g_keepaway_ballcarrier_highspeed;
+float autocvar_g_keepaway_ballcarrier_selfdamage;
+float autocvar_g_keepaway_ballcarrier_selfforce;
+float autocvar_g_keepaway_noncarrier_damage;
+float autocvar_g_keepaway_noncarrier_force;
+float autocvar_g_keepaway_noncarrier_selfdamage;
+float autocvar_g_keepaway_noncarrier_selfforce;
+bool autocvar_g_keepaway_noncarrier_warn;
+int autocvar_g_keepaway_score_bckill;
+int autocvar_g_keepaway_score_killac;
+int autocvar_g_keepaway_score_timepoints;
+float autocvar_g_keepaway_score_timeinterval;
+float autocvar_g_keepawayball_damageforcescale;
+int autocvar_g_keepawayball_effects;
+float autocvar_g_keepawayball_respawntime;
+int autocvar_g_keepawayball_trail_color;
 
 float ka_ballcarrier_waypointsprite_visible_for_player(entity e) // runs on waypoints which are attached to ballcarriers, updates once per frame
 {
index a27ebee02a91c170ef35f600a2a1a55c7b88dfb3..5ff4524084db2025b948912c17bf95a1738006c6 100644 (file)
@@ -2,6 +2,11 @@
 
 #include "gamemode.qh"
 
+int autocvar_g_keyhunt_point_leadlimit;
+bool autocvar_g_keyhunt_team_spawns;
+#define autocvar_g_keyhunt_point_limit cvar("g_keyhunt_point_limit")
+int autocvar_g_keyhunt_teams;
+int autocvar_g_keyhunt_teams_override;
 
 // #define KH_PLAYER_USE_ATTACHMENT
 // #define KH_PLAYER_USE_CARRIEDMODEL
index 84105f012f4a1a8fd7306ea877d445dbbb23f5a1..9660fcee7dcc8b22adae186852d619a087fa951f 100644 (file)
@@ -5,6 +5,12 @@
 #include "../campaign.qh"
 #include "../command/cmd.qh"
 
+int autocvar_g_lms_extra_lives;
+bool autocvar_g_lms_join_anytime;
+int autocvar_g_lms_last_join;
+#define autocvar_g_lms_lives_override cvar("g_lms_lives_override")
+bool autocvar_g_lms_regenerate;
+
 // main functions
 float LMS_NewPlayerLives()
 {
index eb0a2e99012190bbf38c434c3bd11ad73276c869..869cd90d2dbfcfb3e14fd1fab5a5ed3567360f32 100644 (file)
@@ -1,8 +1,32 @@
-
 #include "gamemode.qh"
 #include "../controlpoint.qh"
 #include "../generator.qh"
 
+float autocvar_g_onslaught_debug;
+float autocvar_g_onslaught_teleport_wait;
+bool autocvar_g_onslaught_spawn_at_controlpoints;
+bool autocvar_g_onslaught_spawn_at_generator;
+float autocvar_g_onslaught_cp_proxydecap;
+float autocvar_g_onslaught_cp_proxydecap_distance = 512;
+float autocvar_g_onslaught_cp_proxydecap_dps = 100;
+float autocvar_g_onslaught_spawn_at_controlpoints_chance = 0.5;
+float autocvar_g_onslaught_spawn_at_controlpoints_random;
+float autocvar_g_onslaught_spawn_at_generator_chance;
+float autocvar_g_onslaught_spawn_at_generator_random;
+float autocvar_g_onslaught_cp_buildhealth;
+float autocvar_g_onslaught_cp_buildtime;
+float autocvar_g_onslaught_cp_health;
+float autocvar_g_onslaught_cp_regen;
+float autocvar_g_onslaught_gen_health;
+float autocvar_g_onslaught_shield_force = 100;
+float autocvar_g_onslaught_allow_vehicle_touch;
+float autocvar_g_onslaught_round_timelimit;
+float autocvar_g_onslaught_point_limit;
+float autocvar_g_onslaught_warmup;
+float autocvar_g_onslaught_teleport_radius;
+float autocvar_g_onslaught_spawn_choose;
+float autocvar_g_onslaught_click_radius;
+
 void FixSize(entity e);
 
 // =======================
index 34196b38e336f23809aae036d2d28655912afdd8..d5e85c06940335867b345a5ee5f25627981ef379 100644 (file)
@@ -4,6 +4,11 @@
 
 #include "../race.qh"
 
+#define autocvar_g_race_laps_limit cvar("g_race_laps_limit")
+float autocvar_g_race_qualifying_timelimit;
+float autocvar_g_race_qualifying_timelimit_override;
+int autocvar_g_race_teams;
+
 // legacy bot roles
 .float race_checkpoint;
 void havocbot_role_race()
@@ -300,6 +305,12 @@ MUTATOR_HOOKFUNCTION(rc, GetRecords)
        return false;
 }
 
+MUTATOR_HOOKFUNCTION(rc, FixClientCvars)
+{
+       stuffcmd(fix_client, "cl_cmd settemp cl_movecliptokeyboard 2\n");
+       return false;
+}
+
 void race_Initialize()
 {
        race_ScoreRules();
index acb875c55cb027cf0fd071c0466497514b18d614..20270b5a202a3cc06647f1a6660e9e7a5ee5f110 100644 (file)
@@ -1,6 +1,11 @@
-
 #include "gamemode.qh"
 
+bool autocvar_g_tdm_team_spawns;
+int autocvar_g_tdm_point_limit;
+int autocvar_g_tdm_point_leadlimit;
+int autocvar_g_tdm_teams;
+int autocvar_g_tdm_teams_override;
+
 /*QUAKED spawnfunc_tdm_team (0 .5 .8) (-16 -16 -24) (16 16 32)
 Team declaration for TDM gameplay, this allows you to decide what team names and control point models are used in your map.
 Note: If you use spawnfunc_tdm_team entities you must define at least 2!  However, unlike domination, you don't need to make a blank one too.
index 94f3100a40cb7bd76d9d4f710d5e98586e3573c8..4f8298238fcaf7755799c08ea0af8cd84e56a0d0 100644 (file)
@@ -416,10 +416,7 @@ void race_SendTime(entity e, float cp, float t, float tvalid)
                                if(cp == race_timed_checkpoint)
                                {
                                        race_setTime(GetMapname(), t, e.crypto_idfp, e.netname, e);
-                                       if(g_cts && autocvar_g_cts_finish_kill_delay)
-                                       {
-                                               CTS_ClientKill(e);
-                                       }
+                                       MUTATOR_CALLHOOK(Race_FinalCheckpoint, e);
                                }
                                if(t < recordtime || recordtime == 0)
                                {
@@ -1145,6 +1142,9 @@ void penalty_use()
 
 spawnfunc(trigger_race_penalty)
 {
+       // TODO: find out why this wasnt done:
+       //if(!g_cts && !g_race) { remove(self); return; }
+
        EXACTTRIGGER_INIT;
 
        self.use = penalty_use;