]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Renamed Overkill Vortex to Overkill Nex.
authorLyberta <lyberta@lyberta.net>
Mon, 5 Feb 2018 17:38:25 +0000 (20:38 +0300)
committerLyberta <lyberta@lyberta.net>
Mon, 5 Feb 2018 17:38:25 +0000 (20:38 +0300)
16 files changed:
bal-wep-overkill-nerfed.cfg
bal-wep-overkill.cfg
bal-wep-xonotic.cfg
qcsrc/client/view.qc
qcsrc/common/mutators/mutator/overkill/_mod.inc
qcsrc/common/mutators/mutator/overkill/_mod.qh
qcsrc/common/mutators/mutator/overkill/oknex.qc [new file with mode: 0644]
qcsrc/common/mutators/mutator/overkill/oknex.qh [new file with mode: 0644]
qcsrc/common/mutators/mutator/overkill/okvortex.qc [deleted file]
qcsrc/common/mutators/mutator/overkill/okvortex.qh [deleted file]
qcsrc/common/mutators/mutator/overkill/sv_overkill.qc
qcsrc/common/stats.qh
qcsrc/common/wepent.qc
qcsrc/common/wepent.qh
qcsrc/server/client.qc
qcsrc/server/defs.qh

index da0689e185e3e8def201645a3e5ed853a8982aca..e4fb02236970cee908be2baa272f346c651711a5 100644 (file)
@@ -62,55 +62,55 @@ set g_balance_okmachinegun_weaponstart 0
 set g_balance_okmachinegun_weaponstartoverride -1
 set g_balance_okmachinegun_weaponthrowable 1
 // }}}
 set g_balance_okmachinegun_weaponstartoverride -1
 set g_balance_okmachinegun_weaponthrowable 1
 // }}}
-// {{{ Overkill Vortex
-set g_balance_okvortex_charge 1
-set g_balance_okvortex_charge_animlimit 0.5
-set g_balance_okvortex_charge_limit 1
-set g_balance_okvortex_charge_maxspeed 800
-set g_balance_okvortex_charge_mindmg 40
-set g_balance_okvortex_charge_minspeed 400
-set g_balance_okvortex_charge_rate 0.6
-set g_balance_okvortex_charge_rot_pause 0
-set g_balance_okvortex_charge_rot_rate 0
-set g_balance_okvortex_charge_shot_multiplier 0
-set g_balance_okvortex_charge_start 0.5
-set g_balance_okvortex_charge_velocity_rate 0
-set g_balance_okvortex_primary_ammo 6
-set g_balance_okvortex_primary_animtime 0.4
-set g_balance_okvortex_primary_damage 80
-set g_balance_okvortex_primary_damagefalloff_forcehalflife 0
-set g_balance_okvortex_primary_damagefalloff_halflife 0
-set g_balance_okvortex_primary_damagefalloff_maxdist 0
-set g_balance_okvortex_primary_damagefalloff_mindist 0
-set g_balance_okvortex_primary_force 400
-set g_balance_okvortex_primary_refire 1.5
-set g_balance_okvortex_reload_ammo 0
-set g_balance_okvortex_reload_time 2
-set g_balance_okvortex_secondary 0
-set g_balance_okvortex_secondary_ammo 2
-set g_balance_okvortex_secondary_animtime 0
-set g_balance_okvortex_secondary_chargepool 0
-set g_balance_okvortex_secondary_chargepool_pause_regen 1
-set g_balance_okvortex_secondary_chargepool_regen 0.15
-set g_balance_okvortex_secondary_damage 0
-set g_balance_okvortex_secondary_damagefalloff_forcehalflife 0
-set g_balance_okvortex_secondary_damagefalloff_halflife 0
-set g_balance_okvortex_secondary_damagefalloff_maxdist 0
-set g_balance_okvortex_secondary_damagefalloff_mindist 0
-set g_balance_okvortex_secondary_force 0
-set g_balance_okvortex_secondary_refire 0
-set g_balance_okvortex_secondary_refire_type 0
-set g_balance_okvortex_secondary_delay 0
-set g_balance_okvortex_secondary_edgedamage 10
-set g_balance_okvortex_secondary_lifetime 5
-set g_balance_okvortex_secondary_radius 60
-set g_balance_okvortex_secondary_shotangle 0
-set g_balance_okvortex_secondary_speed 6000
-set g_balance_okvortex_secondary_spread 0
-set g_balance_okvortex_switchdelay_drop 0.2
-set g_balance_okvortex_switchdelay_raise 0.2
-set g_balance_okvortex_weaponreplace ""
-set g_balance_okvortex_weaponstart 0
-set g_balance_okvortex_weaponstartoverride -1
-set g_balance_okvortex_weaponthrowable 1
+// {{{ Overkill Nex
+set g_balance_oknex_charge 1
+set g_balance_oknex_charge_animlimit 0.5
+set g_balance_oknex_charge_limit 1
+set g_balance_oknex_charge_maxspeed 800
+set g_balance_oknex_charge_mindmg 40
+set g_balance_oknex_charge_minspeed 400
+set g_balance_oknex_charge_rate 0.6
+set g_balance_oknex_charge_rot_pause 0
+set g_balance_oknex_charge_rot_rate 0
+set g_balance_oknex_charge_shot_multiplier 0
+set g_balance_oknex_charge_start 0.5
+set g_balance_oknex_charge_velocity_rate 0
+set g_balance_oknex_primary_ammo 6
+set g_balance_oknex_primary_animtime 0.4
+set g_balance_oknex_primary_damage 80
+set g_balance_oknex_primary_damagefalloff_forcehalflife 0
+set g_balance_oknex_primary_damagefalloff_halflife 0
+set g_balance_oknex_primary_damagefalloff_maxdist 0
+set g_balance_oknex_primary_damagefalloff_mindist 0
+set g_balance_oknex_primary_force 400
+set g_balance_oknex_primary_refire 1.5
+set g_balance_oknex_reload_ammo 0
+set g_balance_oknex_reload_time 2
+set g_balance_oknex_secondary 0
+set g_balance_oknex_secondary_ammo 2
+set g_balance_oknex_secondary_animtime 0
+set g_balance_oknex_secondary_chargepool 0
+set g_balance_oknex_secondary_chargepool_pause_regen 1
+set g_balance_oknex_secondary_chargepool_regen 0.15
+set g_balance_oknex_secondary_damage 0
+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_refire 0
+set g_balance_oknex_secondary_refire_type 0
+set g_balance_oknex_secondary_delay 0
+set g_balance_oknex_secondary_edgedamage 10
+set g_balance_oknex_secondary_lifetime 5
+set g_balance_oknex_secondary_radius 60
+set g_balance_oknex_secondary_shotangle 0
+set g_balance_oknex_secondary_speed 6000
+set g_balance_oknex_secondary_spread 0
+set g_balance_oknex_switchdelay_drop 0.2
+set g_balance_oknex_switchdelay_raise 0.2
+set g_balance_oknex_weaponreplace ""
+set g_balance_oknex_weaponstart 0
+set g_balance_oknex_weaponstartoverride -1
+set g_balance_oknex_weaponthrowable 1
 // }}}
 // }}}
index fcee3d5e81f1e30bda996ecf9cde6d39e2ac7b42..ddf0408f8fd8f5fb526df3f1d98de3b13173ce11 100644 (file)
@@ -879,55 +879,55 @@ set g_balance_okmachinegun_weaponstart 0
 set g_balance_okmachinegun_weaponstartoverride -1
 set g_balance_okmachinegun_weaponthrowable 1
 // }}}
 set g_balance_okmachinegun_weaponstartoverride -1
 set g_balance_okmachinegun_weaponthrowable 1
 // }}}
-// {{{ Overkill Vortex
-set g_balance_okvortex_charge 0
-set g_balance_okvortex_charge_animlimit 0.5
-set g_balance_okvortex_charge_limit 1
-set g_balance_okvortex_charge_maxspeed 800
-set g_balance_okvortex_charge_mindmg 40
-set g_balance_okvortex_charge_minspeed 400
-set g_balance_okvortex_charge_rate 0.6
-set g_balance_okvortex_charge_rot_pause 0
-set g_balance_okvortex_charge_rot_rate 0
-set g_balance_okvortex_charge_shot_multiplier 0
-set g_balance_okvortex_charge_start 0.5
-set g_balance_okvortex_charge_velocity_rate 0
-set g_balance_okvortex_primary_ammo 10
-set g_balance_okvortex_primary_animtime 0.65
-set g_balance_okvortex_primary_damage 100
-set g_balance_okvortex_primary_damagefalloff_forcehalflife 0
-set g_balance_okvortex_primary_damagefalloff_halflife 0
-set g_balance_okvortex_primary_damagefalloff_maxdist 0
-set g_balance_okvortex_primary_damagefalloff_mindist 0
-set g_balance_okvortex_primary_force 500
-set g_balance_okvortex_primary_refire 1
-set g_balance_okvortex_reload_ammo 50
-set g_balance_okvortex_reload_time 2
-set g_balance_okvortex_secondary 2
-set g_balance_okvortex_secondary_ammo 0
-set g_balance_okvortex_secondary_animtime 0.2
-set g_balance_okvortex_secondary_chargepool 0
-set g_balance_okvortex_secondary_chargepool_pause_regen 1
-set g_balance_okvortex_secondary_chargepool_regen 0.15
-set g_balance_okvortex_secondary_damage 25
-set g_balance_okvortex_secondary_damagefalloff_forcehalflife 0
-set g_balance_okvortex_secondary_damagefalloff_halflife 0
-set g_balance_okvortex_secondary_damagefalloff_maxdist 0
-set g_balance_okvortex_secondary_damagefalloff_mindist 0
-set g_balance_okvortex_secondary_force 300
-set g_balance_okvortex_secondary_refire 0.7
-set g_balance_okvortex_secondary_refire_type 1
-set g_balance_okvortex_secondary_delay 0
-set g_balance_okvortex_secondary_edgedamage 12.5
-set g_balance_okvortex_secondary_lifetime 5
-set g_balance_okvortex_secondary_radius 70
-set g_balance_okvortex_secondary_shotangle 0
-set g_balance_okvortex_secondary_speed 6000
-set g_balance_okvortex_secondary_spread 0
-set g_balance_okvortex_switchdelay_drop 0.2
-set g_balance_okvortex_switchdelay_raise 0.2
-set g_balance_okvortex_weaponreplace ""
-set g_balance_okvortex_weaponstart 0
-set g_balance_okvortex_weaponstartoverride -1
-set g_balance_okvortex_weaponthrowable 1
+// {{{ Overkill Nex
+set g_balance_oknex_charge 0
+set g_balance_oknex_charge_animlimit 0.5
+set g_balance_oknex_charge_limit 1
+set g_balance_oknex_charge_maxspeed 800
+set g_balance_oknex_charge_mindmg 40
+set g_balance_oknex_charge_minspeed 400
+set g_balance_oknex_charge_rate 0.6
+set g_balance_oknex_charge_rot_pause 0
+set g_balance_oknex_charge_rot_rate 0
+set g_balance_oknex_charge_shot_multiplier 0
+set g_balance_oknex_charge_start 0.5
+set g_balance_oknex_charge_velocity_rate 0
+set g_balance_oknex_primary_ammo 10
+set g_balance_oknex_primary_animtime 0.65
+set g_balance_oknex_primary_damage 100
+set g_balance_oknex_primary_damagefalloff_forcehalflife 0
+set g_balance_oknex_primary_damagefalloff_halflife 0
+set g_balance_oknex_primary_damagefalloff_maxdist 0
+set g_balance_oknex_primary_damagefalloff_mindist 0
+set g_balance_oknex_primary_force 500
+set g_balance_oknex_primary_refire 1
+set g_balance_oknex_reload_ammo 50
+set g_balance_oknex_reload_time 2
+set g_balance_oknex_secondary 2
+set g_balance_oknex_secondary_ammo 0
+set g_balance_oknex_secondary_animtime 0.2
+set g_balance_oknex_secondary_chargepool 0
+set g_balance_oknex_secondary_chargepool_pause_regen 1
+set g_balance_oknex_secondary_chargepool_regen 0.15
+set g_balance_oknex_secondary_damage 25
+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 300
+set g_balance_oknex_secondary_refire 0.7
+set g_balance_oknex_secondary_refire_type 1
+set g_balance_oknex_secondary_delay 0
+set g_balance_oknex_secondary_edgedamage 12.5
+set g_balance_oknex_secondary_lifetime 5
+set g_balance_oknex_secondary_radius 70
+set g_balance_oknex_secondary_shotangle 0
+set g_balance_oknex_secondary_speed 6000
+set g_balance_oknex_secondary_spread 0
+set g_balance_oknex_switchdelay_drop 0.2
+set g_balance_oknex_switchdelay_raise 0.2
+set g_balance_oknex_weaponreplace ""
+set g_balance_oknex_weaponstart 0
+set g_balance_oknex_weaponstartoverride -1
+set g_balance_oknex_weaponthrowable 1
 // }}}
 // }}}
