From 65cb7f7edc8fd2de641b1221156efb4cd132ba34 Mon Sep 17 00:00:00 2001 From: TimePath Date: Thu, 5 Nov 2015 11:20:09 +1100 Subject: [PATCH] Mutators: self containment --- qcsrc/client/progs.inc | 6 - qcsrc/common/mutators/all.inc | 27 +++- .../mutators/mutator/bloodloss/bloodloss.qc} | 0 .../mutators/mutator/bloodloss/module.inc | 3 + .../mutator/breakablehook/breakablehook.qc} | 4 +- .../mutators/mutator/breakablehook/module.inc | 3 + .../mutators/mutator/buffs/buffs.qc} | 48 +++++++- .../common/mutators/mutator/buffs/module.inc | 3 + .../mutators/mutator/campcheck/campcheck.qc} | 4 + .../mutators/mutator/campcheck/module.inc | 3 + .../mutators/mutator/dodging/dodging.qc} | 15 ++- .../mutators/mutator/dodging/module.inc | 3 + .../mutators/mutator/hook/hook.qc} | 0 qcsrc/common/mutators/mutator/hook/module.inc | 3 + .../mutators/mutator/instagib/instagib.qc | 4 + .../mutator/invincibleproj/invincibleproj.qc} | 0 .../mutator/invincibleproj/module.inc | 3 + .../mutator/melee_only/melee_only.qc} | 0 .../mutators/mutator/melee_only/module.inc | 3 + .../mutators/mutator/midair/midair.qc} | 3 + .../common/mutators/mutator/midair/module.inc | 3 + .../mutators/mutator/multijump/module.inc | 3 + .../mutators/mutator/multijump/multijump.qc} | 11 +- .../common/mutators/mutator/nades/module.inc | 3 + .../mutators/mutator/nades/nades.qc} | 25 ++-- .../mutators/mutator/new_toys/module.inc | 3 + .../mutators/mutator/new_toys/new_toys.qc} | 0 qcsrc/common/mutators/mutator/nix/module.inc | 3 + .../mutators/mutator/nix/nix.qc} | 24 ++++ .../mutator/physical_items/module.inc | 3 + .../mutator/physical_items/physical_items.qc} | 4 + .../common/mutators/mutator/pinata/module.inc | 3 + .../mutators/mutator/pinata/pinata.qc} | 0 .../mutator/random_gravity/module.inc | 3 + .../mutator/random_gravity/random_gravity.qc} | 7 ++ .../mutators/mutator/rocketflying/module.inc | 3 + .../mutator/rocketflying/rocketflying.qc} | 0 .../mutators/mutator/rocketminsta/module.inc | 3 + .../mutator/rocketminsta/rocketminsta.qc} | 4 +- .../mutators/mutator/sandbox/module.inc | 4 + .../mutators/mutator/sandbox}/sandbox.qc | 15 +++ .../mutator/spawn_near_teammate/module.inc | 3 + .../spawn_near_teammate.qc} | 8 ++ .../mutators/mutator/superspec/module.inc | 3 + .../mutators/mutator/superspec/superspec.qc} | 0 .../mutators/mutator/touchexplode/module.inc | 3 + .../mutator/touchexplode/touchexplode.qc} | 5 + .../mutators/mutator/vampire/module.inc | 3 + .../mutators/mutator/vampire/vampire.qc} | 0 .../mutators/mutator/vampirehook/module.inc | 3 + .../mutator/vampirehook/vampirehook.qc} | 0 .../mutator/weaponarena_random/module.inc | 3 + .../weaponarena_random/weaponarena_random.qc} | 0 qcsrc/common/nades/all.qc | 3 +- .../dialog_multiplayer_create_mutators.qc | 4 +- qcsrc/server/autocvars.qh | 115 ------------------ qcsrc/server/cl_client.qc | 1 - qcsrc/server/mutators/all.inc | 27 ---- .../mutators/mutator/gamemode_freezetag.qc | 11 +- .../mutators/mutator/gamemode_keyhunt.qc | 4 +- qcsrc/server/progs.inc | 3 +- 61 files changed, 276 insertions(+), 182 deletions(-) rename qcsrc/{server/mutators/mutator/mutator_bloodloss.qc => common/mutators/mutator/bloodloss/bloodloss.qc} (100%) create mode 100644 qcsrc/common/mutators/mutator/bloodloss/module.inc rename qcsrc/{server/mutators/mutator/mutator_breakablehook.qc => common/mutators/mutator/breakablehook/breakablehook.qc} (90%) create mode 100644 qcsrc/common/mutators/mutator/breakablehook/module.inc rename qcsrc/{server/mutators/mutator/mutator_buffs.qc => common/mutators/mutator/buffs/buffs.qc} (93%) create mode 100644 qcsrc/common/mutators/mutator/buffs/module.inc rename qcsrc/{server/mutators/mutator/mutator_campcheck.qc => common/mutators/mutator/campcheck/campcheck.qc} (95%) create mode 100644 qcsrc/common/mutators/mutator/campcheck/module.inc rename qcsrc/{server/mutators/mutator/mutator_dodging.qc => common/mutators/mutator/dodging/dodging.qc} (95%) create mode 100644 qcsrc/common/mutators/mutator/dodging/module.inc rename qcsrc/{server/mutators/mutator/mutator_hook.qc => common/mutators/mutator/hook/hook.qc} (100%) create mode 100644 qcsrc/common/mutators/mutator/hook/module.inc rename qcsrc/{server/mutators/mutator/mutator_invincibleproj.qc => common/mutators/mutator/invincibleproj/invincibleproj.qc} (100%) create mode 100644 qcsrc/common/mutators/mutator/invincibleproj/module.inc rename qcsrc/{server/mutators/mutator/mutator_melee_only.qc => common/mutators/mutator/melee_only/melee_only.qc} (100%) create mode 100644 qcsrc/common/mutators/mutator/melee_only/module.inc rename qcsrc/{server/mutators/mutator/mutator_midair.qc => common/mutators/mutator/midair/midair.qc} (96%) create mode 100644 qcsrc/common/mutators/mutator/midair/module.inc create mode 100644 qcsrc/common/mutators/mutator/multijump/module.inc rename qcsrc/{server/mutators/mutator/mutator_multijump.qc => common/mutators/mutator/multijump/multijump.qc} (95%) create mode 100644 qcsrc/common/mutators/mutator/nades/module.inc rename qcsrc/{server/mutators/mutator/mutator_nades.qc => common/mutators/mutator/nades/nades.qc} (98%) create mode 100644 qcsrc/common/mutators/mutator/new_toys/module.inc rename qcsrc/{server/mutators/mutator/mutator_new_toys.qc => common/mutators/mutator/new_toys/new_toys.qc} (100%) create mode 100644 qcsrc/common/mutators/mutator/nix/module.inc rename qcsrc/{server/mutators/mutator/mutator_nix.qc => common/mutators/mutator/nix/nix.qc} (89%) create mode 100644 qcsrc/common/mutators/mutator/physical_items/module.inc rename qcsrc/{server/mutators/mutator/mutator_physical_items.qc => common/mutators/mutator/physical_items/physical_items.qc} (96%) create mode 100644 qcsrc/common/mutators/mutator/pinata/module.inc rename qcsrc/{server/mutators/mutator/mutator_pinata.qc => common/mutators/mutator/pinata/pinata.qc} (100%) create mode 100644 qcsrc/common/mutators/mutator/random_gravity/module.inc rename qcsrc/{server/mutators/mutator/mutator_random_gravity.qc => common/mutators/mutator/random_gravity/random_gravity.qc} (84%) create mode 100644 qcsrc/common/mutators/mutator/rocketflying/module.inc rename qcsrc/{server/mutators/mutator/mutator_rocketflying.qc => common/mutators/mutator/rocketflying/rocketflying.qc} (100%) create mode 100644 qcsrc/common/mutators/mutator/rocketminsta/module.inc rename qcsrc/{server/mutators/mutator/mutator_rocketminsta.qc => common/mutators/mutator/rocketminsta/rocketminsta.qc} (91%) create mode 100644 qcsrc/common/mutators/mutator/sandbox/module.inc rename qcsrc/{server/mutators/mutator => common/mutators/mutator/sandbox}/sandbox.qc (98%) create mode 100644 qcsrc/common/mutators/mutator/spawn_near_teammate/module.inc rename qcsrc/{server/mutators/mutator/mutator_spawn_near_teammate.qc => common/mutators/mutator/spawn_near_teammate/spawn_near_teammate.qc} (93%) create mode 100644 qcsrc/common/mutators/mutator/superspec/module.inc rename qcsrc/{server/mutators/mutator/mutator_superspec.qc => common/mutators/mutator/superspec/superspec.qc} (100%) create mode 100644 qcsrc/common/mutators/mutator/touchexplode/module.inc rename qcsrc/{server/mutators/mutator/mutator_touchexplode.qc => common/mutators/mutator/touchexplode/touchexplode.qc} (88%) create mode 100644 qcsrc/common/mutators/mutator/vampire/module.inc rename qcsrc/{server/mutators/mutator/mutator_vampire.qc => common/mutators/mutator/vampire/vampire.qc} (100%) create mode 100644 qcsrc/common/mutators/mutator/vampirehook/module.inc rename qcsrc/{server/mutators/mutator/mutator_vampirehook.qc => common/mutators/mutator/vampirehook/vampirehook.qc} (100%) create mode 100644 qcsrc/common/mutators/mutator/weaponarena_random/module.inc rename qcsrc/{server/mutators/mutator/mutator_weaponarena_random.qc => common/mutators/mutator/weaponarena_random/weaponarena_random.qc} (100%) diff --git a/qcsrc/client/progs.inc b/qcsrc/client/progs.inc index e3e8c00c0..7f473f481 100644 --- a/qcsrc/client/progs.inc +++ b/qcsrc/client/progs.inc @@ -68,12 +68,6 @@ #include "../lib/csqcmodel/cl_player.qc" #include "../lib/csqcmodel/interpolate.qc" -// TODO: move to common -#include "../server/mutators/mutator/mutator_multijump.qc" -#define IMPLEMENTATION -#include "../server/mutators/mutator/mutator_multijump.qc" -#undef IMPLEMENTATION - #include "../lib/warpzone/anglestransform.qc" #include "../lib/warpzone/client.qc" #include "../lib/warpzone/common.qc" diff --git a/qcsrc/common/mutators/all.inc b/qcsrc/common/mutators/all.inc index d3e63de45..21a23b069 100644 --- a/qcsrc/common/mutators/all.inc +++ b/qcsrc/common/mutators/all.inc @@ -1,8 +1,33 @@ -#include "mutator/instagib/module.inc" +#include "mutator/buffs/module.inc" #include "mutator/itemstime.qc" +#include "mutator/multijump/module.inc" +#include "mutator/nades/module.inc" +#include "mutator/superspec/module.inc" #include "mutator/waypoints/module.inc" // completely self contained +#include "mutator/bloodloss/module.inc" +#include "mutator/breakablehook/module.inc" +#include "mutator/campcheck/module.inc" #include "mutator/damagetext/module.inc" +#include "mutator/dodging/module.inc" +#include "mutator/hook/module.inc" +#include "mutator/instagib/module.inc" +#include "mutator/invincibleproj/module.inc" +#include "mutator/melee_only/module.inc" +#include "mutator/midair/module.inc" +#include "mutator/new_toys/module.inc" +#include "mutator/nix/module.inc" #include "mutator/overkill/module.inc" +#include "mutator/physical_items/module.inc" +#include "mutator/pinata/module.inc" +#include "mutator/random_gravity/module.inc" +#include "mutator/rocketflying/module.inc" +#include "mutator/rocketminsta/module.inc" +#include "mutator/sandbox/module.inc" +#include "mutator/spawn_near_teammate/module.inc" +#include "mutator/touchexplode/module.inc" +#include "mutator/vampirehook/module.inc" +#include "mutator/vampire/module.inc" +#include "mutator/weaponarena_random/module.inc" diff --git a/qcsrc/server/mutators/mutator/mutator_bloodloss.qc b/qcsrc/common/mutators/mutator/bloodloss/bloodloss.qc similarity index 100% rename from qcsrc/server/mutators/mutator/mutator_bloodloss.qc rename to qcsrc/common/mutators/mutator/bloodloss/bloodloss.qc diff --git a/qcsrc/common/mutators/mutator/bloodloss/module.inc b/qcsrc/common/mutators/mutator/bloodloss/module.inc new file mode 100644 index 000000000..d3f665a18 --- /dev/null +++ b/qcsrc/common/mutators/mutator/bloodloss/module.inc @@ -0,0 +1,3 @@ +#ifdef SVQC +#include "bloodloss.qc" +#endif diff --git a/qcsrc/server/mutators/mutator/mutator_breakablehook.qc b/qcsrc/common/mutators/mutator/breakablehook/breakablehook.qc similarity index 90% rename from qcsrc/server/mutators/mutator/mutator_breakablehook.qc rename to qcsrc/common/mutators/mutator/breakablehook/breakablehook.qc index cb9463b86..3ee077c72 100644 --- a/qcsrc/server/mutators/mutator/mutator_breakablehook.qc +++ b/qcsrc/common/mutators/mutator/breakablehook/breakablehook.qc @@ -1,6 +1,6 @@ #ifdef IMPLEMENTATION -#include "../../../common/deathtypes/all.qh" -#include "../../g_hook.qh" +#include "../../../deathtypes/all.qh" +#include "../../../../server/g_hook.qh" REGISTER_MUTATOR(breakablehook, cvar("g_breakablehook")); diff --git a/qcsrc/common/mutators/mutator/breakablehook/module.inc b/qcsrc/common/mutators/mutator/breakablehook/module.inc new file mode 100644 index 000000000..484eb4c56 --- /dev/null +++ b/qcsrc/common/mutators/mutator/breakablehook/module.inc @@ -0,0 +1,3 @@ +#ifdef SVQC +#include "breakablehook.qc" +#endif diff --git a/qcsrc/server/mutators/mutator/mutator_buffs.qc b/qcsrc/common/mutators/mutator/buffs/buffs.qc similarity index 93% rename from qcsrc/server/mutators/mutator/mutator_buffs.qc rename to qcsrc/common/mutators/mutator/buffs/buffs.qc index fd64e5862..d6bfb702c 100644 --- a/qcsrc/server/mutators/mutator/mutator_buffs.qc +++ b/qcsrc/common/mutators/mutator/buffs/buffs.qc @@ -1,6 +1,48 @@ #ifndef MUTATOR_BUFFS_H #define MUTATOR_BUFFS_H +#include "../instagib/module.inc" + +bool autocvar_g_buffs_effects; +float autocvar_g_buffs_waypoint_distance; +bool autocvar_g_buffs_randomize; +float autocvar_g_buffs_random_lifetime; +bool autocvar_g_buffs_random_location; +int autocvar_g_buffs_random_location_attempts; +int autocvar_g_buffs_spawn_count; +bool autocvar_g_buffs_replace_powerups; +float autocvar_g_buffs_cooldown_activate; +float autocvar_g_buffs_cooldown_respawn; +float autocvar_g_buffs_resistance_blockpercent; +float autocvar_g_buffs_medic_survive_chance; +float autocvar_g_buffs_medic_survive_health; +float autocvar_g_buffs_medic_rot; +float autocvar_g_buffs_medic_max; +float autocvar_g_buffs_medic_regen; +float autocvar_g_buffs_vengeance_damage_multiplier; +float autocvar_g_buffs_bash_force; +float autocvar_g_buffs_bash_force_self; +float autocvar_g_buffs_disability_slowtime; +float autocvar_g_buffs_disability_speed; +float autocvar_g_buffs_disability_rate; +float autocvar_g_buffs_disability_weaponspeed; +float autocvar_g_buffs_speed_speed; +float autocvar_g_buffs_speed_rate; +float autocvar_g_buffs_speed_weaponspeed; +float autocvar_g_buffs_speed_damage_take; +float autocvar_g_buffs_speed_regen; +float autocvar_g_buffs_vampire_damage_steal; +float autocvar_g_buffs_invisible_alpha; +float autocvar_g_buffs_flight_gravity; +float autocvar_g_buffs_jump_height; +float autocvar_g_buffs_inferno_burntime_factor; +float autocvar_g_buffs_inferno_burntime_min_time; +float autocvar_g_buffs_inferno_burntime_target_damage; +float autocvar_g_buffs_inferno_burntime_target_time; +float autocvar_g_buffs_inferno_damagemultiplier; +float autocvar_g_buffs_swapper_range; +float autocvar_g_buffs_magnet_range_item; + // ammo .float buff_ammo_prev_infitems; .int buff_ammo_prev_clipload; @@ -31,9 +73,9 @@ const vector BUFF_MAX = ('16 16 20'); #ifdef IMPLEMENTATION -#include "../../../common/triggers/target/music.qh" -#include "../../../common/gamemodes/all.qh" -#include "../../../common/buffs/all.qh" +#include "../../../triggers/target/music.qh" +#include "../../../gamemodes/all.qh" +#include "../../../buffs/all.qh" .float buff_time; void buffs_DelayedInit(); diff --git a/qcsrc/common/mutators/mutator/buffs/module.inc b/qcsrc/common/mutators/mutator/buffs/module.inc new file mode 100644 index 000000000..89d31a1b3 --- /dev/null +++ b/qcsrc/common/mutators/mutator/buffs/module.inc @@ -0,0 +1,3 @@ +#ifdef SVQC +#include "buffs.qc" +#endif diff --git a/qcsrc/server/mutators/mutator/mutator_campcheck.qc b/qcsrc/common/mutators/mutator/campcheck/campcheck.qc similarity index 95% rename from qcsrc/server/mutators/mutator/mutator_campcheck.qc rename to qcsrc/common/mutators/mutator/campcheck/campcheck.qc index be5bfceb8..0ba0bb64e 100644 --- a/qcsrc/server/mutators/mutator/mutator_campcheck.qc +++ b/qcsrc/common/mutators/mutator/campcheck/campcheck.qc @@ -1,4 +1,8 @@ #ifdef IMPLEMENTATION +float autocvar_g_campcheck_damage; +float autocvar_g_campcheck_distance; +float autocvar_g_campcheck_interval; + REGISTER_MUTATOR(campcheck, cvar("g_campcheck")); .float campcheck_nextcheck; diff --git a/qcsrc/common/mutators/mutator/campcheck/module.inc b/qcsrc/common/mutators/mutator/campcheck/module.inc new file mode 100644 index 000000000..9f4181f16 --- /dev/null +++ b/qcsrc/common/mutators/mutator/campcheck/module.inc @@ -0,0 +1,3 @@ +#ifdef SVQC +#include "campcheck.qc" +#endif diff --git a/qcsrc/server/mutators/mutator/mutator_dodging.qc b/qcsrc/common/mutators/mutator/dodging/dodging.qc similarity index 95% rename from qcsrc/server/mutators/mutator/mutator_dodging.qc rename to qcsrc/common/mutators/mutator/dodging/dodging.qc index 85b9fea61..f014ebbc5 100644 --- a/qcsrc/server/mutators/mutator/mutator_dodging.qc +++ b/qcsrc/common/mutators/mutator/dodging/dodging.qc @@ -28,6 +28,17 @@ #define PHYS_DODGING_RAMP_TIME autocvar_sv_dodging_ramp_time #define PHYS_DODGING_UP_SPEED autocvar_sv_dodging_up_speed #define PHYS_DODGING_WALL autocvar_sv_dodging_wall_dodging + + float autocvar_sv_dodging_delay; + float autocvar_sv_dodging_height_threshold; + float autocvar_sv_dodging_horiz_speed; + float autocvar_sv_dodging_horiz_speed_frozen; + float autocvar_sv_dodging_ramp_time; + bool autocvar_sv_dodging_sound; + float autocvar_sv_dodging_up_speed; + float autocvar_sv_dodging_wall_distance_threshold; + bool autocvar_sv_dodging_wall_dodging; + bool autocvar_sv_dodging_frozen_doubletap; #endif #ifdef SVQC @@ -40,8 +51,8 @@ float g_dodging; // the jump part of the dodge cannot be ramped .float dodging_single_action; -#include "../../../common/animdecide.qh" -#include "../../../common/physics.qh" +#include "../../../animdecide.qh" +#include "../../../physics.qh" .float cvar_cl_dodging_timeout; diff --git a/qcsrc/common/mutators/mutator/dodging/module.inc b/qcsrc/common/mutators/mutator/dodging/module.inc new file mode 100644 index 000000000..6308a2182 --- /dev/null +++ b/qcsrc/common/mutators/mutator/dodging/module.inc @@ -0,0 +1,3 @@ +#ifdef SVQC +#include "dodging.qc" +#endif diff --git a/qcsrc/server/mutators/mutator/mutator_hook.qc b/qcsrc/common/mutators/mutator/hook/hook.qc similarity index 100% rename from qcsrc/server/mutators/mutator/mutator_hook.qc rename to qcsrc/common/mutators/mutator/hook/hook.qc diff --git a/qcsrc/common/mutators/mutator/hook/module.inc b/qcsrc/common/mutators/mutator/hook/module.inc new file mode 100644 index 000000000..61600c47b --- /dev/null +++ b/qcsrc/common/mutators/mutator/hook/module.inc @@ -0,0 +1,3 @@ +#ifdef SVQC +#include "hook.qc" +#endif diff --git a/qcsrc/common/mutators/mutator/instagib/instagib.qc b/qcsrc/common/mutators/mutator/instagib/instagib.qc index 16b5b86d1..2a46dd699 100644 --- a/qcsrc/common/mutators/mutator/instagib/instagib.qc +++ b/qcsrc/common/mutators/mutator/instagib/instagib.qc @@ -3,6 +3,10 @@ #include "items.qc" +#ifdef SVQC +float autocvar_g_instagib_invis_alpha; +#endif + #endif #ifdef IMPLEMENTATION diff --git a/qcsrc/server/mutators/mutator/mutator_invincibleproj.qc b/qcsrc/common/mutators/mutator/invincibleproj/invincibleproj.qc similarity index 100% rename from qcsrc/server/mutators/mutator/mutator_invincibleproj.qc rename to qcsrc/common/mutators/mutator/invincibleproj/invincibleproj.qc diff --git a/qcsrc/common/mutators/mutator/invincibleproj/module.inc b/qcsrc/common/mutators/mutator/invincibleproj/module.inc new file mode 100644 index 000000000..61d038350 --- /dev/null +++ b/qcsrc/common/mutators/mutator/invincibleproj/module.inc @@ -0,0 +1,3 @@ +#ifdef SVQC +#include "invincibleproj.qc" +#endif diff --git a/qcsrc/server/mutators/mutator/mutator_melee_only.qc b/qcsrc/common/mutators/mutator/melee_only/melee_only.qc similarity index 100% rename from qcsrc/server/mutators/mutator/mutator_melee_only.qc rename to qcsrc/common/mutators/mutator/melee_only/melee_only.qc diff --git a/qcsrc/common/mutators/mutator/melee_only/module.inc b/qcsrc/common/mutators/mutator/melee_only/module.inc new file mode 100644 index 000000000..c711556cc --- /dev/null +++ b/qcsrc/common/mutators/mutator/melee_only/module.inc @@ -0,0 +1,3 @@ +#ifdef SVQC +#include "melee_only.qc" +#endif diff --git a/qcsrc/server/mutators/mutator/mutator_midair.qc b/qcsrc/common/mutators/mutator/midair/midair.qc similarity index 96% rename from qcsrc/server/mutators/mutator/mutator_midair.qc rename to qcsrc/common/mutators/mutator/midair/midair.qc index bf3428334..aaae006f5 100644 --- a/qcsrc/server/mutators/mutator/mutator_midair.qc +++ b/qcsrc/common/mutators/mutator/midair/midair.qc @@ -1,4 +1,7 @@ #ifdef IMPLEMENTATION + +float autocvar_g_midair_shieldtime; + REGISTER_MUTATOR(midair, cvar("g_midair")); .float midair_shieldtime; diff --git a/qcsrc/common/mutators/mutator/midair/module.inc b/qcsrc/common/mutators/mutator/midair/module.inc new file mode 100644 index 000000000..10b178915 --- /dev/null +++ b/qcsrc/common/mutators/mutator/midair/module.inc @@ -0,0 +1,3 @@ +#ifdef SVQC +#include "midair.qc" +#endif diff --git a/qcsrc/common/mutators/mutator/multijump/module.inc b/qcsrc/common/mutators/mutator/multijump/module.inc new file mode 100644 index 000000000..310332099 --- /dev/null +++ b/qcsrc/common/mutators/mutator/multijump/module.inc @@ -0,0 +1,3 @@ +#ifndef MENUQC +#include "multijump.qc" +#endif diff --git a/qcsrc/server/mutators/mutator/mutator_multijump.qc b/qcsrc/common/mutators/mutator/multijump/multijump.qc similarity index 95% rename from qcsrc/server/mutators/mutator/mutator_multijump.qc rename to qcsrc/common/mutators/mutator/multijump/multijump.qc index f01a801aa..00e22af72 100644 --- a/qcsrc/server/mutators/mutator/mutator_multijump.qc +++ b/qcsrc/common/mutators/mutator/multijump/multijump.qc @@ -1,8 +1,8 @@ #ifdef IMPLEMENTATION #ifdef SVQC - #include "../../antilag.qh" + #include "../../../../server/antilag.qh" #endif -#include "../../../common/physics.qh" +#include "../../../physics.qh" .int multijump_count; .bool multijump_ready; @@ -18,13 +18,18 @@ #elif defined(SVQC) +int autocvar_g_multijump; +float autocvar_g_multijump_add; +float autocvar_g_multijump_speed; +float autocvar_g_multijump_maxspeed; +float autocvar_g_multijump_dodging = 1; + #define PHYS_MULTIJUMP autocvar_g_multijump #define PHYS_MULTIJUMP_SPEED autocvar_g_multijump_speed #define PHYS_MULTIJUMP_ADD autocvar_g_multijump_add #define PHYS_MULTIJUMP_MAXSPEED autocvar_g_multijump_maxspeed #define PHYS_MULTIJUMP_DODGING autocvar_g_multijump_dodging - .float stat_multijump; .float stat_multijump_speed; .float stat_multijump_add; diff --git a/qcsrc/common/mutators/mutator/nades/module.inc b/qcsrc/common/mutators/mutator/nades/module.inc new file mode 100644 index 000000000..b9c0eb308 --- /dev/null +++ b/qcsrc/common/mutators/mutator/nades/module.inc @@ -0,0 +1,3 @@ +#ifdef SVQC +#include "nades.qc" +#endif diff --git a/qcsrc/server/mutators/mutator/mutator_nades.qc b/qcsrc/common/mutators/mutator/nades/nades.qc similarity index 98% rename from qcsrc/server/mutators/mutator/mutator_nades.qc rename to qcsrc/common/mutators/mutator/nades/nades.qc index 9cfc2ec41..556265f1f 100644 --- a/qcsrc/server/mutators/mutator/mutator_nades.qc +++ b/qcsrc/common/mutators/mutator/nades/nades.qc @@ -1,6 +1,10 @@ #ifndef MUTATOR_NADES_H #define MUTATOR_NADES_H +#ifdef SVQC +#include "../../../../server/mutators/mutator/gamemode_freezetag.qc" +#endif + .entity nade; .entity fake_nade; .float nade_timer; @@ -19,12 +23,10 @@ .float nade_show_particles; // Remove nades that are being thrown -void(entity player) nades_Clear; +void nades_Clear(entity player); // Give a bonus grenade to a player void(entity player, float score) nades_GiveBonus; -// Remove all bonus nades from a player -void(entity player) nades_RemoveBonus; /** * called to adjust nade damage and force on hit @@ -39,13 +41,14 @@ void(entity player) nades_RemoveBonus; MUTATOR_HOOKABLE(Nade_Damage, EV_Nade_Damage); #endif + #ifdef IMPLEMENTATION -#include "../../../common/nades/all.qh" -#include "../../../common/gamemodes/all.qh" -#include "../../../common/monsters/spawn.qh" -#include "../../../common/monsters/sv_monsters.qh" -#include "../../g_subs.qh" +#include "../../../nades/all.qh" +#include "../../../gamemodes/all.qh" +#include "../../../monsters/spawn.qh" +#include "../../../monsters/sv_monsters.qh" +#include "../../../../server/g_subs.qh" REGISTER_MUTATOR(nades, cvar("g_nades")) { @@ -796,11 +799,17 @@ void nades_GiveBonus(entity player, float score) } } +/** Remove all bonus nades from a player */ void nades_RemoveBonus(entity player) { player.bonus_nades = player.bonus_nade_score = 0; } +MUTATOR_HOOKFUNCTION(nades, PutClientInServer) +{ + nades_RemoveBonus(self); +} + float nade_customize() {SELFPARAM(); //if(IS_SPEC(other)) { return false; } diff --git a/qcsrc/common/mutators/mutator/new_toys/module.inc b/qcsrc/common/mutators/mutator/new_toys/module.inc new file mode 100644 index 000000000..1217177c5 --- /dev/null +++ b/qcsrc/common/mutators/mutator/new_toys/module.inc @@ -0,0 +1,3 @@ +#ifdef SVQC +#include "new_toys.qc" +#endif diff --git a/qcsrc/server/mutators/mutator/mutator_new_toys.qc b/qcsrc/common/mutators/mutator/new_toys/new_toys.qc similarity index 100% rename from qcsrc/server/mutators/mutator/mutator_new_toys.qc rename to qcsrc/common/mutators/mutator/new_toys/new_toys.qc diff --git a/qcsrc/common/mutators/mutator/nix/module.inc b/qcsrc/common/mutators/mutator/nix/module.inc new file mode 100644 index 000000000..fb4f9ec2b --- /dev/null +++ b/qcsrc/common/mutators/mutator/nix/module.inc @@ -0,0 +1,3 @@ +#ifdef SVQC +#include "nix.qc" +#endif diff --git a/qcsrc/server/mutators/mutator/mutator_nix.qc b/qcsrc/common/mutators/mutator/nix/nix.qc similarity index 89% rename from qcsrc/server/mutators/mutator/mutator_nix.qc rename to qcsrc/common/mutators/mutator/nix/nix.qc index 259547a05..1a8089ca6 100644 --- a/qcsrc/server/mutators/mutator/mutator_nix.qc +++ b/qcsrc/common/mutators/mutator/nix/nix.qc @@ -1,4 +1,28 @@ #ifdef IMPLEMENTATION +int autocvar_g_balance_nix_ammo_cells; +int autocvar_g_balance_nix_ammo_plasma; +int autocvar_g_balance_nix_ammo_fuel; +int autocvar_g_balance_nix_ammo_nails; +int autocvar_g_balance_nix_ammo_rockets; +int autocvar_g_balance_nix_ammo_shells; +int autocvar_g_balance_nix_ammoincr_cells; +int autocvar_g_balance_nix_ammoincr_plasma; +int autocvar_g_balance_nix_ammoincr_fuel; +int autocvar_g_balance_nix_ammoincr_nails; +int autocvar_g_balance_nix_ammoincr_rockets; +int autocvar_g_balance_nix_ammoincr_shells; +float autocvar_g_balance_nix_incrtime; +float autocvar_g_balance_nix_roundtime; +bool autocvar_g_nix_with_healtharmor; +bool autocvar_g_nix_with_blaster; +bool autocvar_g_nix_with_powerups; +int autocvar_g_pickup_cells_max; +int autocvar_g_pickup_plasma_max; +int autocvar_g_pickup_fuel_max; +int autocvar_g_pickup_nails_max; +int autocvar_g_pickup_rockets_max; +int autocvar_g_pickup_shells_max; + float g_nix_with_blaster; // WEAPONTODO int nix_weapon; diff --git a/qcsrc/common/mutators/mutator/physical_items/module.inc b/qcsrc/common/mutators/mutator/physical_items/module.inc new file mode 100644 index 000000000..7ed9b039b --- /dev/null +++ b/qcsrc/common/mutators/mutator/physical_items/module.inc @@ -0,0 +1,3 @@ +#ifdef SVQC +#include "physical_items.qc" +#endif diff --git a/qcsrc/server/mutators/mutator/mutator_physical_items.qc b/qcsrc/common/mutators/mutator/physical_items/physical_items.qc similarity index 96% rename from qcsrc/server/mutators/mutator/mutator_physical_items.qc rename to qcsrc/common/mutators/mutator/physical_items/physical_items.qc index 58a01ca2e..6fbe77bce 100644 --- a/qcsrc/server/mutators/mutator/mutator_physical_items.qc +++ b/qcsrc/common/mutators/mutator/physical_items/physical_items.qc @@ -1,4 +1,8 @@ #ifdef IMPLEMENTATION +int autocvar_g_physical_items; +float autocvar_g_physical_items_damageforcescale; +float autocvar_g_physical_items_reset; + REGISTER_MUTATOR(physical_items, cvar("g_physical_items")) { // check if we have a physics engine diff --git a/qcsrc/common/mutators/mutator/pinata/module.inc b/qcsrc/common/mutators/mutator/pinata/module.inc new file mode 100644 index 000000000..4e2296686 --- /dev/null +++ b/qcsrc/common/mutators/mutator/pinata/module.inc @@ -0,0 +1,3 @@ +#ifdef SVQC +#include "pinata.qc" +#endif diff --git a/qcsrc/server/mutators/mutator/mutator_pinata.qc b/qcsrc/common/mutators/mutator/pinata/pinata.qc similarity index 100% rename from qcsrc/server/mutators/mutator/mutator_pinata.qc rename to qcsrc/common/mutators/mutator/pinata/pinata.qc diff --git a/qcsrc/common/mutators/mutator/random_gravity/module.inc b/qcsrc/common/mutators/mutator/random_gravity/module.inc new file mode 100644 index 000000000..91baa4310 --- /dev/null +++ b/qcsrc/common/mutators/mutator/random_gravity/module.inc @@ -0,0 +1,3 @@ +#ifdef SVQC +#include "random_gravity.qc" +#endif diff --git a/qcsrc/server/mutators/mutator/mutator_random_gravity.qc b/qcsrc/common/mutators/mutator/random_gravity/random_gravity.qc similarity index 84% rename from qcsrc/server/mutators/mutator/mutator_random_gravity.qc rename to qcsrc/common/mutators/mutator/random_gravity/random_gravity.qc index 1b17c9f69..80abfe343 100644 --- a/qcsrc/server/mutators/mutator/mutator_random_gravity.qc +++ b/qcsrc/common/mutators/mutator/random_gravity/random_gravity.qc @@ -4,6 +4,13 @@ // Mutator by Mario // Inspired by Player 2 +float autocvar_g_random_gravity_negative_chance; +float autocvar_g_random_gravity_min; +float autocvar_g_random_gravity_max; +float autocvar_g_random_gravity_positive; +float autocvar_g_random_gravity_negative; +float autocvar_g_random_gravity_delay; + REGISTER_MUTATOR(random_gravity, cvar("g_random_gravity")) { MUTATOR_ONADD diff --git a/qcsrc/common/mutators/mutator/rocketflying/module.inc b/qcsrc/common/mutators/mutator/rocketflying/module.inc new file mode 100644 index 000000000..7036bc49d --- /dev/null +++ b/qcsrc/common/mutators/mutator/rocketflying/module.inc @@ -0,0 +1,3 @@ +#ifdef SVQC +#include "rocketflying.qc" +#endif diff --git a/qcsrc/server/mutators/mutator/mutator_rocketflying.qc b/qcsrc/common/mutators/mutator/rocketflying/rocketflying.qc similarity index 100% rename from qcsrc/server/mutators/mutator/mutator_rocketflying.qc rename to qcsrc/common/mutators/mutator/rocketflying/rocketflying.qc diff --git a/qcsrc/common/mutators/mutator/rocketminsta/module.inc b/qcsrc/common/mutators/mutator/rocketminsta/module.inc new file mode 100644 index 000000000..b7d02a9f6 --- /dev/null +++ b/qcsrc/common/mutators/mutator/rocketminsta/module.inc @@ -0,0 +1,3 @@ +#ifdef SVQC +#include "rocketminsta.qc" +#endif diff --git a/qcsrc/server/mutators/mutator/mutator_rocketminsta.qc b/qcsrc/common/mutators/mutator/rocketminsta/rocketminsta.qc similarity index 91% rename from qcsrc/server/mutators/mutator/mutator_rocketminsta.qc rename to qcsrc/common/mutators/mutator/rocketminsta/rocketminsta.qc index f8a1709da..6ddd6db94 100644 --- a/qcsrc/server/mutators/mutator/mutator_rocketminsta.qc +++ b/qcsrc/common/mutators/mutator/rocketminsta/rocketminsta.qc @@ -1,6 +1,6 @@ #ifdef IMPLEMENTATION -#include "../../../common/deathtypes/all.qh" -#include "../../round_handler.qh" +#include "../../../deathtypes/all.qh" +#include "../../../../server/round_handler.qh" REGISTER_MUTATOR(rm, cvar("g_instagib")); diff --git a/qcsrc/common/mutators/mutator/sandbox/module.inc b/qcsrc/common/mutators/mutator/sandbox/module.inc new file mode 100644 index 000000000..0715d5b40 --- /dev/null +++ b/qcsrc/common/mutators/mutator/sandbox/module.inc @@ -0,0 +1,4 @@ +#ifdef SVQC +#include "sandbox.qc" + +#endif diff --git a/qcsrc/server/mutators/mutator/sandbox.qc b/qcsrc/common/mutators/mutator/sandbox/sandbox.qc similarity index 98% rename from qcsrc/server/mutators/mutator/sandbox.qc rename to qcsrc/common/mutators/mutator/sandbox/sandbox.qc index 9369da457..e1decc8a0 100644 --- a/qcsrc/server/mutators/mutator/sandbox.qc +++ b/qcsrc/common/mutators/mutator/sandbox/sandbox.qc @@ -1,4 +1,19 @@ #ifdef IMPLEMENTATION +int autocvar_g_sandbox_info; +bool autocvar_g_sandbox_readonly; +string autocvar_g_sandbox_storage_name; +float autocvar_g_sandbox_storage_autosave; +bool autocvar_g_sandbox_storage_autoload; +float autocvar_g_sandbox_editor_flood; +int autocvar_g_sandbox_editor_maxobjects; +int autocvar_g_sandbox_editor_free; +float autocvar_g_sandbox_editor_distance_spawn; +float autocvar_g_sandbox_editor_distance_edit; +float autocvar_g_sandbox_object_scale_min; +float autocvar_g_sandbox_object_scale_max; +float autocvar_g_sandbox_object_material_velocity_min; +float autocvar_g_sandbox_object_material_velocity_factor; + float autosave_time; void sandbox_Database_Load(); diff --git a/qcsrc/common/mutators/mutator/spawn_near_teammate/module.inc b/qcsrc/common/mutators/mutator/spawn_near_teammate/module.inc new file mode 100644 index 000000000..f88a768a2 --- /dev/null +++ b/qcsrc/common/mutators/mutator/spawn_near_teammate/module.inc @@ -0,0 +1,3 @@ +#ifdef SVQC +#include "spawn_near_teammate.qc" +#endif diff --git a/qcsrc/server/mutators/mutator/mutator_spawn_near_teammate.qc b/qcsrc/common/mutators/mutator/spawn_near_teammate/spawn_near_teammate.qc similarity index 93% rename from qcsrc/server/mutators/mutator/mutator_spawn_near_teammate.qc rename to qcsrc/common/mutators/mutator/spawn_near_teammate/spawn_near_teammate.qc index 24147b279..cd78b4082 100644 --- a/qcsrc/server/mutators/mutator/mutator_spawn_near_teammate.qc +++ b/qcsrc/common/mutators/mutator/spawn_near_teammate/spawn_near_teammate.qc @@ -1,4 +1,12 @@ #ifdef IMPLEMENTATION + +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; +int autocvar_g_spawn_near_teammate_ignore_spawnpoint_check_health; +bool autocvar_g_spawn_near_teammate_ignore_spawnpoint_closetodeath; + REGISTER_MUTATOR(spawn_near_teammate, cvar("g_spawn_near_teammate") && teamplay); .entity msnt_lookat; diff --git a/qcsrc/common/mutators/mutator/superspec/module.inc b/qcsrc/common/mutators/mutator/superspec/module.inc new file mode 100644 index 000000000..8e0a998c2 --- /dev/null +++ b/qcsrc/common/mutators/mutator/superspec/module.inc @@ -0,0 +1,3 @@ +#ifdef SVQC +#include "superspec.qc" +#endif diff --git a/qcsrc/server/mutators/mutator/mutator_superspec.qc b/qcsrc/common/mutators/mutator/superspec/superspec.qc similarity index 100% rename from qcsrc/server/mutators/mutator/mutator_superspec.qc rename to qcsrc/common/mutators/mutator/superspec/superspec.qc diff --git a/qcsrc/common/mutators/mutator/touchexplode/module.inc b/qcsrc/common/mutators/mutator/touchexplode/module.inc new file mode 100644 index 000000000..d3b0ea5af --- /dev/null +++ b/qcsrc/common/mutators/mutator/touchexplode/module.inc @@ -0,0 +1,3 @@ +#ifdef SVQC +#include "touchexplode.qc" +#endif diff --git a/qcsrc/server/mutators/mutator/mutator_touchexplode.qc b/qcsrc/common/mutators/mutator/touchexplode/touchexplode.qc similarity index 88% rename from qcsrc/server/mutators/mutator/mutator_touchexplode.qc rename to qcsrc/common/mutators/mutator/touchexplode/touchexplode.qc index 29d9a2c60..ec439489d 100644 --- a/qcsrc/server/mutators/mutator/mutator_touchexplode.qc +++ b/qcsrc/common/mutators/mutator/touchexplode/touchexplode.qc @@ -1,4 +1,9 @@ #ifdef IMPLEMENTATION +float autocvar_g_touchexplode_radius; +float autocvar_g_touchexplode_damage; +float autocvar_g_touchexplode_edgedamage; +float autocvar_g_touchexplode_force; + REGISTER_MUTATOR(touchexplode, cvar("g_touchexplode")); .float touchexplode_time; diff --git a/qcsrc/common/mutators/mutator/vampire/module.inc b/qcsrc/common/mutators/mutator/vampire/module.inc new file mode 100644 index 000000000..864ea28b2 --- /dev/null +++ b/qcsrc/common/mutators/mutator/vampire/module.inc @@ -0,0 +1,3 @@ +#ifdef SVQC +#include "vampire.qc" +#endif diff --git a/qcsrc/server/mutators/mutator/mutator_vampire.qc b/qcsrc/common/mutators/mutator/vampire/vampire.qc similarity index 100% rename from qcsrc/server/mutators/mutator/mutator_vampire.qc rename to qcsrc/common/mutators/mutator/vampire/vampire.qc diff --git a/qcsrc/common/mutators/mutator/vampirehook/module.inc b/qcsrc/common/mutators/mutator/vampirehook/module.inc new file mode 100644 index 000000000..17ecf6005 --- /dev/null +++ b/qcsrc/common/mutators/mutator/vampirehook/module.inc @@ -0,0 +1,3 @@ +#ifdef SVQC +#include "vampirehook.qc" +#endif diff --git a/qcsrc/server/mutators/mutator/mutator_vampirehook.qc b/qcsrc/common/mutators/mutator/vampirehook/vampirehook.qc similarity index 100% rename from qcsrc/server/mutators/mutator/mutator_vampirehook.qc rename to qcsrc/common/mutators/mutator/vampirehook/vampirehook.qc diff --git a/qcsrc/common/mutators/mutator/weaponarena_random/module.inc b/qcsrc/common/mutators/mutator/weaponarena_random/module.inc new file mode 100644 index 000000000..b7a5f6690 --- /dev/null +++ b/qcsrc/common/mutators/mutator/weaponarena_random/module.inc @@ -0,0 +1,3 @@ +#ifdef SVQC +#include "weaponarena_random.qc" +#endif diff --git a/qcsrc/server/mutators/mutator/mutator_weaponarena_random.qc b/qcsrc/common/mutators/mutator/weaponarena_random/weaponarena_random.qc similarity index 100% rename from qcsrc/server/mutators/mutator/mutator_weaponarena_random.qc rename to qcsrc/common/mutators/mutator/weaponarena_random/weaponarena_random.qc diff --git a/qcsrc/common/nades/all.qc b/qcsrc/common/nades/all.qc index 7dfae12ac..4ba13408a 100644 --- a/qcsrc/common/nades/all.qc +++ b/qcsrc/common/nades/all.qc @@ -1,6 +1,7 @@ +#include "all.qh" + #if defined(CSQC) #include "../../client/defs.qh" - #include "all.qh" #include "../buffs/all.qh" #include "../movetypes/movetypes.qh" #include "../../client/main.qh" diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.qc b/qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.qc index 408cb950b..2f3cd47b0 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.qc +++ b/qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.qc @@ -54,7 +54,7 @@ string WeaponArenaString() { e = get_weaponinfo(j); if(argv(i) == e.netname) - s = strcat(s, " & ", e.message); + s = strcat(s, " & ", e.m_name); } } s = sprintf(_("%s Arena"), substring(s, 3, strlen(s) - 3)); @@ -259,7 +259,7 @@ void XonoticMutatorsDialog_fill(entity me) if((j & 1) == 0) me.TR(me); me.TDempty(me, 0.2); - me.TD(me, 1, 1.8, e = makeXonoticWeaponarenaCheckBox(strzone(w.netname), strzone(w.message))); + me.TD(me, 1, 1.8, e = makeXonoticWeaponarenaCheckBox(strzone(w.netname), strzone(w.m_name))); setDependentWeird(e, checkCompatibility_weaponarena_weapon); ++j; } diff --git a/qcsrc/server/autocvars.qh b/qcsrc/server/autocvars.qh index d72617fac..5d9c8dc71 100644 --- a/qcsrc/server/autocvars.qh +++ b/qcsrc/server/autocvars.qh @@ -121,20 +121,6 @@ float autocvar_g_balance_health_rotlinear; float autocvar_g_balance_health_rotstable; float autocvar_g_balance_kill_delay; float autocvar_g_balance_kill_antispam; -int autocvar_g_balance_nix_ammo_cells; -int autocvar_g_balance_nix_ammo_plasma; -int autocvar_g_balance_nix_ammo_fuel; -int autocvar_g_balance_nix_ammo_nails; -int autocvar_g_balance_nix_ammo_rockets; -int autocvar_g_balance_nix_ammo_shells; -int autocvar_g_balance_nix_ammoincr_cells; -int autocvar_g_balance_nix_ammoincr_plasma; -int autocvar_g_balance_nix_ammoincr_fuel; -int autocvar_g_balance_nix_ammoincr_nails; -int autocvar_g_balance_nix_ammoincr_rockets; -int autocvar_g_balance_nix_ammoincr_shells; -float autocvar_g_balance_nix_incrtime; -float autocvar_g_balance_nix_roundtime; float autocvar_g_balance_pause_armor_rot; float autocvar_g_balance_pause_armor_rot_spawn; float autocvar_g_balance_pause_fuel_regen; @@ -234,9 +220,7 @@ int autocvar_g_maxplayers; float autocvar_g_maxplayers_spectator_blocktime; float autocvar_g_maxpushtime; float autocvar_g_maxspeed; -float autocvar_g_midair_shieldtime; #define autocvar_g_instagib cvar("g_instagib") -float autocvar_g_instagib_invis_alpha; bool autocvar_g_instagib_damagedbycontents = true; bool autocvar_g_instagib_blaster_keepdamage = false; bool autocvar_g_instagib_blaster_keepforce = false; @@ -244,31 +228,17 @@ bool autocvar_g_instagib_blaster_keepforce = false; #define autocvar_g_mirrordamage_virtual cvar("g_mirrordamage_virtual") float autocvar_g_movement_highspeed = 1; -int autocvar_g_multijump; -float autocvar_g_multijump_add; -float autocvar_g_multijump_speed; -float autocvar_g_multijump_maxspeed; -float autocvar_g_multijump_dodging = 1; string autocvar_g_mutatormsg; //float autocvar_g_nick_flood_penalty; int autocvar_g_nick_flood_penalty_red; int autocvar_g_nick_flood_penalty_yellow; //float autocvar_g_nick_flood_timeout; -bool autocvar_g_nix_with_healtharmor; -bool autocvar_g_nix_with_blaster; -bool autocvar_g_nix_with_powerups; bool autocvar_g_nodepthtestitems; bool autocvar_g_nodepthtestplayers; bool autocvar_g_norecoil; float autocvar_g_items_mindist; float autocvar_g_items_maxdist; -int autocvar_g_pickup_cells_max; -int autocvar_g_pickup_plasma_max; -int autocvar_g_pickup_fuel_max; int autocvar_g_pickup_items; -int autocvar_g_pickup_nails_max; -int autocvar_g_pickup_rockets_max; -int autocvar_g_pickup_shells_max; float autocvar_g_player_alpha; float autocvar_g_player_brightness; bool autocvar_g_playerclip_collisions; @@ -379,17 +349,7 @@ string autocvar_sv_defaultplayermodel_pink; string autocvar_sv_defaultplayermodel_red; string autocvar_sv_defaultplayermodel_yellow; int autocvar_sv_defaultplayerskin; -float autocvar_sv_dodging_delay; -float autocvar_sv_dodging_height_threshold; -float autocvar_sv_dodging_horiz_speed; -float autocvar_sv_dodging_horiz_speed_frozen; -float autocvar_sv_dodging_ramp_time; -bool autocvar_sv_dodging_sound; -float autocvar_sv_dodging_up_speed; -float autocvar_sv_dodging_wall_distance_threshold; -bool autocvar_sv_dodging_wall_dodging; bool autocvar_sv_dodging_frozen; -bool autocvar_sv_dodging_frozen_doubletap; bool autocvar_sv_doublejump; bool autocvar_sv_eventlog; bool autocvar_sv_eventlog_console; @@ -482,25 +442,8 @@ bool autocvar_sv_gameplayfix_upwardvelocityclearsongroundflag; float autocvar_g_trueaim_minrange; bool autocvar_g_debug_defaultsounds; float autocvar_g_grab_range; -int autocvar_g_sandbox_info; -bool autocvar_g_sandbox_readonly; -string autocvar_g_sandbox_storage_name; -float autocvar_g_sandbox_storage_autosave; -bool autocvar_g_sandbox_storage_autoload; -float autocvar_g_sandbox_editor_flood; -int autocvar_g_sandbox_editor_maxobjects; -int autocvar_g_sandbox_editor_free; -float autocvar_g_sandbox_editor_distance_spawn; -float autocvar_g_sandbox_editor_distance_edit; -float autocvar_g_sandbox_object_scale_min; -float autocvar_g_sandbox_object_scale_max; -float autocvar_g_sandbox_object_material_velocity_min; -float autocvar_g_sandbox_object_material_velocity_factor; int autocvar_g_max_info_autoscreenshot; bool autocvar_physics_ode; -int autocvar_g_physical_items; -float autocvar_g_physical_items_damageforcescale; -float autocvar_g_physical_items_reset; float autocvar_g_monsters; bool autocvar_g_monsters_edit; bool autocvar_g_monsters_sounds; @@ -527,17 +470,7 @@ bool autocvar_g_monsters_respawn; float autocvar_g_monsters_armor_blockpercent; float autocvar_g_monsters_healthbars; float autocvar_g_monsters_lineofsight; -float autocvar_g_touchexplode_radius; -float autocvar_g_touchexplode_damage; -float autocvar_g_touchexplode_edgedamage; -float autocvar_g_touchexplode_force; #define autocvar_g_bloodloss cvar("g_bloodloss") -float autocvar_g_random_gravity_negative_chance; -float autocvar_g_random_gravity_min; -float autocvar_g_random_gravity_max; -float autocvar_g_random_gravity_positive; -float autocvar_g_random_gravity_negative; -float autocvar_g_random_gravity_delay; bool autocvar_g_nades; bool autocvar_g_nades_override_dropweapon = true; vector autocvar_g_nades_throw_offset; @@ -593,60 +526,12 @@ float autocvar_g_nades_heal_friend; float autocvar_g_nades_heal_foe; string autocvar_g_nades_pokenade_monster_type; float autocvar_g_nades_pokenade_monster_lifetime; -float autocvar_g_campcheck_damage; -float autocvar_g_campcheck_distance; -float autocvar_g_campcheck_interval; bool autocvar_g_jump_grunt; -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; -int autocvar_g_spawn_near_teammate_ignore_spawnpoint_check_health; -bool autocvar_g_spawn_near_teammate_ignore_spawnpoint_closetodeath; bool autocvar_g_physics_clientselect; string autocvar_g_physics_clientselect_options; string autocvar_g_physics_clientselect_default; -bool autocvar_g_buffs_effects; -float autocvar_g_buffs_waypoint_distance; -bool autocvar_g_buffs_randomize; -float autocvar_g_buffs_random_lifetime; -bool autocvar_g_buffs_random_location; -int autocvar_g_buffs_random_location_attempts; -int autocvar_g_buffs_spawn_count; -bool autocvar_g_buffs_replace_powerups; -float autocvar_g_buffs_cooldown_activate; -float autocvar_g_buffs_cooldown_respawn; -float autocvar_g_buffs_resistance_blockpercent; -float autocvar_g_buffs_medic_survive_chance; -float autocvar_g_buffs_medic_survive_health; -float autocvar_g_buffs_medic_rot; -float autocvar_g_buffs_medic_max; -float autocvar_g_buffs_medic_regen; -float autocvar_g_buffs_vengeance_damage_multiplier; -float autocvar_g_buffs_bash_force; -float autocvar_g_buffs_bash_force_self; -float autocvar_g_buffs_disability_slowtime; -float autocvar_g_buffs_disability_speed; -float autocvar_g_buffs_disability_rate; -float autocvar_g_buffs_disability_weaponspeed; -float autocvar_g_buffs_speed_speed; -float autocvar_g_buffs_speed_rate; -float autocvar_g_buffs_speed_weaponspeed; -float autocvar_g_buffs_speed_damage_take; -float autocvar_g_buffs_speed_regen; -float autocvar_g_buffs_vampire_damage_steal; -float autocvar_g_buffs_invisible_alpha; -float autocvar_g_buffs_flight_gravity; -float autocvar_g_buffs_jump_height; bool autocvar_sv_minigames; bool autocvar_sv_minigames_observer; -float autocvar_g_buffs_inferno_burntime_factor; -float autocvar_g_buffs_inferno_burntime_min_time; -float autocvar_g_buffs_inferno_burntime_target_damage; -float autocvar_g_buffs_inferno_burntime_target_time; -float autocvar_g_buffs_inferno_damagemultiplier; -float autocvar_g_buffs_swapper_range; -float autocvar_g_buffs_magnet_range_item; float autocvar_sv_player_scale; float autocvar_g_rm; float autocvar_g_rm_damage; diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index 462d42722..38203f52e 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -1871,7 +1871,6 @@ void LeaveSpectatorMode() if(!teamplay || autocvar_g_campaign || autocvar_g_balance_teams || (self.wasplayer && autocvar_g_changeteam_banned) || self.team_forced > 0) { self.classname = STR_PLAYER; - nades_RemoveBonus(self); if(autocvar_g_campaign || autocvar_g_balance_teams) { JoinBestTeam(self, false, true); } diff --git a/qcsrc/server/mutators/all.inc b/qcsrc/server/mutators/all.inc index e12e9c58b..b334137bd 100644 --- a/qcsrc/server/mutators/all.inc +++ b/qcsrc/server/mutators/all.inc @@ -12,30 +12,3 @@ #include "mutator/gamemode_onslaught.qc" #include "mutator/gamemode_race.qc" #include "mutator/gamemode_tdm.qc" - -#include "mutator/mutator_bloodloss.qc" -#include "mutator/mutator_breakablehook.qc" -#include "mutator/mutator_buffs.qc" -#include "mutator/mutator_campcheck.qc" -#include "mutator/mutator_dodging.qc" -#include "mutator/mutator_hook.qc" -#include "mutator/mutator_invincibleproj.qc" -#include "mutator/mutator_melee_only.qc" -#include "mutator/mutator_midair.qc" -#include "mutator/mutator_multijump.qc" -#include "mutator/mutator_nades.qc" -#include "mutator/mutator_new_toys.qc" -#include "mutator/mutator_nix.qc" -#include "mutator/mutator_physical_items.qc" -#include "mutator/mutator_pinata.qc" -#include "mutator/mutator_random_gravity.qc" -#include "mutator/mutator_rocketflying.qc" -#include "mutator/mutator_rocketminsta.qc" -#include "mutator/mutator_spawn_near_teammate.qc" -#include "mutator/mutator_superspec.qc" -#include "mutator/mutator_touchexplode.qc" -#include "mutator/mutator_vampirehook.qc" -#include "mutator/mutator_vampire.qc" -#include "mutator/mutator_weaponarena_random.qc" - -#include "mutator/sandbox.qc" diff --git a/qcsrc/server/mutators/mutator/gamemode_freezetag.qc b/qcsrc/server/mutators/mutator/gamemode_freezetag.qc index 14e345046..29ae00668 100644 --- a/qcsrc/server/mutators/mutator/gamemode_freezetag.qc +++ b/qcsrc/server/mutators/mutator/gamemode_freezetag.qc @@ -44,15 +44,16 @@ const float ICE_MIN_ALPHA = 0.1; float freezetag_teams; .float reviving; // temp var -#endif +float autocvar_g_freezetag_revive_extra_size; +float autocvar_g_freezetag_revive_speed; +bool autocvar_g_freezetag_revive_nade; +float autocvar_g_freezetag_revive_nade_health; + +#endif #ifdef IMPLEMENTATION float autocvar_g_freezetag_frozen_maxtime; -bool autocvar_g_freezetag_revive_nade; -float autocvar_g_freezetag_revive_nade_health; -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; diff --git a/qcsrc/server/mutators/mutator/gamemode_keyhunt.qc b/qcsrc/server/mutators/mutator/gamemode_keyhunt.qc index bcc14eca9..341d13308 100644 --- a/qcsrc/server/mutators/mutator/gamemode_keyhunt.qc +++ b/qcsrc/server/mutators/mutator/gamemode_keyhunt.qc @@ -800,7 +800,7 @@ void key_reset() } const string STR_ITEM_KH_KEY = "item_kh_key"; -void kh_Key_Spawn(entity initial_owner, float angle, float i) // runs every time a new flag is created, ie after all the keys have been collected +void kh_Key_Spawn(entity initial_owner, float _angle, float i) // runs every time a new flag is created, ie after all the keys have been collected { entity key = spawn(); key.count = i; @@ -809,7 +809,7 @@ void kh_Key_Spawn(entity initial_owner, float angle, float i) // runs every tim key.think = kh_Key_Think; key.nextthink = time; key.items = IT_KEY1 | IT_KEY2; - key.cnt = angle; + key.cnt = _angle; key.angles = '0 360 0' * random(); key.event_damage = kh_Key_Damage; key.takedamage = DAMAGE_YES; diff --git a/qcsrc/server/progs.inc b/qcsrc/server/progs.inc index b51ae73a6..a68f9dd71 100644 --- a/qcsrc/server/progs.inc +++ b/qcsrc/server/progs.inc @@ -43,8 +43,6 @@ #include "command/all.qc" -#include "mutators/all.qc" - #include "pathlib/_all.inc" #include "weapons/accuracy.qc" @@ -88,6 +86,7 @@ #include "../common/vehicles/all.qc" #include "../common/weapons/all.qc" #include "../common/mutators/all.qc" +#include "mutators/all.qc" #include "../common/turrets/sv_turrets.qc" #include "../common/turrets/config.qc" -- 2.39.2