From 70ea43b4278e37fb741f01832c447de8eb707c3e Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 15 Aug 2019 21:36:10 +1000 Subject: [PATCH] Add a force_zscale setting to weapons that use the blaster secondary --- bal-wep-mario.cfg | 6 ++++++ bal-wep-nexuiz25.cfg | 6 ++++++ bal-wep-overkill-nerfed.cfg | 5 +++-- bal-wep-samual.cfg | 6 ++++++ bal-wep-xdf.cfg | 6 ++++++ bal-wep-xonotic.cfg | 6 ++++++ bal-wep-xpm.cfg | 6 ++++++ qcsrc/common/mutators/mutator/overkill/okhmg.qh | 1 + qcsrc/common/mutators/mutator/overkill/okmachinegun.qh | 1 + qcsrc/common/mutators/mutator/overkill/oknex.qh | 1 + qcsrc/common/mutators/mutator/overkill/okrpc.qh | 1 + qcsrc/common/mutators/mutator/overkill/okshotgun.qh | 1 + qcsrc/common/weapons/weapon/blaster.qc | 10 +++++++++- qcsrc/common/weapons/weapon/blaster.qh | 2 ++ qcsrc/common/weapons/weapon/vaporizer.qh | 1 + qcsrc/server/g_damage.qc | 9 +++++---- qcsrc/server/g_damage.qh | 2 +- 17 files changed, 62 insertions(+), 8 deletions(-) diff --git a/bal-wep-mario.cfg b/bal-wep-mario.cfg index 653ef0397..69ea36568 100644 --- a/bal-wep-mario.cfg +++ b/bal-wep-mario.cfg @@ -448,6 +448,7 @@ set g_balance_vaporizer_secondary_damage 25 set g_balance_vaporizer_secondary_delay 0 set g_balance_vaporizer_secondary_edgedamage 12.5 set g_balance_vaporizer_secondary_force 400 +set g_balance_vaporizer_secondary_force_zscale 1.2 set g_balance_vaporizer_secondary_lifetime 5 set g_balance_vaporizer_secondary_radius 70 set g_balance_vaporizer_secondary_refire 0.7 @@ -797,6 +798,7 @@ set g_balance_okhmg_secondary_damage 25 set g_balance_okhmg_secondary_delay 0 set g_balance_okhmg_secondary_edgedamage 12.5 set g_balance_okhmg_secondary_force 300 +set g_balance_okhmg_secondary_force_zscale 1 set g_balance_okhmg_secondary_lifetime 5 set g_balance_okhmg_secondary_radius 70 set g_balance_okhmg_secondary_refire 0.7 @@ -827,6 +829,7 @@ set g_balance_okmachinegun_secondary_damage 25 set g_balance_okmachinegun_secondary_delay 0 set g_balance_okmachinegun_secondary_edgedamage 12.5 set g_balance_okmachinegun_secondary_force 300 +set g_balance_okmachinegun_secondary_force_zscale 1 set g_balance_okmachinegun_secondary_lifetime 5 set g_balance_okmachinegun_secondary_radius 70 set g_balance_okmachinegun_secondary_refire 0.7 @@ -879,6 +882,7 @@ set g_balance_oknex_secondary_damagefalloff_mindist 0 set g_balance_oknex_secondary_delay 0 set g_balance_oknex_secondary_edgedamage 12.5 set g_balance_oknex_secondary_force 300 +set g_balance_oknex_secondary_force_zscale 1 set g_balance_oknex_secondary_lifetime 5 set g_balance_oknex_secondary_radius 70 set g_balance_oknex_secondary_refire 0.7 @@ -915,6 +919,7 @@ set g_balance_okrpc_secondary_damage 25 set g_balance_okrpc_secondary_delay 0 set g_balance_okrpc_secondary_edgedamage 12.5 set g_balance_okrpc_secondary_force 300 +set g_balance_okrpc_secondary_force_zscale 1 set g_balance_okrpc_secondary_lifetime 5 set g_balance_okrpc_secondary_radius 70 set g_balance_okrpc_secondary_refire 0.7 @@ -946,6 +951,7 @@ set g_balance_okshotgun_secondary_damage 25 set g_balance_okshotgun_secondary_delay 0 set g_balance_okshotgun_secondary_edgedamage 12.5 set g_balance_okshotgun_secondary_force 300 +set g_balance_okshotgun_secondary_force_zscale 1 set g_balance_okshotgun_secondary_lifetime 5 set g_balance_okshotgun_secondary_radius 70 set g_balance_okshotgun_secondary_refire 0.7 diff --git a/bal-wep-nexuiz25.cfg b/bal-wep-nexuiz25.cfg index a826a879d..ccf1a7de9 100644 --- a/bal-wep-nexuiz25.cfg +++ b/bal-wep-nexuiz25.cfg @@ -448,6 +448,7 @@ set g_balance_vaporizer_secondary_damage 25 set g_balance_vaporizer_secondary_delay 0 set g_balance_vaporizer_secondary_edgedamage 12.5 set g_balance_vaporizer_secondary_force 400 +set g_balance_vaporizer_secondary_force_zscale 1 set g_balance_vaporizer_secondary_lifetime 5 set g_balance_vaporizer_secondary_radius 70 set g_balance_vaporizer_secondary_refire 0.7 @@ -797,6 +798,7 @@ set g_balance_okhmg_secondary_damage 25 set g_balance_okhmg_secondary_delay 0 set g_balance_okhmg_secondary_edgedamage 12.5 set g_balance_okhmg_secondary_force 300 +set g_balance_okhmg_secondary_force_zscale 1 set g_balance_okhmg_secondary_lifetime 5 set g_balance_okhmg_secondary_radius 70 set g_balance_okhmg_secondary_refire 0.7 @@ -827,6 +829,7 @@ set g_balance_okmachinegun_secondary_damage 25 set g_balance_okmachinegun_secondary_delay 0 set g_balance_okmachinegun_secondary_edgedamage 12.5 set g_balance_okmachinegun_secondary_force 300 +set g_balance_okmachinegun_secondary_force_zscale 1 set g_balance_okmachinegun_secondary_lifetime 5 set g_balance_okmachinegun_secondary_radius 70 set g_balance_okmachinegun_secondary_refire 0.7 @@ -879,6 +882,7 @@ set g_balance_oknex_secondary_damagefalloff_mindist 0 set g_balance_oknex_secondary_delay 0 set g_balance_oknex_secondary_edgedamage 12.5 set g_balance_oknex_secondary_force 300 +set g_balance_oknex_secondary_force_zscale 1 set g_balance_oknex_secondary_lifetime 5 set g_balance_oknex_secondary_radius 70 set g_balance_oknex_secondary_refire 0.7 @@ -915,6 +919,7 @@ set g_balance_okrpc_secondary_damage 25 set g_balance_okrpc_secondary_delay 0 set g_balance_okrpc_secondary_edgedamage 12.5 set g_balance_okrpc_secondary_force 300 +set g_balance_okrpc_secondary_force_zscale 1 set g_balance_okrpc_secondary_lifetime 5 set g_balance_okrpc_secondary_radius 70 set g_balance_okrpc_secondary_refire 0.7 @@ -946,6 +951,7 @@ set g_balance_okshotgun_secondary_damage 25 set g_balance_okshotgun_secondary_delay 0 set g_balance_okshotgun_secondary_edgedamage 12.5 set g_balance_okshotgun_secondary_force 300 +set g_balance_okshotgun_secondary_force_zscale 1 set g_balance_okshotgun_secondary_lifetime 5 set g_balance_okshotgun_secondary_radius 70 set g_balance_okshotgun_secondary_refire 0.7 diff --git a/bal-wep-overkill-nerfed.cfg b/bal-wep-overkill-nerfed.cfg index e4fb02236..c3365c1ca 100644 --- a/bal-wep-overkill-nerfed.cfg +++ b/bal-wep-overkill-nerfed.cfg @@ -18,6 +18,7 @@ set g_balance_okshotgun_secondary_damage 20 set g_balance_okshotgun_secondary_delay 0 set g_balance_okshotgun_secondary_edgedamage 10 set g_balance_okshotgun_secondary_force 300 +set g_balance_okshotgun_secondary_force_zscale 1 set g_balance_okshotgun_secondary_lifetime 5 set g_balance_okshotgun_secondary_radius 60 set g_balance_okshotgun_secondary_refire 0.7 @@ -47,7 +48,7 @@ set g_balance_okmachinegun_secondary_animtime 0.2 set g_balance_okmachinegun_secondary_damage 20 set g_balance_okmachinegun_secondary_delay 0 set g_balance_okmachinegun_secondary_edgedamage 10 -set g_balance_okmachinegun_secondary_force 300 +set g_balance_okmachinegun_secondary_force_zscale 1 set g_balance_okmachinegun_secondary_lifetime 5 set g_balance_okmachinegun_secondary_radius 60 set g_balance_okmachinegun_secondary_refire 0.7 @@ -97,7 +98,7 @@ set g_balance_oknex_secondary_damagefalloff_forcehalflife 0 set g_balance_oknex_secondary_damagefalloff_halflife 0 set g_balance_oknex_secondary_damagefalloff_maxdist 0 set g_balance_oknex_secondary_damagefalloff_mindist 0 -set g_balance_oknex_secondary_force 0 +set g_balance_oknex_secondary_force_zscale 1 set g_balance_oknex_secondary_refire 0 set g_balance_oknex_secondary_refire_type 0 set g_balance_oknex_secondary_delay 0 diff --git a/bal-wep-samual.cfg b/bal-wep-samual.cfg index bcd652f27..4549f99c7 100644 --- a/bal-wep-samual.cfg +++ b/bal-wep-samual.cfg @@ -448,6 +448,7 @@ set g_balance_vaporizer_secondary_damage 25 set g_balance_vaporizer_secondary_delay 0 set g_balance_vaporizer_secondary_edgedamage 12.5 set g_balance_vaporizer_secondary_force 400 +set g_balance_vaporizer_secondary_force_zscale 1 set g_balance_vaporizer_secondary_lifetime 5 set g_balance_vaporizer_secondary_radius 70 set g_balance_vaporizer_secondary_refire 0.7 @@ -797,6 +798,7 @@ set g_balance_okhmg_secondary_damage 25 set g_balance_okhmg_secondary_delay 0 set g_balance_okhmg_secondary_edgedamage 12.5 set g_balance_okhmg_secondary_force 300 +set g_balance_okhmg_secondary_force_zscale 1 set g_balance_okhmg_secondary_lifetime 5 set g_balance_okhmg_secondary_radius 70 set g_balance_okhmg_secondary_refire 0.7 @@ -827,6 +829,7 @@ set g_balance_okmachinegun_secondary_damage 20 set g_balance_okmachinegun_secondary_delay 0 set g_balance_okmachinegun_secondary_edgedamage 10 set g_balance_okmachinegun_secondary_force 300 +set g_balance_okmachinegun_secondary_force_zscale 1 set g_balance_okmachinegun_secondary_lifetime 5 set g_balance_okmachinegun_secondary_radius 60 set g_balance_okmachinegun_secondary_refire 0.7 @@ -879,6 +882,7 @@ set g_balance_oknex_secondary_damagefalloff_mindist 0 set g_balance_oknex_secondary_delay 0 set g_balance_oknex_secondary_edgedamage 10 set g_balance_oknex_secondary_force 0 +set g_balance_oknex_secondary_force_zscale 1 set g_balance_oknex_secondary_lifetime 5 set g_balance_oknex_secondary_radius 60 set g_balance_oknex_secondary_refire 0 @@ -915,6 +919,7 @@ set g_balance_okrpc_secondary_damage 25 set g_balance_okrpc_secondary_delay 0 set g_balance_okrpc_secondary_edgedamage 12.5 set g_balance_okrpc_secondary_force 300 +set g_balance_okrpc_secondary_force_zscale 1 set g_balance_okrpc_secondary_lifetime 5 set g_balance_okrpc_secondary_radius 70 set g_balance_okrpc_secondary_refire 0.7 @@ -946,6 +951,7 @@ set g_balance_okshotgun_secondary_damage 20 set g_balance_okshotgun_secondary_delay 0 set g_balance_okshotgun_secondary_edgedamage 10 set g_balance_okshotgun_secondary_force 300 +set g_balance_okshotgun_secondary_force_zscale 1 set g_balance_okshotgun_secondary_lifetime 5 set g_balance_okshotgun_secondary_radius 60 set g_balance_okshotgun_secondary_refire 0.7 diff --git a/bal-wep-xdf.cfg b/bal-wep-xdf.cfg index 324bb5d58..62d1cbb44 100644 --- a/bal-wep-xdf.cfg +++ b/bal-wep-xdf.cfg @@ -448,6 +448,7 @@ set g_balance_vaporizer_secondary_damage 25 set g_balance_vaporizer_secondary_delay 0 set g_balance_vaporizer_secondary_edgedamage 12.5 set g_balance_vaporizer_secondary_force 400 +set g_balance_vaporizer_secondary_force_zscale 1.2 set g_balance_vaporizer_secondary_lifetime 5 set g_balance_vaporizer_secondary_radius 70 set g_balance_vaporizer_secondary_refire 0.7 @@ -797,6 +798,7 @@ set g_balance_okhmg_secondary_damage 25 set g_balance_okhmg_secondary_delay 0 set g_balance_okhmg_secondary_edgedamage 12.5 set g_balance_okhmg_secondary_force 300 +set g_balance_okhmg_secondary_force_zscale 1 set g_balance_okhmg_secondary_lifetime 5 set g_balance_okhmg_secondary_radius 70 set g_balance_okhmg_secondary_refire 0.7 @@ -827,6 +829,7 @@ set g_balance_okmachinegun_secondary_damage 20 set g_balance_okmachinegun_secondary_delay 0 set g_balance_okmachinegun_secondary_edgedamage 10 set g_balance_okmachinegun_secondary_force 300 +set g_balance_okmachinegun_secondary_force_zscale 1 set g_balance_okmachinegun_secondary_lifetime 5 set g_balance_okmachinegun_secondary_radius 60 set g_balance_okmachinegun_secondary_refire 0.7 @@ -879,6 +882,7 @@ set g_balance_oknex_secondary_damagefalloff_mindist 0 set g_balance_oknex_secondary_delay 0 set g_balance_oknex_secondary_edgedamage 10 set g_balance_oknex_secondary_force 0 +set g_balance_oknex_secondary_force_zscale 1 set g_balance_oknex_secondary_lifetime 5 set g_balance_oknex_secondary_radius 60 set g_balance_oknex_secondary_refire 0 @@ -915,6 +919,7 @@ set g_balance_okrpc_secondary_damage 25 set g_balance_okrpc_secondary_delay 0 set g_balance_okrpc_secondary_edgedamage 12.5 set g_balance_okrpc_secondary_force 300 +set g_balance_okrpc_secondary_force_zscale 1 set g_balance_okrpc_secondary_lifetime 5 set g_balance_okrpc_secondary_radius 70 set g_balance_okrpc_secondary_refire 0.7 @@ -946,6 +951,7 @@ set g_balance_okshotgun_secondary_damage 20 set g_balance_okshotgun_secondary_delay 0 set g_balance_okshotgun_secondary_edgedamage 10 set g_balance_okshotgun_secondary_force 300 +set g_balance_okshotgun_secondary_force_zscale 1 set g_balance_okshotgun_secondary_lifetime 5 set g_balance_okshotgun_secondary_radius 60 set g_balance_okshotgun_secondary_refire 0.7 diff --git a/bal-wep-xonotic.cfg b/bal-wep-xonotic.cfg index b897fe631..44ca94b9b 100644 --- a/bal-wep-xonotic.cfg +++ b/bal-wep-xonotic.cfg @@ -448,6 +448,7 @@ set g_balance_vaporizer_secondary_damage 25 set g_balance_vaporizer_secondary_delay 0 set g_balance_vaporizer_secondary_edgedamage 12.5 set g_balance_vaporizer_secondary_force 400 +set g_balance_vaporizer_secondary_force_zscale 1.2 set g_balance_vaporizer_secondary_lifetime 5 set g_balance_vaporizer_secondary_radius 70 set g_balance_vaporizer_secondary_refire 0.7 @@ -797,6 +798,7 @@ set g_balance_okhmg_secondary_damage 25 set g_balance_okhmg_secondary_delay 0 set g_balance_okhmg_secondary_edgedamage 12.5 set g_balance_okhmg_secondary_force 300 +set g_balance_okhmg_secondary_force_zscale 1 set g_balance_okhmg_secondary_lifetime 5 set g_balance_okhmg_secondary_radius 70 set g_balance_okhmg_secondary_refire 0.7 @@ -827,6 +829,7 @@ set g_balance_okmachinegun_secondary_damage 25 set g_balance_okmachinegun_secondary_delay 0 set g_balance_okmachinegun_secondary_edgedamage 12.5 set g_balance_okmachinegun_secondary_force 300 +set g_balance_okmachinegun_secondary_force_zscale 1 set g_balance_okmachinegun_secondary_lifetime 5 set g_balance_okmachinegun_secondary_radius 70 set g_balance_okmachinegun_secondary_refire 0.7 @@ -879,6 +882,7 @@ set g_balance_oknex_secondary_damagefalloff_mindist 0 set g_balance_oknex_secondary_delay 0 set g_balance_oknex_secondary_edgedamage 12.5 set g_balance_oknex_secondary_force 300 +set g_balance_oknex_secondary_force_zscale 1 set g_balance_oknex_secondary_lifetime 5 set g_balance_oknex_secondary_radius 70 set g_balance_oknex_secondary_refire 0.7 @@ -915,6 +919,7 @@ set g_balance_okrpc_secondary_damage 25 set g_balance_okrpc_secondary_delay 0 set g_balance_okrpc_secondary_edgedamage 12.5 set g_balance_okrpc_secondary_force 300 +set g_balance_okrpc_secondary_force_zscale 1 set g_balance_okrpc_secondary_lifetime 5 set g_balance_okrpc_secondary_radius 70 set g_balance_okrpc_secondary_refire 0.7 @@ -946,6 +951,7 @@ set g_balance_okshotgun_secondary_damage 25 set g_balance_okshotgun_secondary_delay 0 set g_balance_okshotgun_secondary_edgedamage 12.5 set g_balance_okshotgun_secondary_force 300 +set g_balance_okshotgun_secondary_force_zscale 1 set g_balance_okshotgun_secondary_lifetime 5 set g_balance_okshotgun_secondary_radius 70 set g_balance_okshotgun_secondary_refire 0.7 diff --git a/bal-wep-xpm.cfg b/bal-wep-xpm.cfg index 17aed812a..5152579ab 100644 --- a/bal-wep-xpm.cfg +++ b/bal-wep-xpm.cfg @@ -448,6 +448,7 @@ set g_balance_vaporizer_secondary_damage 25 set g_balance_vaporizer_secondary_delay 0 set g_balance_vaporizer_secondary_edgedamage 12.5 set g_balance_vaporizer_secondary_force 400 +set g_balance_vaporizer_secondary_force_zscale 1.2 set g_balance_vaporizer_secondary_lifetime 5 set g_balance_vaporizer_secondary_radius 70 set g_balance_vaporizer_secondary_refire 0.7 @@ -797,6 +798,7 @@ set g_balance_okhmg_secondary_damage 25 set g_balance_okhmg_secondary_delay 0 set g_balance_okhmg_secondary_edgedamage 12.5 set g_balance_okhmg_secondary_force 300 +set g_balance_okhmg_secondary_force_zscale 1 set g_balance_okhmg_secondary_lifetime 5 set g_balance_okhmg_secondary_radius 70 set g_balance_okhmg_secondary_refire 0.7 @@ -827,6 +829,7 @@ set g_balance_okmachinegun_secondary_damage 20 set g_balance_okmachinegun_secondary_delay 0 set g_balance_okmachinegun_secondary_edgedamage 10 set g_balance_okmachinegun_secondary_force 300 +set g_balance_okmachinegun_secondary_force_zscale 1 set g_balance_okmachinegun_secondary_lifetime 5 set g_balance_okmachinegun_secondary_radius 60 set g_balance_okmachinegun_secondary_refire 0.7 @@ -879,6 +882,7 @@ set g_balance_oknex_secondary_damagefalloff_mindist 0 set g_balance_oknex_secondary_delay 0 set g_balance_oknex_secondary_edgedamage 10 set g_balance_oknex_secondary_force 0 +set g_balance_oknex_secondary_force_zscale 1 set g_balance_oknex_secondary_lifetime 5 set g_balance_oknex_secondary_radius 60 set g_balance_oknex_secondary_refire 0 @@ -915,6 +919,7 @@ set g_balance_okrpc_secondary_damage 25 set g_balance_okrpc_secondary_delay 0 set g_balance_okrpc_secondary_edgedamage 12.5 set g_balance_okrpc_secondary_force 300 +set g_balance_okrpc_secondary_force_zscale 1 set g_balance_okrpc_secondary_lifetime 5 set g_balance_okrpc_secondary_radius 70 set g_balance_okrpc_secondary_refire 0.7 @@ -946,6 +951,7 @@ set g_balance_okshotgun_secondary_damage 20 set g_balance_okshotgun_secondary_delay 0 set g_balance_okshotgun_secondary_edgedamage 10 set g_balance_okshotgun_secondary_force 300 +set g_balance_okshotgun_secondary_force_zscale 1 set g_balance_okshotgun_secondary_lifetime 5 set g_balance_okshotgun_secondary_radius 60 set g_balance_okshotgun_secondary_refire 0.7 diff --git a/qcsrc/common/mutators/mutator/overkill/okhmg.qh b/qcsrc/common/mutators/mutator/overkill/okhmg.qh index dec03323f..77204ae1a 100644 --- a/qcsrc/common/mutators/mutator/overkill/okhmg.qh +++ b/qcsrc/common/mutators/mutator/overkill/okhmg.qh @@ -35,6 +35,7 @@ CLASS(OverkillHeavyMachineGun, Weapon) P(class, prefix, delay, float, SEC) \ P(class, prefix, edgedamage, float, SEC) \ P(class, prefix, force, float, SEC) \ + P(class, prefix, force_zscale, float, SEC) \ P(class, prefix, lifetime, float, SEC) \ P(class, prefix, radius, float, SEC) \ P(class, prefix, refire, float, SEC) \ diff --git a/qcsrc/common/mutators/mutator/overkill/okmachinegun.qh b/qcsrc/common/mutators/mutator/overkill/okmachinegun.qh index 321d92e22..77082c962 100644 --- a/qcsrc/common/mutators/mutator/overkill/okmachinegun.qh +++ b/qcsrc/common/mutators/mutator/overkill/okmachinegun.qh @@ -32,6 +32,7 @@ CLASS(OverkillMachineGun, Weapon) P(class, prefix, delay, float, SEC) \ P(class, prefix, edgedamage, float, SEC) \ P(class, prefix, force, float, SEC) \ + P(class, prefix, force_zscale, float, SEC) \ P(class, prefix, lifetime, float, SEC) \ P(class, prefix, radius, float, SEC) \ P(class, prefix, refire, float, SEC) \ diff --git a/qcsrc/common/mutators/mutator/overkill/oknex.qh b/qcsrc/common/mutators/mutator/overkill/oknex.qh index d03f40ff2..1ffaf78b8 100644 --- a/qcsrc/common/mutators/mutator/overkill/oknex.qh +++ b/qcsrc/common/mutators/mutator/overkill/oknex.qh @@ -59,6 +59,7 @@ CLASS(OverkillNex, Weapon) P(class, prefix, delay, float, SEC) \ P(class, prefix, edgedamage, float, SEC) \ P(class, prefix, force, float, SEC) \ + P(class, prefix, force_zscale, float, SEC) \ P(class, prefix, lifetime, float, SEC) \ P(class, prefix, radius, float, SEC) \ P(class, prefix, refire, float, SEC) \ diff --git a/qcsrc/common/mutators/mutator/overkill/okrpc.qh b/qcsrc/common/mutators/mutator/overkill/okrpc.qh index 429073e8c..928bfc0b9 100644 --- a/qcsrc/common/mutators/mutator/overkill/okrpc.qh +++ b/qcsrc/common/mutators/mutator/overkill/okrpc.qh @@ -40,6 +40,7 @@ CLASS(OverkillRocketPropelledChainsaw, Weapon) P(class, prefix, delay, float, SEC) \ P(class, prefix, edgedamage, float, SEC) \ P(class, prefix, force, float, SEC) \ + P(class, prefix, force_zscale, float, SEC) \ P(class, prefix, lifetime, float, SEC) \ P(class, prefix, radius, float, SEC) \ P(class, prefix, refire, float, SEC) \ diff --git a/qcsrc/common/mutators/mutator/overkill/okshotgun.qh b/qcsrc/common/mutators/mutator/overkill/okshotgun.qh index a830e6ac4..2c75681d9 100644 --- a/qcsrc/common/mutators/mutator/overkill/okshotgun.qh +++ b/qcsrc/common/mutators/mutator/overkill/okshotgun.qh @@ -33,6 +33,7 @@ CLASS(OverkillShotgun, Weapon) P(class, prefix, delay, float, SEC) \ P(class, prefix, edgedamage, float, SEC) \ P(class, prefix, force, float, SEC) \ + P(class, prefix, force_zscale, float, SEC) \ P(class, prefix, lifetime, float, SEC) \ P(class, prefix, radius, float, SEC) \ P(class, prefix, refire, float, SEC) \ diff --git a/qcsrc/common/weapons/weapon/blaster.qc b/qcsrc/common/weapons/weapon/blaster.qc index e3d713d47..310ea19a1 100644 --- a/qcsrc/common/weapons/weapon/blaster.qc +++ b/qcsrc/common/weapons/weapon/blaster.qc @@ -8,15 +8,19 @@ void W_Blaster_Touch(entity this, entity toucher) this.event_damage = func_null; - RadiusDamage( + RadiusDamageForSource( this, + (this.origin + (this.mins + this.maxs) * 0.5), + this.velocity, this.realowner, this.blaster_damage, this.blaster_edgedamage, this.blaster_radius, NULL, NULL, + false, this.blaster_force, + this.blaster_force_zscale, this.projectiledeathtype, this.weaponentity_fld, toucher @@ -42,6 +46,7 @@ void W_Blaster_Attack( float atk_edgedamage, float atk_radius, float atk_force, + float atk_force_zscale, float atk_speed, float atk_spread, float atk_delay, @@ -62,6 +67,7 @@ void W_Blaster_Attack( missile.blaster_edgedamage = atk_edgedamage; missile.blaster_radius = atk_radius; missile.blaster_force = atk_force; + missile.blaster_force_zscale = atk_force_zscale; missile.blaster_lifetime = atk_lifetime; setorigin(missile, w_shotorg); @@ -129,6 +135,7 @@ METHOD(Blaster, wr_think, void(Blaster thiswep, entity actor, .entity weaponenti WEP_CVAR_PRI(blaster, edgedamage), WEP_CVAR_PRI(blaster, radius), WEP_CVAR_PRI(blaster, force), + WEP_CVAR_PRI(blaster, force_zscale), WEP_CVAR_PRI(blaster, speed), WEP_CVAR_PRI(blaster, spread), WEP_CVAR_PRI(blaster, delay), @@ -161,6 +168,7 @@ METHOD(Blaster, wr_think, void(Blaster thiswep, entity actor, .entity weaponenti WEP_CVAR_SEC(blaster, edgedamage), WEP_CVAR_SEC(blaster, radius), WEP_CVAR_SEC(blaster, force), + WEP_CVAR_SEC(blaster, force_zscale), WEP_CVAR_SEC(blaster, speed), WEP_CVAR_SEC(blaster, spread), WEP_CVAR_SEC(blaster, delay), diff --git a/qcsrc/common/weapons/weapon/blaster.qh b/qcsrc/common/weapons/weapon/blaster.qh index 6297bdf37..87824310c 100644 --- a/qcsrc/common/weapons/weapon/blaster.qh +++ b/qcsrc/common/weapons/weapon/blaster.qh @@ -58,6 +58,7 @@ STATIC_INIT(OFFHAND_BLASTER) { OFFHAND_BLASTER = NEW(OffhandBlaster); } .float blaster_edgedamage; .float blaster_radius; .float blaster_force; +.float blaster_force_zscale; .float blaster_lifetime; // Will be demacroed after WEP_CVAR macros are also demacroed. @@ -72,6 +73,7 @@ STATIC_INIT(OFFHAND_BLASTER) { OFFHAND_BLASTER = NEW(OffhandBlaster); } WEP_CVAR_SEC(weapon_name, edgedamage), \ WEP_CVAR_SEC(weapon_name, radius), \ WEP_CVAR_SEC(weapon_name, force), \ + WEP_CVAR_SEC(weapon_name, force_zscale), \ WEP_CVAR_SEC(weapon_name, speed), \ WEP_CVAR_SEC(weapon_name, spread), \ WEP_CVAR_SEC(weapon_name, delay), \ diff --git a/qcsrc/common/weapons/weapon/vaporizer.qh b/qcsrc/common/weapons/weapon/vaporizer.qh index 207ae8e63..f87a800a9 100644 --- a/qcsrc/common/weapons/weapon/vaporizer.qh +++ b/qcsrc/common/weapons/weapon/vaporizer.qh @@ -31,6 +31,7 @@ CLASS(Vaporizer, Weapon) P(class, prefix, delay, float, SEC) \ P(class, prefix, edgedamage, float, SEC) \ P(class, prefix, force, float, SEC) \ + P(class, prefix, force_zscale, float, SEC) \ P(class, prefix, lifetime, float, SEC) \ P(class, prefix, radius, float, SEC) \ P(class, prefix, refire, float, SEC) \ diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index 1688f506c..00a198a20 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -862,7 +862,7 @@ void Damage(entity targ, entity inflictor, entity attacker, float damage, int de } float RadiusDamageForSource (entity inflictor, vector inflictororigin, vector inflictorvelocity, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, - float inflictorselfdamage, float forceintensity, int deathtype, .entity weaponentity, entity directhitentity) + float inflictorselfdamage, float forceintensity, float forcezscale, int deathtype, .entity weaponentity, entity directhitentity) // Returns total damage applies to creatures { entity targ; @@ -949,8 +949,8 @@ float RadiusDamageForSource (entity inflictor, vector inflictororigin, vector in force = force * (finaldmg / coredamage) * forceintensity; hitloc = nearest; - if(deathtype & WEP_BLASTER.m_id) - force.z *= WEP_CVAR_BOTH(blaster, !(deathtype & HITTYPE_SECONDARY), force_zscale); + if(forcezscale) + force.z *= forcezscale; if(targ != directhitentity) { @@ -1053,7 +1053,8 @@ float RadiusDamageForSource (entity inflictor, vector inflictororigin, vector in float RadiusDamage(entity inflictor, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float forceintensity, int deathtype, .entity weaponentity, entity directhitentity) { - return RadiusDamageForSource(inflictor, (inflictor.origin + (inflictor.mins + inflictor.maxs) * 0.5), inflictor.velocity, attacker, coredamage, edgedamage, rad, cantbe, mustbe, false, forceintensity, deathtype, weaponentity, directhitentity); + return RadiusDamageForSource(inflictor, (inflictor.origin + (inflictor.mins + inflictor.maxs) * 0.5), inflictor.velocity, attacker, coredamage, edgedamage, rad, + cantbe, mustbe, false, forceintensity, 0, deathtype, weaponentity, directhitentity); } bool Heal(entity targ, entity inflictor, float amount, float limit) diff --git a/qcsrc/server/g_damage.qh b/qcsrc/server/g_damage.qh index efe6b2e1b..a99846c73 100644 --- a/qcsrc/server/g_damage.qh +++ b/qcsrc/server/g_damage.qh @@ -91,7 +91,7 @@ void Unfreeze(entity targ, bool reset_health); void Damage (entity targ, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force); float RadiusDamage_running; -float RadiusDamageForSource (entity inflictor, vector inflictororigin, vector inflictorvelocity, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float inflictorselfdamage, float forceintensity, int deathtype, .entity weaponentity, entity directhitentity); +float RadiusDamageForSource (entity inflictor, vector inflictororigin, vector inflictorvelocity, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float inflictorselfdamage, float forceintensity, float forcezscale, int deathtype, .entity weaponentity, entity directhitentity); // Returns total damage applies to creatures float RadiusDamage (entity inflictor, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float forceintensity, int deathtype, .entity weaponentity, entity directhitentity); -- 2.39.2