index 0e9f45baf8c1d2cfef74feea04db4b2268a6b726..7d15db819938a8afbaa8974748a3f4861f5393d0 100644 (file)
@@ -905,55 +905,55 @@ set g_balance_okmachinegun_weaponstart 0
 set g_balance_okmachinegun_weaponstartoverride -1
 set g_balance_okmachinegun_weaponthrowable 1
 // }}}
 set g_balance_okmachinegun_weaponstartoverride -1
 set g_balance_okmachinegun_weaponthrowable 1
 // }}}
-// {{{ Overkill Vortex
-set g_balance_okvortex_charge 0
-set g_balance_okvortex_charge_animlimit 0.5
-set g_balance_okvortex_charge_limit 1
-set g_balance_okvortex_charge_maxspeed 800
-set g_balance_okvortex_charge_mindmg 40
-set g_balance_okvortex_charge_minspeed 400
-set g_balance_okvortex_charge_rate 0.6
-set g_balance_okvortex_charge_rot_pause 0
-set g_balance_okvortex_charge_rot_rate 0
-set g_balance_okvortex_charge_shot_multiplier 0
-set g_balance_okvortex_charge_start 0.5
-set g_balance_okvortex_charge_velocity_rate 0
-set g_balance_okvortex_primary_ammo 10
-set g_balance_okvortex_primary_animtime 0.65
-set g_balance_okvortex_primary_damage 100
-set g_balance_okvortex_primary_damagefalloff_forcehalflife 0
-set g_balance_okvortex_primary_damagefalloff_halflife 0
-set g_balance_okvortex_primary_damagefalloff_maxdist 0
-set g_balance_okvortex_primary_damagefalloff_mindist 0
-set g_balance_okvortex_primary_force 500
-set g_balance_okvortex_primary_refire 1
-set g_balance_okvortex_reload_ammo 50
-set g_balance_okvortex_reload_time 2
-set g_balance_okvortex_secondary 2
-set g_balance_okvortex_secondary_ammo 0
-set g_balance_okvortex_secondary_animtime 0.2
-set g_balance_okvortex_secondary_chargepool 0
-set g_balance_okvortex_secondary_chargepool_pause_regen 1
-set g_balance_okvortex_secondary_chargepool_regen 0.15
-set g_balance_okvortex_secondary_damage 25
-set g_balance_okvortex_secondary_damagefalloff_forcehalflife 0
-set g_balance_okvortex_secondary_damagefalloff_halflife 0
-set g_balance_okvortex_secondary_damagefalloff_maxdist 0
-set g_balance_okvortex_secondary_damagefalloff_mindist 0
-set g_balance_okvortex_secondary_force 300
-set g_balance_okvortex_secondary_refire 0.7
-set g_balance_okvortex_secondary_refire_type 1
-set g_balance_okvortex_secondary_delay 0
-set g_balance_okvortex_secondary_edgedamage 12.5
-set g_balance_okvortex_secondary_lifetime 5
-set g_balance_okvortex_secondary_radius 70
-set g_balance_okvortex_secondary_shotangle 0
-set g_balance_okvortex_secondary_speed 6000
-set g_balance_okvortex_secondary_spread 0
-set g_balance_okvortex_switchdelay_drop 0.2
-set g_balance_okvortex_switchdelay_raise 0.2
-set g_balance_okvortex_weaponreplace ""
-set g_balance_okvortex_weaponstart 0
-set g_balance_okvortex_weaponstartoverride -1
-set g_balance_okvortex_weaponthrowable 1
+// {{{ Overkill Nex
+set g_balance_oknex_charge 0
+set g_balance_oknex_charge_animlimit 0.5
+set g_balance_oknex_charge_limit 1
+set g_balance_oknex_charge_maxspeed 800
+set g_balance_oknex_charge_mindmg 40
+set g_balance_oknex_charge_minspeed 400
+set g_balance_oknex_charge_rate 0.6
+set g_balance_oknex_charge_rot_pause 0
+set g_balance_oknex_charge_rot_rate 0
+set g_balance_oknex_charge_shot_multiplier 0
+set g_balance_oknex_charge_start 0.5
+set g_balance_oknex_charge_velocity_rate 0
+set g_balance_oknex_primary_ammo 10
+set g_balance_oknex_primary_animtime 0.65
+set g_balance_oknex_primary_damage 100
+set g_balance_oknex_primary_damagefalloff_forcehalflife 0
+set g_balance_oknex_primary_damagefalloff_halflife 0
+set g_balance_oknex_primary_damagefalloff_maxdist 0
+set g_balance_oknex_primary_damagefalloff_mindist 0
+set g_balance_oknex_primary_force 500
+set g_balance_oknex_primary_refire 1
+set g_balance_oknex_reload_ammo 50
+set g_balance_oknex_reload_time 2
+set g_balance_oknex_secondary 2
+set g_balance_oknex_secondary_ammo 0
+set g_balance_oknex_secondary_animtime 0.2
+set g_balance_oknex_secondary_chargepool 0
+set g_balance_oknex_secondary_chargepool_pause_regen 1
+set g_balance_oknex_secondary_chargepool_regen 0.15
+set g_balance_oknex_secondary_damage 25
+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 300
+set g_balance_oknex_secondary_refire 0.7
+set g_balance_oknex_secondary_refire_type 1
+set g_balance_oknex_secondary_delay 0
+set g_balance_oknex_secondary_edgedamage 12.5
+set g_balance_oknex_secondary_lifetime 5
+set g_balance_oknex_secondary_radius 70
+set g_balance_oknex_secondary_shotangle 0
+set g_balance_oknex_secondary_speed 6000
+set g_balance_oknex_secondary_spread 0
+set g_balance_oknex_switchdelay_drop 0.2
+set g_balance_oknex_switchdelay_raise 0.2
+set g_balance_oknex_weaponreplace ""
+set g_balance_oknex_weaponstart 0
+set g_balance_oknex_weaponstartoverride -1
+set g_balance_oknex_weaponthrowable 1
 // }}}
 // }}}
index 117cbc66a8f9ac8f226378647ab6db38d8f71575..52ee25b58d6e374338bc6d82810c4239d845f91e 100644 (file)
@@ -30,7 +30,7 @@
 
 #include <common/vehicles/all.qh>
 #include <common/weapons/_all.qh>
 
 #include <common/vehicles/all.qh>
 #include <common/weapons/_all.qh>
-#include <common/mutators/mutator/overkill/okvortex.qh>
+#include <common/mutators/mutator/overkill/oknex.qh>
 #include <common/viewloc.qh>
 #include <common/triggers/trigger/viewloc.qh>
 #include <common/minigames/cl_minigames.qh>
 #include <common/viewloc.qh>
 #include <common/triggers/trigger/viewloc.qh>
 #include <common/minigames/cl_minigames.qh>
@@ -473,7 +473,7 @@ vector GetCurrentFov(float fov)
                {
                        entity wepent = viewmodels[slot];
                        if(wepent.switchweapon == wepent.activeweapon)
                {
                        entity wepent = viewmodels[slot];
                        if(wepent.switchweapon == wepent.activeweapon)
-                       if((wepent.activeweapon == WEP_VORTEX && !WEP_CVAR(vortex, secondary)) || (wepent.activeweapon == WEP_RIFLE && !WEP_CVAR(rifle, secondary)) || (wepent.activeweapon == WEP_OVERKILL_VORTEX && !WEP_CVAR(okvortex, secondary))) // do NOT use switchweapon here
+                       if((wepent.activeweapon == WEP_VORTEX && !WEP_CVAR(vortex, secondary)) || (wepent.activeweapon == WEP_RIFLE && !WEP_CVAR(rifle, secondary)) || (wepent.activeweapon == WEP_OVERKILL_NEX && !WEP_CVAR(oknex, secondary))) // do NOT use switchweapon here
                                zoomdir += button_attack2;
                }
        }
                                zoomdir += button_attack2;
                }
        }
@@ -665,7 +665,7 @@ float TrueAimCheck(entity wepent)
                case WEP_MORTAR: // toss curve
                        return SHOTTYPE_HITWORLD;
                case WEP_VORTEX:
                case WEP_MORTAR: // toss curve
                        return SHOTTYPE_HITWORLD;
                case WEP_VORTEX:
-               case WEP_OVERKILL_VORTEX:
+               case WEP_OVERKILL_NEX:
                case WEP_VAPORIZER:
                        mv = MOVE_NORMAL;
                        break;
                case WEP_VAPORIZER:
                        mv = MOVE_NORMAL;
                        break;
@@ -1194,9 +1194,9 @@ void HUD_Crosshair(entity this)
                                vortex_charge = STAT(VORTEX_CHARGE);
                                vortex_chargepool = STAT(VORTEX_CHARGEPOOL);
 
                                vortex_charge = STAT(VORTEX_CHARGE);
                                vortex_chargepool = STAT(VORTEX_CHARGEPOOL);
 
-                               float okvortex_charge, okvortex_chargepool;
-                               okvortex_charge = STAT(OVERKILL_VORTEX_CHARGE);
-                               okvortex_chargepool = STAT(OVERKILL_VORTEX_CHARGEPOOL);
+                               float oknex_charge, oknex_chargepool;
+                               oknex_charge = STAT(OVERKILL_NEX_CHARGE);
+                               oknex_chargepool = STAT(OVERKILL_NEX_CHARGEPOOL);
 
                                float arc_heat = STAT(ARC_HEAT);
 
 
                                float arc_heat = STAT(ARC_HEAT);
 
@@ -1226,14 +1226,14 @@ void HUD_Crosshair(entity this)
                                        ring_rgb = wcross_color;
                                        ring_image = "gfx/crosshair_ring_nexgun.tga";
                                }
                                        ring_rgb = wcross_color;
                                        ring_image = "gfx/crosshair_ring_nexgun.tga";
                                }
-                               else if (autocvar_crosshair_ring && (wepent.activeweapon == WEP_OVERKILL_VORTEX) && okvortex_charge && autocvar_crosshair_ring_vortex)
+                               else if (autocvar_crosshair_ring && (wepent.activeweapon == WEP_OVERKILL_NEX) && oknex_charge && autocvar_crosshair_ring_vortex)
                                {
                                {
-                                       if (okvortex_chargepool || use_vortex_chargepool) {
+                                       if (oknex_chargepool || use_vortex_chargepool) {
                                                use_vortex_chargepool = 1;
                                                use_vortex_chargepool = 1;
-                                               ring_inner_value = okvortex_chargepool;
+                                               ring_inner_value = oknex_chargepool;
                                        } else {
                                        } else {
-                                               vortex_charge_movingavg = (1 - autocvar_crosshair_ring_vortex_currentcharge_movingavg_rate) * vortex_charge_movingavg + autocvar_crosshair_ring_vortex_currentcharge_movingavg_rate * okvortex_charge;
-                                               ring_inner_value = bound(0, autocvar_crosshair_ring_vortex_currentcharge_scale * (okvortex_charge - vortex_charge_movingavg), 1);
+                                               vortex_charge_movingavg = (1 - autocvar_crosshair_ring_vortex_currentcharge_movingavg_rate) * vortex_charge_movingavg + autocvar_crosshair_ring_vortex_currentcharge_movingavg_rate * oknex_charge;
+                                               ring_inner_value = bound(0, autocvar_crosshair_ring_vortex_currentcharge_scale * (oknex_charge - vortex_charge_movingavg), 1);
                                        }
 
                                        ring_inner_alpha = autocvar_crosshair_ring_vortex_inner_alpha;
                                        }
 
                                        ring_inner_alpha = autocvar_crosshair_ring_vortex_inner_alpha;
@@ -1241,7 +1241,7 @@ void HUD_Crosshair(entity this)
                                        ring_inner_image = "gfx/crosshair_ring_inner.tga";
 
                                        // draw the outer ring to show the current charge of the weapon
                                        ring_inner_image = "gfx/crosshair_ring_inner.tga";
 
                                        // draw the outer ring to show the current charge of the weapon
-                                       ring_value = okvortex_charge;
+                                       ring_value = oknex_charge;
                                        ring_alpha = autocvar_crosshair_ring_vortex_alpha;
                                        ring_rgb = wcross_color;
                                        ring_image = "gfx/crosshair_ring_nexgun.tga";
                                        ring_alpha = autocvar_crosshair_ring_vortex_alpha;
                                        ring_rgb = wcross_color;
                                        ring_image = "gfx/crosshair_ring_nexgun.tga";
index 55d4fd858cfe1b2c2b4a2b4a9aff8e65608d6f05..4ded1793974978406df10a8f274cf38506c9b847 100644 (file)
@@ -1,8 +1,8 @@
 // generated file; do not modify
 #include <common/mutators/mutator/overkill/hmg.qc>
 #include <common/mutators/mutator/overkill/okmachinegun.qc>
 // generated file; do not modify
 #include <common/mutators/mutator/overkill/hmg.qc>
 #include <common/mutators/mutator/overkill/okmachinegun.qc>
+#include <common/mutators/mutator/overkill/oknex.qc>
 #include <common/mutators/mutator/overkill/okshotgun.qc>
 #include <common/mutators/mutator/overkill/okshotgun.qc>
-#include <common/mutators/mutator/overkill/okvortex.qc>
 #include <common/mutators/mutator/overkill/overkill.qc>
 #ifdef CSQC
     #include <common/mutators/mutator/overkill/cl_overkill.qc>
 #include <common/mutators/mutator/overkill/overkill.qc>
 #ifdef CSQC
     #include <common/mutators/mutator/overkill/cl_overkill.qc>
index d25951615d8d28b1963011f4e048590965cc55e1..db437c8b26416c1e7d6c23368cf07e18380c6519 100644 (file)
@@ -1,8 +1,8 @@
 // generated file; do not modify
 #include <common/mutators/mutator/overkill/hmg.qh>
 #include <common/mutators/mutator/overkill/okmachinegun.qh>
 // generated file; do not modify
 #include <common/mutators/mutator/overkill/hmg.qh>
 #include <common/mutators/mutator/overkill/okmachinegun.qh>
+#include <common/mutators/mutator/overkill/oknex.qh>
 #include <common/mutators/mutator/overkill/okshotgun.qh>
 #include <common/mutators/mutator/overkill/okshotgun.qh>
-#include <common/mutators/mutator/overkill/okvortex.qh>
 #include <common/mutators/mutator/overkill/overkill.qh>
 #ifdef CSQC
     #include <common/mutators/mutator/overkill/cl_overkill.qh>
 #include <common/mutators/mutator/overkill/overkill.qh>
 #ifdef CSQC
     #include <common/mutators/mutator/overkill/cl_overkill.qh>
diff --git a/qcsrc/common/mutators/mutator/overkill/oknex.qc b/qcsrc/common/mutators/mutator/overkill/oknex.qc
new file mode 100644 (file)
index 0000000..a276343
--- /dev/null
@@ -0,0 +1,407 @@
+#include "oknex.qh"
+
+#ifdef SVQC
+
+.float oknex_lasthit;
+#endif
+
+#if defined(GAMEQC)
+
+METHOD(OverkillNex, wr_glow, vector(OverkillNex this, entity actor, entity wepent))
+{
+       if (!WEP_CVAR(oknex, charge)) return '0 0 0';
+       float charge = wepent.oknex_charge;
+       float animlimit = WEP_CVAR(oknex, charge_animlimit);
+       vector g;
+       g.x = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_red_half * min(1, charge / animlimit);
+       g.y = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_green_half * min(1, charge / animlimit);
+       g.z = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_blue_half * min(1, charge / animlimit);
+       if (charge > animlimit)
+       {
+               g.x += autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_red_full * (charge - animlimit) / (1 - animlimit);
+               g.y += autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_green_full * (charge - animlimit) / (1 - animlimit);
+               g.z += autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_blue_full * (charge - animlimit) / (1 - animlimit);
+       }
+       return g;
+}
+#endif
+
+#ifdef SVQC
+REGISTER_MUTATOR(oknex_charge, true);
+
+MUTATOR_HOOKFUNCTION(oknex_charge, GetPressedKeys)
+{
+       entity player = M_ARGV(0, entity);
+
+       // WEAPONTODO
+       if(!WEP_CVAR(oknex, charge) || !WEP_CVAR(oknex, charge_velocity_rate))
+               return;
+
+       for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
+       {
+               .entity weaponentity = weaponentities[slot];
+
+               if (player.(weaponentity).m_weapon == WEP_OVERKILL_NEX && WEP_CVAR(oknex, charge) && WEP_CVAR(oknex, charge_velocity_rate) && vdist(vec2(player.velocity), >, WEP_CVAR(oknex, charge_minspeed)))
+               {
+                       float xyspeed = vlen(vec2(player.velocity));
+                       // add a maximum of charge_velocity_rate when going fast (f = 1), gradually increasing from minspeed (f = 0) to maxspeed
+                               xyspeed = min(xyspeed, WEP_CVAR(oknex, charge_maxspeed));
+                       float f = (xyspeed - WEP_CVAR(oknex, charge_minspeed)) / (WEP_CVAR(oknex, charge_maxspeed) - WEP_CVAR(oknex, charge_minspeed));
+                       // add the extra charge
+                       player.(weaponentity).oknex_charge = min(1, player.(weaponentity).oknex_charge + WEP_CVAR(oknex, charge_velocity_rate) * f * PHYS_INPUT_TIMELENGTH);
+               }
+       }
+}
+
+void W_OverkillNex_Attack(Weapon thiswep, entity actor, .entity weaponentity, float issecondary)
+{
+       float mydmg, myforce, mymindist, mymaxdist, myhalflife, myforcehalflife, myammo, charge;
+
+       mydmg = WEP_CVAR_BOTH(oknex, !issecondary, damage);
+       myforce = WEP_CVAR_BOTH(oknex, !issecondary, force);
+       mymindist = WEP_CVAR_BOTH(oknex, !issecondary, damagefalloff_mindist);
+       mymaxdist = WEP_CVAR_BOTH(oknex, !issecondary, damagefalloff_maxdist);
+       myhalflife = WEP_CVAR_BOTH(oknex, !issecondary, damagefalloff_halflife);
+       myforcehalflife = WEP_CVAR_BOTH(oknex, !issecondary, damagefalloff_forcehalflife);
+       myammo = WEP_CVAR_BOTH(oknex, !issecondary, ammo);
+
+       float flying;
+       flying = IsFlying(actor); // do this BEFORE to make the trace values from FireRailgunBullet last
+
+       if (WEP_CVAR(oknex, charge))
+       {
+               charge = WEP_CVAR(oknex, charge_mindmg) / mydmg + (1 - WEP_CVAR(oknex, charge_mindmg) / mydmg) * actor.(weaponentity).oknex_charge;
+               actor.(weaponentity).oknex_charge *= WEP_CVAR(oknex, charge_shot_multiplier); // do this AFTER setting mydmg/myforce
+               // O RLY? -- divVerent
+               // YA RLY -- FruitieX
+       }
+       else
+       {
+               charge = 1;
+       }
+       mydmg *= charge;
+       myforce *= charge;
+
+       W_SetupShot(actor, weaponentity, true, 5, SND_NEXFIRE, CH_WEAPON_A, mydmg);
+       if(charge > WEP_CVAR(oknex, charge_animlimit) && WEP_CVAR(oknex, charge_animlimit)) // if the OverkillNex is overcharged, we play an extra sound
+       {
+               sound(actor, CH_WEAPON_B, SND_NEXCHARGE, VOL_BASE * (charge - 0.5 * WEP_CVAR(oknex, charge_animlimit)) / (1 - 0.5 * WEP_CVAR(oknex, charge_animlimit)), ATTN_NORM);
+       }
+
+       yoda = 0;
+       damage_goodhits = 0;
+       FireRailgunBullet(actor, weaponentity, w_shotorg, w_shotorg + w_shotdir * max_shot_distance, mydmg, myforce, mymindist, mymaxdist, myhalflife, myforcehalflife, WEP_OVERKILL_NEX.m_id);
+
+       if(yoda && flying)
+               Send_Notification(NOTIF_ONE, actor, MSG_ANNCE, ANNCE_ACHIEVEMENT_YODA);
+       if(damage_goodhits && actor.oknex_lasthit)
+       {
+               Send_Notification(NOTIF_ONE, actor, MSG_ANNCE, ANNCE_ACHIEVEMENT_IMPRESSIVE);
+               damage_goodhits = 0; // only every second time
+       }
+
+       actor.oknex_lasthit = damage_goodhits;
+
+       //beam and muzzle flash done on client
+       SendCSQCVortexBeamParticle(charge);
+
+       W_DecreaseAmmo(thiswep, actor, myammo, weaponentity);
+}
+
+.float oknex_chargepool_pauseregen_finished;
+
+METHOD(OverkillNex, wr_aim, void(entity thiswep, entity actor, .entity weaponentity))
+{
+       if(bot_aim(actor, weaponentity, 1000000, 0, 1, false))
+               PHYS_INPUT_BUTTON_ATCK(actor) = true;
+       else
+       {
+               if(WEP_CVAR(oknex, charge))
+                       PHYS_INPUT_BUTTON_ATCK2(actor) = true;
+       }
+}
+
+METHOD(OverkillNex, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire))
+{
+       if (WEP_CVAR(oknex, charge) && actor.(weaponentity).oknex_charge < WEP_CVAR(oknex, charge_limit))
+       {
+               actor.(weaponentity).oknex_charge = min(1, actor.(weaponentity).oknex_charge + WEP_CVAR(oknex, charge_rate) * frametime / W_TICSPERFRAME);
+       }
+
+       if (weaponslot(weaponentity) == 0)
+       {
+               actor.oknex_charge = actor.(weaponentity).oknex_charge;
+       }
+
+       if (WEP_CVAR_SEC(oknex, chargepool))
+               if (actor.(weaponentity).oknex_chargepool_ammo < 1)
+               {
+                       if (actor.oknex_chargepool_pauseregen_finished < time)
+                               actor.(weaponentity).oknex_chargepool_ammo = min(1, actor.(weaponentity).oknex_chargepool_ammo + WEP_CVAR_SEC(oknex, chargepool_regen) * frametime / W_TICSPERFRAME);
+                       actor.pauseregen_finished = max(actor.pauseregen_finished, time + WEP_CVAR_SEC(oknex, chargepool_pause_regen));
+               }
+
+       if(weaponslot(weaponentity) == 0)
+               actor.oknex_chargepool_ammo = actor.(weaponentity).oknex_chargepool_ammo;
+
+       if ((WEP_CVAR_SEC(oknex, refire_type) == 1) && (fire & 2) && (time >= actor.jump_interval))
+       {
+               // Secondary uses it's own refire timer if refire_type is 1.
+               actor.jump_interval = time + WEP_CVAR_SEC(oknex, refire) * W_WeaponRateFactor(actor);
+               // Ugly hack to reuse the fire mode of the blaster.
+               makevectors(actor.v_angle);
+               Weapon oldwep = actor.(weaponentity).m_weapon; // we can't avoid this hack
+               actor.(weaponentity).m_weapon = WEP_BLASTER;
+               W_Blaster_Attack(
+                       actor,
+                       weaponentity,
+                       WEP_BLASTER.m_id | HITTYPE_SECONDARY,
+                       WEP_CVAR_SEC(oknex, shotangle),
+                       WEP_CVAR_SEC(oknex, damage),
+                       WEP_CVAR_SEC(oknex, edgedamage),
+                       WEP_CVAR_SEC(oknex, radius),
+                       WEP_CVAR_SEC(oknex, force),
+                       WEP_CVAR_SEC(oknex, speed),
+                       WEP_CVAR_SEC(oknex, spread),
+                       WEP_CVAR_SEC(oknex, delay),
+                       WEP_CVAR_SEC(oknex, lifetime)
+               );
+               actor.(weaponentity).m_weapon = oldwep;
+               if ((actor.(weaponentity).wframe == WFRAME_IDLE) ||
+                       (actor.(weaponentity).wframe == WFRAME_FIRE2))
+               {
+                       // Set secondary fire animation.
+                       vector a = '0 0 0';
+                       actor.(weaponentity).wframe = WFRAME_FIRE2;
+                       a = actor.(weaponentity).anim_fire2;
+                       a.z *= g_weaponratefactor;
+                       FOREACH_CLIENT(true, LAMBDA(
+                               if (it == actor || (IS_SPEC(it) && it.enemy == actor))
+                               {
+                                       wframe_send(it, actor.(weaponentity), a, true);
+                               }
+                       ));
+                       animdecide_setaction(actor, ANIMACTION_SHOOT, true);
+               }
+       }
+
+       if (autocvar_g_balance_oknex_reload_ammo && actor.(weaponentity).clip_load < WEP_CVAR_PRI(oknex, ammo))
+       {
+               // Rorced reload
+               thiswep.wr_reload(thiswep, actor, weaponentity);
+               return;
+       }
+       if (fire & 1) // Primary attack
+       {
+               if (!weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR_PRI(oknex, refire)))
+               {
+                       return;
+               }
+               W_OverkillNex_Attack(thiswep, actor, weaponentity, 0);
+               weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_PRI(oknex, animtime), w_ready);
+               return;
+       }
+       if ((fire & 2) && (WEP_CVAR(oknex, secondary) == 2) && (WEP_CVAR_SEC(oknex, refire_type) == 0))
+       {
+               // Secondary attack
+               if (!weapon_prepareattack(thiswep, actor, weaponentity, true, WEP_CVAR_SEC(oknex, refire)))
+               {
+                       return;
+               }
+               // ugly instagib hack to reuse the fire mode of the laser
+               makevectors(actor.v_angle);
+               Weapon oldwep = actor.(weaponentity).m_weapon; // we can't avoid this hack
+               actor.(weaponentity).m_weapon = WEP_BLASTER;
+               W_Blaster_Attack(
+                       actor,
+                       weaponentity,
+                       WEP_BLASTER.m_id | HITTYPE_SECONDARY,
+                       WEP_CVAR_SEC(oknex, shotangle),
+                       WEP_CVAR_SEC(oknex, damage),
+                       WEP_CVAR_SEC(oknex, edgedamage),
+                       WEP_CVAR_SEC(oknex, radius),
+                       WEP_CVAR_SEC(oknex, force),
+                       WEP_CVAR_SEC(oknex, speed),
+                       WEP_CVAR_SEC(oknex, spread),
+                       WEP_CVAR_SEC(oknex, delay),
+                       WEP_CVAR_SEC(oknex, lifetime)
+               );
+               actor.(weaponentity).m_weapon = oldwep;
+               weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, WEP_CVAR_SEC(oknex, animtime), w_ready);
+               return;
+       }
+       //if ((WEP_CVAR(oknex, charge) && (WEP_CVAR(oknex, secondary) == 1)) ? (PHYS_INPUT_BUTTON_ZOOM(actor) | PHYS_INPUT_BUTTON_ZOOMSCRIPT(actor)) : (fire & 2))
+       //{
+       //      if(WEP_CVAR(oknex, charge))
+       //      {
+       //              actor.(weaponentity).oknex_charge_rottime = time + WEP_CVAR(oknex, charge_rot_pause);
+       //              float dt = frametime / W_TICSPERFRAME;
+       //
+       //              if(actor.(weaponentity).oknex_charge < 1)
+       //              {
+       //                      if(WEP_CVAR_SEC(oknex, chargepool))
+       //                      {
+       //                              if(WEP_CVAR_SEC(oknex, ammo))
+       //                              {
+       //                                      // always deplete if secondary is held
+       //                                      actor.oknex_chargepool_ammo = max(0, actor.oknex_chargepool_ammo - WEP_CVAR_SEC(oknex, ammo) * dt);
+
+       //                                      dt = min(dt, (1 - actor.(weaponentity).oknex_charge) / WEP_CVAR(oknex, charge_rate));
+       //                                      actor.oknex_chargepool_pauseregen_finished = time + WEP_CVAR_SEC(oknex, chargepool_pause_regen);
+       //                                      dt = min(dt, actor.oknex_chargepool_ammo);
+       //                                      dt = max(0, dt);
+
+       //                                      actor.(weaponentity).oknex_charge += dt * WEP_CVAR(oknex, charge_rate);
+       //                              }
+       //                      }
+
+       //                      else if(WEP_CVAR_SEC(oknex, ammo))
+       //                      {
+       //                              if(fire & 2) // only eat ammo when the button is pressed
+       //                              {
+       //                                      dt = min(dt, (1 - actor.(weaponentity).oknex_charge) / WEP_CVAR(oknex, charge_rate));
+       //                                      if(!(actor.items & IT_UNLIMITED_WEAPON_AMMO))
+       //                                      {
+       //                                              // if this weapon is reloadable, decrease its load. Else decrease the player's ammo
+       //                                              if(autocvar_g_balance_vortex_reload_ammo)
+       //                                              {
+       //                                                      dt = min(dt, (actor.(weaponentity).clip_load - WEP_CVAR_PRI(oknex, ammo)) / WEP_CVAR_SEC(oknex, ammo));
+       //                                                      dt = max(0, dt);
+       //                                                      if(dt > 0)
+       //                                                      {
+       //                                                              actor.(weaponentity).clip_load = max(WEP_CVAR_SEC(oknex, ammo), actor.(weaponentity).clip_load - WEP_CVAR_SEC(oknex, ammo) * dt);
+       //                                                      }
+       //                                                      actor.(weaponentity).(weapon_load[WEP_OVERKILL_NEX.m_id]) = actor.(weaponentity).clip_load;
+       //                                              }
+       //                                              else
+       //                                              {
+       //                                                      dt = min(dt, (actor.(thiswep.ammo_field) - WEP_CVAR_PRI(oknex, ammo)) / WEP_CVAR_SEC(oknex, ammo));
+       //                                                      dt = max(0, dt);
+       //                                                      if(dt > 0)
+       //                                                      {
+       //                                                              actor.(thiswep.ammo_field) = max(WEP_CVAR_SEC(oknex, ammo), actor.(thiswep.ammo_field) - WEP_CVAR_SEC(oknex, ammo) * dt);
+       //                                                      }
+       //                                              }
+       //                                      }
+       //                                      actor.(weaponentity).oknex_charge += dt * WEP_CVAR(oknex, charge_rate);
+       //                              }
+       //                      }
+
+       //                      else
+       //                      {
+       //                              dt = min(dt, (1 - actor.(weaponentity).oknex_charge) / WEP_CVAR(oknex, charge_rate));
+       //                              actor.(weaponentity).oknex_charge += dt * WEP_CVAR(oknex, charge_rate);
+       //                      }
+       //              }
+       //      }
+       //      else if(WEP_CVAR(oknex, secondary))
+       //      {
+       //              if(weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR_SEC(oknex, refire)))
+       //              {
+       //                      W_OverkillNex_Attack(thiswep, actor, weaponentity, 1);
+       //                      weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_SEC(oknex, animtime), w_ready);
+       //              }
+       //      }
+       //}
+}
+
+METHOD(OverkillNex, wr_setup, void(entity thiswep, entity actor, .entity weaponentity))
+{
+       actor.oknex_lasthit = 0;
+}
+
+METHOD(OverkillNex, wr_checkammo1, bool(entity thiswep, entity actor, .entity weaponentity))
+{
+       float ammo_amount = GetResourceAmount(actor, thiswep.ammo_type) >= WEP_CVAR_PRI(oknex, ammo);
+       ammo_amount += (autocvar_g_balance_oknex_reload_ammo && actor.(weaponentity).(weapon_load[WEP_OVERKILL_NEX.m_id]) >= WEP_CVAR_PRI(oknex, ammo));
+       return ammo_amount;
+}
+
+METHOD(OverkillNex, wr_checkammo2, bool(entity thiswep, entity actor, .entity weaponentity))
+{
+       if (WEP_CVAR(oknex, secondary))
+       {
+               // don't allow charging if we don't have enough ammo
+               float ammo_amount = GetResourceAmount(actor, thiswep.ammo_type) >= WEP_CVAR_SEC(oknex, ammo);
+               ammo_amount += actor.(weaponentity).(weapon_load[WEP_OVERKILL_NEX.m_id]) >= WEP_CVAR_SEC(oknex, ammo);
+               return ammo_amount;
+       }
+       else
+       {
+               return false; // zoom is not a fire mode
+       }
+}
+
+METHOD(OverkillNex, wr_resetplayer, void(entity thiswep, entity actor))
+{
+       if (WEP_CVAR(oknex, charge)) {
+               if (WEP_CVAR_SEC(oknex, chargepool)) {
+                       actor.oknex_chargepool_ammo = 1;
+               }
+               actor.oknex_charge = WEP_CVAR(oknex, charge_start);
+               for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
+               {
+                       .entity weaponentity = weaponentities[slot];
+                       actor.(weaponentity).oknex_charge = WEP_CVAR(oknex, charge_start);
+
+                       if (WEP_CVAR_SEC(oknex, chargepool))
+                               actor.(weaponentity).oknex_chargepool_ammo = 1;
+               }
+       }
+       actor.oknex_lasthit = 0;
+}
+
+METHOD(OverkillNex, wr_reload, void(entity thiswep, entity actor, .entity weaponentity))
+{
+       W_Reload(actor, weaponentity, WEP_CVAR_PRI(oknex, ammo), SND_RELOAD);
+}
+
+METHOD(OverkillNex, wr_suicidemessage, Notification(entity thiswep))
+{
+       return WEAPON_THINKING_WITH_PORTALS;
+}
+
+METHOD(OverkillNex, wr_killmessage, Notification(entity thiswep))
+{
+       return WEAPON_VORTEX_MURDER;
+}
+
+METHOD(OverkillNex, wr_zoom, bool(entity thiswep, entity actor))
+{
+       return PHYS_INPUT_BUTTON_ATCK2(actor) && !WEP_CVAR(oknex, secondary);
+}
+
+#endif
+#ifdef CSQC
+
+METHOD(OverkillNex, wr_impacteffect, void(entity thiswep, entity actor))
+{
+       entity this = actor;
+       vector org2 = w_org + w_backoff * 6;
+       pointparticles(EFFECT_VORTEX_IMPACT, org2, '0 0 0', 1);
+       if(!w_issilent)
+               sound(this, CH_SHOTS, SND_NEXIMPACT, VOL_BASE, ATTN_NORM);
+}
+
+METHOD(OverkillNex, wr_init, void(entity thiswep))
+{
+       if(autocvar_cl_reticle && autocvar_cl_reticle_weapon)
+       {
+               precache_pic("gfx/reticle_nex");
+       }
+}
+
+METHOD(OverkillNex, wr_zoom, bool(entity thiswep, entity actor))
+{
+       if(button_zoom || zoomscript_caught || (!WEP_CVAR(oknex, secondary) && button_attack2))
+       {
+               return true;
+       }
+       else
+       {
+               // no weapon specific image for this weapon
+               return false;
+       }
+}
+
+#endif
diff --git a/qcsrc/common/mutators/mutator/overkill/oknex.qh b/qcsrc/common/mutators/mutator/overkill/oknex.qh
new file mode 100644 (file)
index 0000000..599a7af
--- /dev/null
@@ -0,0 +1,77 @@
+#pragma once
+
+CLASS(OverkillNex, Weapon)
+/* spawnfunc */ ATTRIB(OverkillNex, m_canonical_spawnfunc, string, "weapon_oknex");
+/* ammotype  */ ATTRIB(OverkillNex, ammo_type, int, RESOURCE_CELLS);
+/* impulse   */ ATTRIB(OverkillNex, impulse, int, 7);
+/* flags     */ ATTRIB(OverkillNex, spawnflags, int, WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN);
+/* rating    */ ATTRIB(OverkillNex, bot_pickupbasevalue, float, 8000);
+/* color     */ ATTRIB(OverkillNex, wpcolor, vector, '0.5 1 1');
+/* modelname */ ATTRIB(OverkillNex, mdl, string, "ok_sniper");
+#ifdef GAMEQC
+/* model     */ ATTRIB(OverkillNex, m_model, Model, MDL_OK_SNIPER_ITEM);
+#endif
+/* crosshair */ ATTRIB(OverkillNex, w_crosshair, string, "gfx/crosshairnex");
+/* crosshair */ ATTRIB(OverkillNex, w_crosshair_size, float, 0.65);
+/* reticle   */ ATTRIB(OverkillNex, w_reticle, string, "gfx/reticle_nex");
+/* wepimg    */ ATTRIB(OverkillNex, model2, string, "weaponnex");
+/* refname   */ ATTRIB(OverkillNex, netname, string, "oknex");
+/* wepname   */ ATTRIB(OverkillNex, m_name, string, _("Overkill Nex"));
+
+#define X(BEGIN, P, END, class, prefix) \
+       BEGIN(class) \
+               P(class, prefix, ammo, float, PRI) \
+               P(class, prefix, animtime, float, PRI) \
+               P(class, prefix, chargepool, float, SEC) \
+               P(class, prefix, chargepool_pause_regen, float, SEC) \
+               P(class, prefix, chargepool_regen, float, SEC) \
+               P(class, prefix, charge, float, NONE) \
+               P(class, prefix, charge_animlimit, float, NONE) \
+               P(class, prefix, charge_limit, float, NONE) \
+               P(class, prefix, charge_maxspeed, float, NONE) \
+               P(class, prefix, charge_mindmg, float, NONE) \
+               P(class, prefix, charge_minspeed, float, NONE) \
+               P(class, prefix, charge_rate, float, NONE) \
+               P(class, prefix, charge_rot_pause, float, NONE) \
+               P(class, prefix, charge_rot_rate, float, NONE) \
+               P(class, prefix, charge_shot_multiplier, float, NONE) \
+               P(class, prefix, charge_start, float, NONE) \
+               P(class, prefix, charge_velocity_rate, float, NONE) \
+               P(class, prefix, damagefalloff_forcehalflife, float, BOTH) \
+               P(class, prefix, damagefalloff_halflife, float, BOTH) \
+               P(class, prefix, damagefalloff_maxdist, float, BOTH) \
+               P(class, prefix, damagefalloff_mindist, float, BOTH) \
+               P(class, prefix, damage, float, PRI) \
+               P(class, prefix, force, float, PRI) \
+               P(class, prefix, refire, float, PRI) \
+               P(class, prefix, secondary, float, NONE) \
+               P(class, prefix, reload_ammo, float, NONE) \
+        P(class, prefix, reload_time, float, NONE) \
+        P(class, prefix, switchdelay_raise, float, NONE) \
+        P(class, prefix, switchdelay_drop, float, NONE) \
+        P(class, prefix, weaponreplace, string, NONE) \
+        P(class, prefix, weaponstart, float, NONE) \
+        P(class, prefix, weaponstartoverride, float, NONE) \
+        P(class, prefix, weaponthrowable, float, NONE) \
+               P(class, prefix, ammo, float, SEC) \
+               P(class, prefix, animtime, float, SEC) \
+               P(class, prefix, damage, float, SEC) \
+               P(class, prefix, delay, float, SEC) \
+               P(class, prefix, edgedamage, float, SEC) \
+               P(class, prefix, force, float, SEC) \
+               P(class, prefix, lifetime, float, SEC) \
+               P(class, prefix, radius, float, SEC) \
+               P(class, prefix, refire, float, SEC) \
+               P(class, prefix, refire_type, float, SEC) \
+               P(class, prefix, shotangle, float, SEC) \
+               P(class, prefix, speed, float, SEC) \
+               P(class, prefix, spread, float, SEC) \
+       END()
+    W_PROPS(X, OverkillNex, oknex)
+#undef X
+
+ENDCLASS(OverkillNex)
+REGISTER_WEAPON(OVERKILL_NEX, oknex, NEW(OverkillNex));
+
+
+SPAWNFUNC_WEAPON(weapon_oknex, WEP_OVERKILL_NEX)
diff --git a/qcsrc/common/mutators/mutator/overkill/okvortex.qc b/qcsrc/common/mutators/mutator/overkill/okvortex.qc
deleted file mode 100644 (file)
index cef11b9..0000000
+++ /dev/null
@@ -1,407 +0,0 @@
-#include "okvortex.qh"
-
-#ifdef SVQC
-
-.float okvortex_lasthit;
-#endif
-
-#if defined(GAMEQC)
-
-METHOD(OverkillVortex, wr_glow, vector(OverkillVortex this, entity actor, entity wepent))
-{
-       if (!WEP_CVAR(okvortex, charge)) return '0 0 0';
-       float charge = wepent.okvortex_charge;
-       float animlimit = WEP_CVAR(okvortex, charge_animlimit);
-       vector g;
-       g.x = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_red_half * min(1, charge / animlimit);
-       g.y = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_green_half * min(1, charge / animlimit);
-       g.z = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_blue_half * min(1, charge / animlimit);
-       if (charge > animlimit)
-       {
-               g.x += autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_red_full * (charge - animlimit) / (1 - animlimit);
-               g.y += autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_green_full * (charge - animlimit) / (1 - animlimit);
-               g.z += autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_blue_full * (charge - animlimit) / (1 - animlimit);
-       }
-       return g;
-}
-#endif
-
-#ifdef SVQC
-REGISTER_MUTATOR(okvortex_charge, true);
-
-MUTATOR_HOOKFUNCTION(okvortex_charge, GetPressedKeys)
-{
-       entity player = M_ARGV(0, entity);
-
-       // WEAPONTODO
-       if(!WEP_CVAR(okvortex, charge) || !WEP_CVAR(okvortex, charge_velocity_rate))
-               return;
-
-       for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
-       {
-               .entity weaponentity = weaponentities[slot];
-
-               if (player.(weaponentity).m_weapon == WEP_OVERKILL_VORTEX && WEP_CVAR(okvortex, charge) && WEP_CVAR(okvortex, charge_velocity_rate) && vdist(vec2(player.velocity), >, WEP_CVAR(okvortex, charge_minspeed)))
-               {
-                       float xyspeed = vlen(vec2(player.velocity));
-                       // add a maximum of charge_velocity_rate when going fast (f = 1), gradually increasing from minspeed (f = 0) to maxspeed
-                               xyspeed = min(xyspeed, WEP_CVAR(okvortex, charge_maxspeed));
-                       float f = (xyspeed - WEP_CVAR(okvortex, charge_minspeed)) / (WEP_CVAR(okvortex, charge_maxspeed) - WEP_CVAR(okvortex, charge_minspeed));
-                       // add the extra charge
-                       player.(weaponentity).okvortex_charge = min(1, player.(weaponentity).okvortex_charge + WEP_CVAR(okvortex, charge_velocity_rate) * f * PHYS_INPUT_TIMELENGTH);
-               }
-       }
-}
-
-void W_OverkillVortex_Attack(Weapon thiswep, entity actor, .entity weaponentity, float issecondary)
-{
-       float mydmg, myforce, mymindist, mymaxdist, myhalflife, myforcehalflife, myammo, charge;
-
-       mydmg = WEP_CVAR_BOTH(okvortex, !issecondary, damage);
-       myforce = WEP_CVAR_BOTH(okvortex, !issecondary, force);
-       mymindist = WEP_CVAR_BOTH(okvortex, !issecondary, damagefalloff_mindist);
-       mymaxdist = WEP_CVAR_BOTH(okvortex, !issecondary, damagefalloff_maxdist);
-       myhalflife = WEP_CVAR_BOTH(okvortex, !issecondary, damagefalloff_halflife);
-       myforcehalflife = WEP_CVAR_BOTH(okvortex, !issecondary, damagefalloff_forcehalflife);
-       myammo = WEP_CVAR_BOTH(okvortex, !issecondary, ammo);
-
-       float flying;
-       flying = IsFlying(actor); // do this BEFORE to make the trace values from FireRailgunBullet last
-
-       if (WEP_CVAR(okvortex, charge))
-       {
-               charge = WEP_CVAR(okvortex, charge_mindmg) / mydmg + (1 - WEP_CVAR(okvortex, charge_mindmg) / mydmg) * actor.(weaponentity).okvortex_charge;
-               actor.(weaponentity).okvortex_charge *= WEP_CVAR(okvortex, charge_shot_multiplier); // do this AFTER setting mydmg/myforce
-               // O RLY? -- divVerent
-               // YA RLY -- FruitieX
-       }
-       else
-       {
-               charge = 1;
-       }
-       mydmg *= charge;
-       myforce *= charge;
-
-       W_SetupShot(actor, weaponentity, true, 5, SND_NEXFIRE, CH_WEAPON_A, mydmg);
-       if(charge > WEP_CVAR(okvortex, charge_animlimit) && WEP_CVAR(okvortex, charge_animlimit)) // if the OverkillVortex is overcharged, we play an extra sound
-       {
-               sound(actor, CH_WEAPON_B, SND_NEXCHARGE, VOL_BASE * (charge - 0.5 * WEP_CVAR(okvortex, charge_animlimit)) / (1 - 0.5 * WEP_CVAR(okvortex, charge_animlimit)), ATTN_NORM);
-       }
-
-       yoda = 0;
-       damage_goodhits = 0;
-       FireRailgunBullet(actor, weaponentity, w_shotorg, w_shotorg + w_shotdir * max_shot_distance, mydmg, myforce, mymindist, mymaxdist, myhalflife, myforcehalflife, WEP_OVERKILL_VORTEX.m_id);
-
-       if(yoda && flying)
-               Send_Notification(NOTIF_ONE, actor, MSG_ANNCE, ANNCE_ACHIEVEMENT_YODA);
-       if(damage_goodhits && actor.okvortex_lasthit)
-       {
-               Send_Notification(NOTIF_ONE, actor, MSG_ANNCE, ANNCE_ACHIEVEMENT_IMPRESSIVE);
-               damage_goodhits = 0; // only every second time
-       }
-
-       actor.okvortex_lasthit = damage_goodhits;
-
-       //beam and muzzle flash done on client
-       SendCSQCVortexBeamParticle(charge);
-
-       W_DecreaseAmmo(thiswep, actor, myammo, weaponentity);
-}
-
-.float okvortex_chargepool_pauseregen_finished;
-
-METHOD(OverkillVortex, wr_aim, void(entity thiswep, entity actor, .entity weaponentity))
-{
-       if(bot_aim(actor, weaponentity, 1000000, 0, 1, false))
-               PHYS_INPUT_BUTTON_ATCK(actor) = true;
-       else
-       {
-               if(WEP_CVAR(okvortex, charge))
-                       PHYS_INPUT_BUTTON_ATCK2(actor) = true;
-       }
-}
-
-METHOD(OverkillVortex, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire))
-{
-       if (WEP_CVAR(okvortex, charge) && actor.(weaponentity).okvortex_charge < WEP_CVAR(okvortex, charge_limit))
-       {
-               actor.(weaponentity).okvortex_charge = min(1, actor.(weaponentity).okvortex_charge + WEP_CVAR(okvortex, charge_rate) * frametime / W_TICSPERFRAME);
-       }
-
-       if (weaponslot(weaponentity) == 0)
-       {
-               actor.okvortex_charge = actor.(weaponentity).okvortex_charge;
-       }
-
-       if (WEP_CVAR_SEC(okvortex, chargepool))
-               if (actor.(weaponentity).okvortex_chargepool_ammo < 1)
-               {
-                       if (actor.okvortex_chargepool_pauseregen_finished < time)
-                               actor.(weaponentity).okvortex_chargepool_ammo = min(1, actor.(weaponentity).okvortex_chargepool_ammo + WEP_CVAR_SEC(okvortex, chargepool_regen) * frametime / W_TICSPERFRAME);
-                       actor.pauseregen_finished = max(actor.pauseregen_finished, time + WEP_CVAR_SEC(okvortex, chargepool_pause_regen));
-               }
-
-       if(weaponslot(weaponentity) == 0)
-               actor.okvortex_chargepool_ammo = actor.(weaponentity).okvortex_chargepool_ammo;
-
-       if ((WEP_CVAR_SEC(okvortex, refire_type) == 1) && (fire & 2) && (time >= actor.jump_interval))
-       {
-               // Secondary uses it's own refire timer if refire_type is 1.
-               actor.jump_interval = time + WEP_CVAR_SEC(okvortex, refire) * W_WeaponRateFactor(actor);
-               // Ugly hack to reuse the fire mode of the blaster.
-               makevectors(actor.v_angle);
-               Weapon oldwep = actor.(weaponentity).m_weapon; // we can't avoid this hack
-               actor.(weaponentity).m_weapon = WEP_BLASTER;
-               W_Blaster_Attack(
-                       actor,
-                       weaponentity,
-                       WEP_BLASTER.m_id | HITTYPE_SECONDARY,
-                       WEP_CVAR_SEC(okvortex, shotangle),
-                       WEP_CVAR_SEC(okvortex, damage),
-                       WEP_CVAR_SEC(okvortex, edgedamage),
-                       WEP_CVAR_SEC(okvortex, radius),
-                       WEP_CVAR_SEC(okvortex, force),
-                       WEP_CVAR_SEC(okvortex, speed),
-                       WEP_CVAR_SEC(okvortex, spread),
-                       WEP_CVAR_SEC(okvortex, delay),
-                       WEP_CVAR_SEC(okvortex, lifetime)
-               );
-               actor.(weaponentity).m_weapon = oldwep;
-               if ((actor.(weaponentity).wframe == WFRAME_IDLE) ||
-                       (actor.(weaponentity).wframe == WFRAME_FIRE2))
-               {
-                       // Set secondary fire animation.
-                       vector a = '0 0 0';
-                       actor.(weaponentity).wframe = WFRAME_FIRE2;
-                       a = actor.(weaponentity).anim_fire2;
-                       a.z *= g_weaponratefactor;
-                       FOREACH_CLIENT(true, LAMBDA(
-                               if (it == actor || (IS_SPEC(it) && it.enemy == actor))
-                               {
-                                       wframe_send(it, actor.(weaponentity), a, true);
-                               }
-                       ));
-                       animdecide_setaction(actor, ANIMACTION_SHOOT, true);
-               }
-       }
-
-       if (autocvar_g_balance_okvortex_reload_ammo && actor.(weaponentity).clip_load < WEP_CVAR_PRI(okvortex, ammo))
-       {
-               // Rorced reload
-               thiswep.wr_reload(thiswep, actor, weaponentity);
-               return;
-       }
-       if (fire & 1) // Primary attack
-       {
-               if (!weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR_PRI(okvortex, refire)))
-               {
-                       return;
-               }
-               W_OverkillVortex_Attack(thiswep, actor, weaponentity, 0);
-               weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_PRI(okvortex, animtime), w_ready);
-               return;
-       }
-       if ((fire & 2) && (WEP_CVAR(okvortex, secondary) == 2) && (WEP_CVAR_SEC(okvortex, refire_type) == 0))
-       {
-               // Secondary attack
-               if (!weapon_prepareattack(thiswep, actor, weaponentity, true, WEP_CVAR_SEC(okshotgun, refire)))
-               {
-                       return;
-               }
-               // ugly instagib hack to reuse the fire mode of the laser
-               makevectors(actor.v_angle);
-               Weapon oldwep = actor.(weaponentity).m_weapon; // we can't avoid this hack
-               actor.(weaponentity).m_weapon = WEP_BLASTER;
-               W_Blaster_Attack(
-                       actor,
-                       weaponentity,
-                       WEP_BLASTER.m_id | HITTYPE_SECONDARY,
-                       WEP_CVAR_SEC(okvortex, shotangle),
-                       WEP_CVAR_SEC(okvortex, damage),
-                       WEP_CVAR_SEC(okvortex, edgedamage),
-                       WEP_CVAR_SEC(okvortex, radius),
-                       WEP_CVAR_SEC(okvortex, force),
-                       WEP_CVAR_SEC(okvortex, speed),
-                       WEP_CVAR_SEC(okvortex, spread),
-                       WEP_CVAR_SEC(okvortex, delay),
-                       WEP_CVAR_SEC(okvortex, lifetime)
-               );
-               actor.(weaponentity).m_weapon = oldwep;
-               weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, WEP_CVAR_SEC(okvortex, animtime), w_ready);
-               return;
-       }
-       //if ((WEP_CVAR(okvortex, charge) && (WEP_CVAR(okvortex, secondary) == 1)) ? (PHYS_INPUT_BUTTON_ZOOM(actor) | PHYS_INPUT_BUTTON_ZOOMSCRIPT(actor)) : (fire & 2))
-       //{
-       //      if(WEP_CVAR(okvortex, charge))
-       //      {
-       //              actor.(weaponentity).okvortex_charge_rottime = time + WEP_CVAR(okvortex, charge_rot_pause);
-       //              float dt = frametime / W_TICSPERFRAME;
-       //
-       //              if(actor.(weaponentity).okvortex_charge < 1)
-       //              {
-       //                      if(WEP_CVAR_SEC(okvortex, chargepool))
-       //                      {
-       //                              if(WEP_CVAR_SEC(okvortex, ammo))
-       //                              {
-       //                                      // always deplete if secondary is held
-       //                                      actor.okvortex_chargepool_ammo = max(0, actor.okvortex_chargepool_ammo - WEP_CVAR_SEC(okvortex, ammo) * dt);
-
-       //                                      dt = min(dt, (1 - actor.(weaponentity).okvortex_charge) / WEP_CVAR(okvortex, charge_rate));
-       //                                      actor.okvortex_chargepool_pauseregen_finished = time + WEP_CVAR_SEC(okvortex, chargepool_pause_regen);
-       //                                      dt = min(dt, actor.okvortex_chargepool_ammo);
-       //                                      dt = max(0, dt);
-
-       //                                      actor.(weaponentity).okvortex_charge += dt * WEP_CVAR(okvortex, charge_rate);
-       //                              }
-       //                      }
-
-       //                      else if(WEP_CVAR_SEC(okvortex, ammo))
-       //                      {
-       //                              if(fire & 2) // only eat ammo when the button is pressed
-       //                              {
-       //                                      dt = min(dt, (1 - actor.(weaponentity).okvortex_charge) / WEP_CVAR(okvortex, charge_rate));
-       //                                      if(!(actor.items & IT_UNLIMITED_WEAPON_AMMO))
-       //                                      {
-       //                                              // if this weapon is reloadable, decrease its load. Else decrease the player's ammo
-       //                                              if(autocvar_g_balance_vortex_reload_ammo)
-       //                                              {
-       //                                                      dt = min(dt, (actor.(weaponentity).clip_load - WEP_CVAR_PRI(okvortex, ammo)) / WEP_CVAR_SEC(okvortex, ammo));
-       //                                                      dt = max(0, dt);
-       //                                                      if(dt > 0)
-       //                                                      {
-       //                                                              actor.(weaponentity).clip_load = max(WEP_CVAR_SEC(okvortex, ammo), actor.(weaponentity).clip_load - WEP_CVAR_SEC(okvortex, ammo) * dt);
-       //                                                      }
-       //                                                      actor.(weaponentity).(weapon_load[WEP_OVERKILL_VORTEX.m_id]) = actor.(weaponentity).clip_load;
-       //                                              }
-       //                                              else
-       //                                              {
-       //                                                      dt = min(dt, (actor.(thiswep.ammo_field) - WEP_CVAR_PRI(okvortex, ammo)) / WEP_CVAR_SEC(okvortex, ammo));
-       //                                                      dt = max(0, dt);
-       //                                                      if(dt > 0)
-       //                                                      {
-       //                                                              actor.(thiswep.ammo_field) = max(WEP_CVAR_SEC(okvortex, ammo), actor.(thiswep.ammo_field) - WEP_CVAR_SEC(okvortex, ammo) * dt);
-       //                                                      }
-       //                                              }
-       //                                      }
-       //                                      actor.(weaponentity).okvortex_charge += dt * WEP_CVAR(okvortex, charge_rate);
-       //                              }
-       //                      }
-
-       //                      else
-       //                      {
-       //                              dt = min(dt, (1 - actor.(weaponentity).okvortex_charge) / WEP_CVAR(okvortex, charge_rate));
-       //                              actor.(weaponentity).okvortex_charge += dt * WEP_CVAR(okvortex, charge_rate);
-       //                      }
-       //              }
-       //      }
-       //      else if(WEP_CVAR(okvortex, secondary))
-       //      {
-       //              if(weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR_SEC(okvortex, refire)))
-       //              {
-       //                      W_OverkillVortex_Attack(thiswep, actor, weaponentity, 1);
-       //                      weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_SEC(okvortex, animtime), w_ready);
-       //              }
-       //      }
-       //}
-}
-
-METHOD(OverkillVortex, wr_setup, void(entity thiswep, entity actor, .entity weaponentity))
-{
-       actor.okvortex_lasthit = 0;
-}
-
-METHOD(OverkillVortex, wr_checkammo1, bool(entity thiswep, entity actor, .entity weaponentity))
-{
-       float ammo_amount = GetResourceAmount(actor, thiswep.ammo_type) >= WEP_CVAR_PRI(okvortex, ammo);
-       ammo_amount += (autocvar_g_balance_okvortex_reload_ammo && actor.(weaponentity).(weapon_load[WEP_OVERKILL_VORTEX.m_id]) >= WEP_CVAR_PRI(okvortex, ammo));
-       return ammo_amount;
-}
-
-METHOD(OverkillVortex, wr_checkammo2, bool(entity thiswep, entity actor, .entity weaponentity))
-{
-       if (WEP_CVAR(okvortex, secondary))
-       {
-               // don't allow charging if we don't have enough ammo
-               float ammo_amount = GetResourceAmount(actor, thiswep.ammo_type) >= WEP_CVAR_SEC(okvortex, ammo);
-               ammo_amount += actor.(weaponentity).(weapon_load[WEP_OVERKILL_VORTEX.m_id]) >= WEP_CVAR_SEC(okvortex, ammo);
-               return ammo_amount;
-       }
-       else
-       {
-               return false; // zoom is not a fire mode
-       }
-}
-
-METHOD(OverkillVortex, wr_resetplayer, void(entity thiswep, entity actor))
-{
-       if (WEP_CVAR(okvortex, charge)) {
-               if (WEP_CVAR_SEC(okvortex, chargepool)) {
-                       actor.okvortex_chargepool_ammo = 1;
-               }
-               actor.okvortex_charge = WEP_CVAR(okvortex, charge_start);
-               for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
-               {
-                       .entity weaponentity = weaponentities[slot];
-                       actor.(weaponentity).okvortex_charge = WEP_CVAR(okvortex, charge_start);
-
-                       if (WEP_CVAR_SEC(okvortex, chargepool))
-                               actor.(weaponentity).okvortex_chargepool_ammo = 1;
-               }
-       }
-       actor.okvortex_lasthit = 0;
-}
-
-METHOD(OverkillVortex, wr_reload, void(entity thiswep, entity actor, .entity weaponentity))
-{
-       W_Reload(actor, weaponentity, WEP_CVAR_PRI(okvortex, ammo), SND_RELOAD);
-}
-
-METHOD(OverkillVortex, wr_suicidemessage, Notification(entity thiswep))
-{
-       return WEAPON_THINKING_WITH_PORTALS;
-}
-
-METHOD(OverkillVortex, wr_killmessage, Notification(entity thiswep))
-{
-       return WEAPON_VORTEX_MURDER;
-}
-
-METHOD(OverkillVortex, wr_zoom, bool(entity thiswep, entity actor))
-{
-       return PHYS_INPUT_BUTTON_ATCK2(actor) && !WEP_CVAR(okvortex, secondary);
-}
-
-#endif
-#ifdef CSQC
-
-METHOD(OverkillVortex, wr_impacteffect, void(entity thiswep, entity actor))
-{
-       entity this = actor;
-       vector org2 = w_org + w_backoff * 6;
-       pointparticles(EFFECT_VORTEX_IMPACT, org2, '0 0 0', 1);
-       if(!w_issilent)
-               sound(this, CH_SHOTS, SND_NEXIMPACT, VOL_BASE, ATTN_NORM);
-}
-
-METHOD(OverkillVortex, wr_init, void(entity thiswep))
-{
-       if(autocvar_cl_reticle && autocvar_cl_reticle_weapon)
-       {
-               precache_pic("gfx/reticle_nex");
-       }
-}
-
-METHOD(OverkillVortex, wr_zoom, bool(entity thiswep, entity actor))
-{
-       if(button_zoom || zoomscript_caught || (!WEP_CVAR(okvortex, secondary) && button_attack2))
-       {
-               return true;
-       }
-       else
-       {
-               // no weapon specific image for this weapon
-               return false;
-       }
-}
-
-#endif
diff --git a/qcsrc/common/mutators/mutator/overkill/okvortex.qh b/qcsrc/common/mutators/mutator/overkill/okvortex.qh
deleted file mode 100644 (file)
index c46a38f..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-#pragma once
-
-CLASS(OverkillVortex, Weapon)
-/* spawnfunc */ ATTRIB(OverkillVortex, m_canonical_spawnfunc, string, "weapon_okvortex");
-/* ammotype  */ ATTRIB(OverkillVortex, ammo_type, int, RESOURCE_CELLS);
-/* impulse   */ ATTRIB(OverkillVortex, impulse, int, 7);
-/* flags     */ ATTRIB(OverkillVortex, spawnflags, int, WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN);
-/* rating    */ ATTRIB(OverkillVortex, bot_pickupbasevalue, float, 8000);
-/* color     */ ATTRIB(OverkillVortex, wpcolor, vector, '0.5 1 1');
-/* modelname */ ATTRIB(OverkillVortex, mdl, string, "ok_sniper");
-#ifdef GAMEQC
-/* model     */ ATTRIB(OverkillVortex, m_model, Model, MDL_OK_SNIPER_ITEM);
-#endif
-/* crosshair */ ATTRIB(OverkillVortex, w_crosshair, string, "gfx/crosshairnex");
-/* crosshair */ ATTRIB(OverkillVortex, w_crosshair_size, float, 0.65);
-/* reticle   */ ATTRIB(OverkillVortex, w_reticle, string, "gfx/reticle_nex");
-/* wepimg    */ ATTRIB(OverkillVortex, model2, string, "weaponnex");
-/* refname   */ ATTRIB(OverkillVortex, netname, string, "okvortex");
-/* wepname   */ ATTRIB(OverkillVortex, m_name, string, _("Overkill Vortex"));
-
-#define X(BEGIN, P, END, class, prefix) \
-       BEGIN(class) \
-               P(class, prefix, ammo, float, PRI) \
-               P(class, prefix, animtime, float, PRI) \
-               P(class, prefix, chargepool, float, SEC) \
-               P(class, prefix, chargepool_pause_regen, float, SEC) \
-               P(class, prefix, chargepool_regen, float, SEC) \
-               P(class, prefix, charge, float, NONE) \
-               P(class, prefix, charge_animlimit, float, NONE) \
-               P(class, prefix, charge_limit, float, NONE) \
-               P(class, prefix, charge_maxspeed, float, NONE) \
-               P(class, prefix, charge_mindmg, float, NONE) \
-               P(class, prefix, charge_minspeed, float, NONE) \
-               P(class, prefix, charge_rate, float, NONE) \
-               P(class, prefix, charge_rot_pause, float, NONE) \
-               P(class, prefix, charge_rot_rate, float, NONE) \
-               P(class, prefix, charge_shot_multiplier, float, NONE) \
-               P(class, prefix, charge_start, float, NONE) \
-               P(class, prefix, charge_velocity_rate, float, NONE) \
-               P(class, prefix, damagefalloff_forcehalflife, float, BOTH) \
-               P(class, prefix, damagefalloff_halflife, float, BOTH) \
-               P(class, prefix, damagefalloff_maxdist, float, BOTH) \
-               P(class, prefix, damagefalloff_mindist, float, BOTH) \
-               P(class, prefix, damage, float, PRI) \
-               P(class, prefix, force, float, PRI) \
-               P(class, prefix, refire, float, PRI) \
-               P(class, prefix, secondary, float, NONE) \
-               P(class, prefix, reload_ammo, float, NONE) \
-        P(class, prefix, reload_time, float, NONE) \
-        P(class, prefix, switchdelay_raise, float, NONE) \
-        P(class, prefix, switchdelay_drop, float, NONE) \
-        P(class, prefix, weaponreplace, string, NONE) \
-        P(class, prefix, weaponstart, float, NONE) \
-        P(class, prefix, weaponstartoverride, float, NONE) \
-        P(class, prefix, weaponthrowable, float, NONE) \
-               P(class, prefix, ammo, float, SEC) \
-               P(class, prefix, animtime, float, SEC) \
-               P(class, prefix, damage, float, SEC) \
-               P(class, prefix, delay, float, SEC) \
-               P(class, prefix, edgedamage, float, SEC) \
-               P(class, prefix, force, float, SEC) \
-               P(class, prefix, lifetime, float, SEC) \
-               P(class, prefix, radius, float, SEC) \
-               P(class, prefix, refire, float, SEC) \
-               P(class, prefix, refire_type, float, SEC) \
-               P(class, prefix, shotangle, float, SEC) \
-               P(class, prefix, speed, float, SEC) \
-               P(class, prefix, spread, float, SEC) \
-       END()
-    W_PROPS(X, OverkillVortex, okvortex)
-#undef X
-
-ENDCLASS(OverkillVortex)
-REGISTER_WEAPON(OVERKILL_VORTEX, okvortex, NEW(OverkillVortex));
-
-
-SPAWNFUNC_WEAPON(weapon_okvortex, WEP_OVERKILL_VORTEX)
index cb2a84049ee7171661e1e418ff372b335487a46f..def98fc635d2bcfeeca9eba382be8f11a6e98a33 100644 (file)
@@ -250,7 +250,7 @@ MUTATOR_HOOKFUNCTION(ok, FilterItem)
 
 MUTATOR_HOOKFUNCTION(ok, SetStartItems, CBC_ORDER_LAST)
 {
 
 MUTATOR_HOOKFUNCTION(ok, SetStartItems, CBC_ORDER_LAST)
 {
-       WepSet ok_start_items = (WEPSET(OVERKILL_MACHINEGUN) | WEPSET(OVERKILL_VORTEX) | WEPSET(OVERKILL_SHOTGUN));
+       WepSet ok_start_items = (WEPSET(OVERKILL_MACHINEGUN) | WEPSET(OVERKILL_NEX) | WEPSET(OVERKILL_SHOTGUN));
 
        if(WEP_RPC.weaponstart > 0) { ok_start_items |= WEPSET(RPC); }
        if(WEP_HMG.weaponstart > 0) { ok_start_items |= WEPSET(HMG); }
 
        if(WEP_RPC.weaponstart > 0) { ok_start_items |= WEPSET(RPC); }
        if(WEP_HMG.weaponstart > 0) { ok_start_items |= WEPSET(HMG); }
index 4fbadb254c0b2e82e99c8cb8444e34d50541f591..3b7311f6e9b21611aee4eeffb13a1796213111cc 100644 (file)
@@ -86,11 +86,11 @@ REGISTER_STAT(WEAPON_CLIPLOAD, int)
 REGISTER_STAT(WEAPON_CLIPSIZE, int)
 
 REGISTER_STAT(VORTEX_CHARGE, float)
 REGISTER_STAT(WEAPON_CLIPSIZE, int)
 
 REGISTER_STAT(VORTEX_CHARGE, float)
-REGISTER_STAT(OVERKILL_VORTEX_CHARGE, float)
+REGISTER_STAT(OVERKILL_NEX_CHARGE, float)
 REGISTER_STAT(LAST_PICKUP, float)
 REGISTER_STAT(HUD, int)
 REGISTER_STAT(VORTEX_CHARGEPOOL, float)
 REGISTER_STAT(LAST_PICKUP, float)
 REGISTER_STAT(HUD, int)
 REGISTER_STAT(VORTEX_CHARGEPOOL, float)
-REGISTER_STAT(OVERKILL_VORTEX_CHARGEPOOL, float)
+REGISTER_STAT(OVERKILL_NEX_CHARGEPOOL, float)
 REGISTER_STAT(HIT_TIME, float)
 REGISTER_STAT(DAMAGE_DEALT_TOTAL, int)
 REGISTER_STAT(TYPEHIT_TIME, float)
 REGISTER_STAT(HIT_TIME, float)
 REGISTER_STAT(DAMAGE_DEALT_TOTAL, int)
 REGISTER_STAT(TYPEHIT_TIME, float)
index 43ca6e77ef03f8c77659d0d02bf20103ea15cab5..1ccc2c9db9ae45d402ecea28d16766cc2e74392d 100644 (file)
@@ -26,9 +26,9 @@ MACRO_END
        { WriteByte(chan, this.vortex_charge * 16); }, \
        { (viewmodels[this.m_wepent_slot]).vortex_charge = ReadByte() / 16; }) \
     \
        { WriteByte(chan, this.vortex_charge * 16); }, \
        { (viewmodels[this.m_wepent_slot]).vortex_charge = ReadByte() / 16; }) \
     \
-    PROP(false, okvortex_charge, WEPENT_SET_NORMAL, \
-       { WriteByte(chan, this.okvortex_charge * 16); }, \
-       { (viewmodels[this.m_wepent_slot]).okvortex_charge = ReadByte() / 16; }) \
+    PROP(false, oknex_charge, WEPENT_SET_NORMAL, \
+       { WriteByte(chan, this.oknex_charge * 16); }, \
+       { (viewmodels[this.m_wepent_slot]).oknex_charge = ReadByte() / 16; }) \
     \
     PROP(false, m_gunalign, WEPENT_SET_NORMAL, \
        { WriteByte(chan, this.m_gunalign); }, \
     \
     PROP(false, m_gunalign, WEPENT_SET_NORMAL, \
        { WriteByte(chan, this.m_gunalign); }, \
index 25f3993cd2548d19dbea4299d6c8544394d8c40c..dcd08d45f099678706f70e2c71a8bd99819c5d0a 100644 (file)
@@ -4,7 +4,7 @@ REGISTER_NET_LINKED(ENT_CLIENT_WEPENT)
 REGISTER_NET_TEMP(CLIENT_WEPENT)
 
 .float vortex_charge;
 REGISTER_NET_TEMP(CLIENT_WEPENT)
 
 .float vortex_charge;
-.float okvortex_charge;
+.float oknex_charge;
 .int tuba_instrument;
 
 #ifdef SVQC
 .int tuba_instrument;
 
 #ifdef SVQC
index 769bbd8732c4197c0f85a689b278034a0909315b..f42ce310b5a0caceff599583ba2fab81f96f305c 100644 (file)
@@ -61,7 +61,7 @@
 
 #include "../lib/warpzone/server.qh"
 
 
 #include "../lib/warpzone/server.qh"
 
-#include <common/mutators/mutator/overkill/okvortex.qh>
+#include <common/mutators/mutator/overkill/oknex.qh>
 
 STATIC_METHOD(Client, Add, void(Client this, int _team))
 {
 
 STATIC_METHOD(Client, Add, void(Client this, int _team))
 {
@@ -1763,8 +1763,8 @@ void SpectateCopy(entity this, entity spectatee)
        this.weapons = spectatee.weapons;
        this.vortex_charge = spectatee.vortex_charge;
        this.vortex_chargepool_ammo = spectatee.vortex_chargepool_ammo;
        this.weapons = spectatee.weapons;
        this.vortex_charge = spectatee.vortex_charge;
        this.vortex_chargepool_ammo = spectatee.vortex_chargepool_ammo;
-       this.okvortex_charge = spectatee.okvortex_charge;
-       this.okvortex_chargepool_ammo = spectatee.okvortex_chargepool_ammo;
+       this.oknex_charge = spectatee.oknex_charge;
+       this.oknex_chargepool_ammo = spectatee.oknex_chargepool_ammo;
        this.hagar_load = spectatee.hagar_load;
        this.arc_heat_percent = spectatee.arc_heat_percent;
        this.minelayer_mines = spectatee.minelayer_mines;
        this.hagar_load = spectatee.hagar_load;
        this.arc_heat_percent = spectatee.arc_heat_percent;
        this.minelayer_mines = spectatee.minelayer_mines;
index 7ae23dc2d2660ae0a35ec5fd5ca027c616a76fb3..2c74018d74aa0bb93bbce713ffef072d700b5770 100644 (file)
@@ -328,9 +328,9 @@ float client_cefc_accumulatortime;
 .float vortex_charge = _STAT(VORTEX_CHARGE);
 .float vortex_charge_rottime;
 .float vortex_chargepool_ammo = _STAT(VORTEX_CHARGEPOOL);
 .float vortex_charge = _STAT(VORTEX_CHARGE);
 .float vortex_charge_rottime;
 .float vortex_chargepool_ammo = _STAT(VORTEX_CHARGEPOOL);
-.float okvortex_charge = _STAT(OVERKILL_VORTEX_CHARGE);
-.float okvortex_charge_rottime;
-.float okvortex_chargepool_ammo = _STAT(OVERKILL_VORTEX_CHARGEPOOL);
+.float oknex_charge = _STAT(OVERKILL_NEX_CHARGE);
+.float oknex_charge_rottime;
+.float oknex_chargepool_ammo = _STAT(OVERKILL_NEX_CHARGEPOOL);
 .float hagar_load = _STAT(HAGAR_LOAD);
 
 .int grab; // 0 = can't grab, 1 = owner can grab, 2 = owner and team mates can grab, 3 = anyone can grab
 .float hagar_load = _STAT(HAGAR_LOAD);
 
 .int grab; // 0 = can't grab, 1 = owner can grab, 2 = owner and team mates can grab, 3 = anyone can grab