]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add a new mutator hook to handle weapon speed (projectiles etc)
authorMario <zacjardine@y7mail.com>
Tue, 17 Feb 2015 04:46:12 +0000 (15:46 +1100)
committerMario <zacjardine@y7mail.com>
Tue, 17 Feb 2015 04:46:12 +0000 (15:46 +1100)
effectinfo.txt
mutators.cfg
qcsrc/common/weapons/w_devastator.qc
qcsrc/server/autocvars.qh
qcsrc/server/bot/aim.qc
qcsrc/server/mutators/base.qh
qcsrc/server/mutators/mutator_buffs.qc
qcsrc/server/mutators/mutator_buffs.qh
qcsrc/server/weapons/tracing.qc
qcsrc/server/weapons/weaponsystem.qc
qcsrc/server/weapons/weaponsystem.qh

index d9874d909f8a2a44301d86da7e2f33e0563d4a02..49ae480df70446fc0cb98c73737b180621089922 100644 (file)
@@ -9176,3 +9176,242 @@ effect arc_overheat_fire // arc overheat bouncing sparks
        originjitter 6 6 6
        liquidfriction 5
        velocitymultiplier 80
+
+
+// relic_resistance effect, used by the relics mutator
+// used in qcsrc/server/mutators/relics.qc: pointparticles(particleeffectnum(mdl), e.origin, '0 0 0', 1);
+effect relic_resistance
+count 20
+type static
+color 0x00ff80 0x00ff80
+size 1.5 1.5
+alpha 128 256 256
+gravity -0.1
+airfriction 0.2
+liquidfriction 0.8
+originjitter 8 8 32
+velocityjitter 64 64 32
+
+// relic_regeneration effect, used by the relics mutator
+// used in qcsrc/server/mutators/relics.qc: pointparticles(particleeffectnum(mdl), e.origin, '0 0 0', 1);
+effect relic_regeneration
+count 1
+type static
+color 0x00ffff 0x00ffff
+size 1.5 1.5
+alpha 128 256 256
+gravity -0.1
+airfriction 0.2
+liquidfriction 0.8
+originjitter 8 8 32
+velocityjitter 64 64 32
+
+// relic_vempire effect, used by the relics mutator
+// used in qcsrc/server/mutators/relics.qc: pointparticles(particleeffectnum(mdl), e.origin, '0 0 0', 1);
+effect relic_vampire
+count 20
+type static
+color 0xff00ff 0xff00ff
+size 1.5 1.5
+alpha 128 256 256
+gravity -0.1
+airfriction 0.2
+liquidfriction 0.8
+originjitter 8 8 32
+velocityjitter 64 64 32
+
+// relic_ammo effect, used by the relics mutator
+// used in qcsrc/server/mutators/relics.qc: pointparticles(particleeffectnum(mdl), e.origin, '0 0 0', 1);
+effect relic_ammo
+count 1
+type static
+color 0x80ff00 0x80ff00
+size 1.5 1.5
+alpha 128 256 256
+gravity -0.1
+airfriction 0.2
+liquidfriction 0.8
+originjitter 8 8 32
+velocityjitter 64 64 32
+
+// relic_damage effect, used by the relics mutator
+// used in qcsrc/server/mutators/relics.qc: pointparticles(particleeffectnum(mdl), e.origin, '0 0 0', 1);
+effect relic_damage
+count 20
+type static
+color 0xff0000 0xff0000
+size 1.5 1.5
+alpha 128 256 256
+gravity -0.1
+airfriction 0.2
+liquidfriction 0.8
+originjitter 8 8 32
+velocityjitter 64 64 32
+
+// relic_splashdamage effect, used by the relics mutator
+// used in qcsrc/server/mutators/relics.qc: pointparticles(particleeffectnum(mdl), e.origin, '0 0 0', 1);
+effect relic_ssplashdamage
+count 20
+type static
+color 0xff8000 0xff8000
+size 1.5 1.5
+alpha 128 256 256
+gravity -0.1
+airfriction 0.2
+liquidfriction 0.8
+originjitter 8 8 32
+velocityjitter 64 64 32
+
+// relic_firingspeed effect, used by the relics mutator
+// used in qcsrc/server/mutators/relics.qc: pointparticles(particleeffectnum(mdl), e.origin, '0 0 0', 1);
+effect relic_firingspeed
+count 20
+type static
+color 0xffff00 0xffff00
+size 1.5 1.5
+alpha 128 256 256
+gravity -0.1
+airfriction 0.2
+liquidfriction 0.8
+originjitter 8 8 32
+velocityjitter 64 64 32
+
+// relic_disability effect, used by the relics mutator
+// used in qcsrc/server/mutators/relics.qc: pointparticles(particleeffectnum(mdl), e.origin, '0 0 0', 1);
+effect relic_disability
+count 20
+type static
+color 0x0000ff 0x0000ff
+size 1.5 1.5
+alpha 128 256 256
+gravity -0.1
+airfriction 0.2
+liquidfriction 0.8
+originjitter 8 8 32
+velocityjitter 64 64 32
+
+// relic_disability_curse effect, used by the relics mutator
+// used in qcsrc/server/mutators/relics.qc: pointparticles(particleeffectnum(mdl), e.origin, '0 0 0', 1);
+effect relic_disability_curse
+count 1
+type static
+color 0x000080 0x000080
+size 1.5 1.5
+alpha 128 256 256
+gravity -0.1
+airfriction 0.2
+liquidfriction 0.8
+originjitter 8 8 32
+velocityjitter 64 64 32
+
+// relic_teamboost effect, used by the relics mutator
+// used in qcsrc/server/mutators/relics.qc: pointparticles(particleeffectnum(mdl), e.origin, '0 0 0', 1);
+effect relic_teamboost
+count 20
+type static
+color 0xffffff 0xffffff
+size 1.5 1.5
+alpha 128 256 256
+gravity -0.1
+airfriction 0.2
+liquidfriction 0.8
+originjitter 8 8 32
+velocityjitter 64 64 32
+
+// relic_teamboost_boost effect, used by the relics mutator
+// used in qcsrc/server/mutators/relics.qc: pointparticles(particleeffectnum(mdl), e.origin, '0 0 0', 1);
+effect relic_teamboost_boost
+count 1
+type static
+color 0x808080 0x808080
+size 1.5 1.5
+alpha 128 256 256
+gravity -0.1
+airfriction 0.2
+liquidfriction 0.8
+originjitter 8 8 32
+velocityjitter 64 64 32
+
+// relic_speed effect, used by the relics mutator
+// used in qcsrc/server/mutators/relics.qc: pointparticles(particleeffectnum(mdl), e.origin, '0 0 0', 1);
+effect relic_speed
+count 1
+type static
+color 0x80ffff 0x80ffff
+size 1.5 1.5
+alpha 128 256 256
+gravity -0.1
+airfriction 0.2
+liquidfriction 0.8
+originjitter 8 8 32
+velocityjitter 64 64 32
+
+// relic_jump effect, used by the relics mutator
+// used in qcsrc/server/mutators/relics.qc: pointparticles(particleeffectnum(mdl), e.origin, '0 0 0', 1);
+effect relic_jump
+count 20
+type static
+color 0xffff80 0xffff80
+size 1.5 1.5
+alpha 128 256 256
+gravity -0.1
+airfriction 0.2
+liquidfriction 0.8
+originjitter 8 8 32
+velocityjitter 64 64 32
+
+// relic_flight effect, used by the relics mutator
+// used in qcsrc/server/mutators/relics.qc: pointparticles(particleeffectnum(mdl), e.origin, '0 0 0', 1);
+effect relic_flight
+count 1
+type static
+color 0x8080ff 0x8080ff
+size 1.5 1.5
+alpha 128 256 256
+gravity -0.1
+airfriction 0.2
+liquidfriction 0.8
+originjitter 8 8 32
+velocityjitter 64 64 32
+
+// relic_radioactive effect, used by the relics mutator
+// used in qcsrc/server/mutators/relics.qc: pointparticles(particleeffectnum(mdl), e.origin, '0 0 0', 1);
+effect relic_radioactive
+count 20
+type static
+color 0x00ff00 0x00ff00
+size 1.5 1.5
+alpha 128 256 256
+gravity -0.1
+airfriction 0.2
+liquidfriction 0.8
+originjitter 8 8 32
+velocityjitter 64 64 32
+
+// relic_resurrection effect, used by the relics mutator
+// used in qcsrc/server/mutators/relics.qc: pointparticles(particleeffectnum(mdl), e.origin, '0 0 0', 1);
+effect relic_resurrection
+count 20
+type static
+color 0xff0080 0xff0080
+size 1.5 1.5
+alpha 128 256 256
+gravity -0.1
+airfriction 0.2
+liquidfriction 0.8
+originjitter 8 8 32
+velocityjitter 64 64 32
+
+// relic_vengeance effect, used by the relics mutator
+// used in qcsrc/server/mutators/relics.qc: pointparticles(particleeffectnum(mdl), e.origin, '0 0 0', 1);
+effect relic_vengeance
+count 20
+type static
+color 0xff8080 0xff8080
+size 1.5 1.5
+alpha 128 256 256
+gravity -0.1
+airfriction 0.2
+liquidfriction 0.8
+originjitter 8 8 32
+velocityjitter 64 64 32
index 4dbc1826fb02c36b4a08cac23414558fe9487b01..b28c359d13fb4e80a8d9c7853ff00de8b89f5e14 100644 (file)
@@ -277,6 +277,7 @@ set g_new_toys_autoreplace 2 "0: never replace, 1: always auto replace guns by a
 // =======
 set cl_buffs_autoreplace 1 "automatically drop current buff when picking up another"
 set g_buffs 0 "enable buffs (requires buff items or powerups)"
+set g_buffs_effects 1 "show particle effects from carried buffs"
 set g_buffs_waypoint_distance 1024 "maximum distance at which buff waypoint can be seen from item"
 set g_buffs_randomize 1 "randomize buff type when player drops buff"
 set g_buffs_random_lifetime 30 "re-spawn the buff again if it hasn't been touched after this time in seconds"
@@ -310,10 +311,12 @@ set g_buffs_disability_time 60 "disability buff carry time"
 set g_buffs_disability_slowtime 3 "time in seconds for target disability"
 set g_buffs_disability_speed 0.5 "player speed multiplier while disabled"
 set g_buffs_disability_rate 1.7 "player weapon rate multiplier while disabled"
+set g_buffs_disability_weaponspeed 0.6 "weapon speed multiplier while disabled"
 set g_buffs_speed 1 "speed buff: increased movement/attack/health regeneration speed, carrier takes slightly more damage"
 set g_buffs_speed_time 60 "speed buff carry time"
 set g_buffs_speed_speed 1.7 "player speed multiplier while holding speed buff"
 set g_buffs_speed_rate 0.8 "player weapon rate multiplier while holding speed buff"
+set g_buffs_speed_weaponspeed 1.6 "weapon speed multiplier while holding speed buff"
 set g_buffs_speed_damage_take 1.2 "damage taken multiplier while holding speed buff"
 set g_buffs_speed_regen 1.2 "regeneration speed multiplier while holding speed buff"
 set g_buffs_vampire 1 "vampire buff: attacks to players and monsters heal the carrier"
index 9e5f98a492033c49f1121aa6f72ce30e0793a8b5..30d0da9cfabacb3b4912418e5be60d28950bb789 100644 (file)
@@ -253,9 +253,9 @@ void W_Devastator_Think(void)
 
        // accelerate
        makevectors(self.angles.x * '-1 0 0' + self.angles.y * '0 1 0');
-       velspeed = WEP_CVAR(devastator, speed) * g_weaponspeedfactor - (self.velocity * v_forward);
+       velspeed = WEP_CVAR(devastator, speed) * W_WeaponSpeedFactor() - (self.velocity * v_forward);
        if(velspeed > 0)
-               self.velocity = self.velocity + v_forward * min(WEP_CVAR(devastator, speedaccel) * g_weaponspeedfactor * frametime, velspeed);
+               self.velocity = self.velocity + v_forward * min(WEP_CVAR(devastator, speedaccel) * W_WeaponSpeedFactor() * frametime, velspeed);
 
        // laser guided, or remote detonation
        if(self.realowner.weapon == WEP_DEVASTATOR)
index 75a76f97e274e3ba1b7d468ce9a055661f4d26a6..dc8a013080b0759a6255ba827a7973f1a8650919 100644 (file)
@@ -853,6 +853,7 @@ float autocvar_g_spawn_near_teammate_ignore_spawnpoint_delay;
 float autocvar_g_spawn_near_teammate_ignore_spawnpoint_delay_death;
 float autocvar_g_spawn_near_teammate_ignore_spawnpoint_check_health;
 float autocvar_g_spawn_near_teammate_ignore_spawnpoint_closetodeath;
+bool  autocvar_g_buffs_effects;
 float autocvar_g_buffs_waypoint_distance;
 float autocvar_g_buffs_randomize;
 float autocvar_g_buffs_random_lifetime;
@@ -874,8 +875,10 @@ float autocvar_g_buffs_bash_force_self;
 float autocvar_g_buffs_disability_slowtime;
 float autocvar_g_buffs_disability_speed;
 float autocvar_g_buffs_disability_rate;
+float autocvar_g_buffs_disability_weaponspeed;
 float autocvar_g_buffs_speed_speed;
 float autocvar_g_buffs_speed_rate;
+float autocvar_g_buffs_speed_weaponspeed;
 float autocvar_g_buffs_speed_damage_take;
 float autocvar_g_buffs_speed_regen;
 float autocvar_g_buffs_vampire_damage_steal;
index b529ed1c32f2899650b7dd498024f2b5b6bb0929..581c59ca2630ffa7318f7e8c659c8e12c891d448 100644 (file)
@@ -334,8 +334,8 @@ float bot_aim(float shotspeed, float shotspeedupward, float maxshottime, float a
        hf = self.dphitcontentsmask;
        self.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_CORPSE;
 
-       shotspeed *= g_weaponspeedfactor;
-       shotspeedupward *= g_weaponspeedfactor;
+       shotspeed *= W_WeaponSpeedFactor();
+       shotspeedupward *= W_WeaponSpeedFactor();
        if (!shotspeed)
        {
                dprint("bot_aim: WARNING: weapon ", WEP_NAME(self.weapon), " shotspeed is zero!\n");
index 7d36af08e30fb61f35b14a4953c66e3bc8fb0385..199cb62fb7bcca7a448db4b3eb64b179e9020a3e 100644 (file)
@@ -111,6 +111,11 @@ MUTATOR_HOOKABLE(WeaponRateFactor);
        // INPUT, OUTPUT:
                float weapon_rate;
 
+MUTATOR_HOOKABLE(WeaponSpeedFactor);
+       // allows changing weapon speed (projectiles mostly)
+       // INPUT, OUTPUT:
+               //float ret_float;
+
 MUTATOR_HOOKABLE(SetStartItems);
        // adjusts {warmup_}start_{items,weapons,ammo_{cells,plasma,rockets,nails,shells,fuel}}
 
index c706bcccdf205bc8b0ff7ef01b2835271392e8d7..93cf7148c407a17d68ad4fd181c40f3fe592e7da 100644 (file)
@@ -24,12 +24,37 @@ float buffs_BuffModel_Customize()
        return true;
 }
 
+void buffs_BuffModel_Spawn(entity player)
+{
+       player.buff_model = spawn();
+       setmodel(player.buff_model, BUFF_MODEL);
+       setsize(player.buff_model, '0 0 -40', '0 0 40');
+       setattachment(player.buff_model, player, "");
+       setorigin(player.buff_model, '0 0 1' * (player.buff_model.maxs.z * 1));
+       player.buff_model.owner = player;
+       player.buff_model.scale = 0.7;
+       player.buff_model.pflags = PFLAGS_FULLDYNAMIC;
+       player.buff_model.light_lev = 200;
+       player.buff_model.customizeentityforclient = buffs_BuffModel_Customize;
+}
+
 vector buff_GlowColor(entity buff)
 {
        //if(buff.team) { return Team_ColorRGB(buff.team); }
        return buff.color;
 }
 
+void buff_Effect(entity player, string eff)
+{
+       if(!autocvar_g_buffs_effects) { return; }
+
+       if(time >= self.buff_effect_delay)
+       {
+               pointparticles(particleeffectnum(eff), player.origin + ((player.mins + player.maxs) * 0.5), '0 0 0', 1);
+               self.buff_effect_delay = time + 0.05; // prevent spam
+       }
+}
+
 // buff item
 float buff_Waypoint_visible_for_player(entity plr)
 {
@@ -183,7 +208,7 @@ void buff_Think()
                self.glowmod = buff_GlowColor(self);
                self.skin = Buff_Skin(self.buffs);
 
-               setmodel(self, "models/relics/relic.md3");
+               setmodel(self, BUFF_MODEL);
 
                if(self.buff_waypoint)
                {
@@ -319,7 +344,7 @@ void buff_Init(entity ent)
        if(self.noalign)
                self.movetype = MOVETYPE_NONE; // reset by random location
 
-       setmodel(self, "models/relics/relic.md3");
+       setmodel(self, BUFF_MODEL);
        setsize(self, BUFF_MIN, BUFF_MAX);
 
        if(cvar("g_buffs_random_location") || (self.spawnflags & 1))
@@ -349,6 +374,20 @@ void buff_SpawnReplacement(entity ent, entity old)
        buff_Init(ent);
 }
 
+void buff_Vengeance_DelayedDamage()
+{
+       if(self.enemy)
+               Damage(self.enemy, self.owner, self.owner, self.dmg, DEATH_BUFF, self.enemy.origin, '0 0 0');
+
+       remove(self);
+       return;
+}
+
+float buff_Inferno_CalculateTime(float x, float offset_x, float offset_y, float intersect_x, float intersect_y, float base)
+{
+       return offset_y + (intersect_y - offset_y) * logn(((x - offset_x) * ((base - 1) / intersect_x)) + 1, base);
+}
+
 // mutator hooks
 MUTATOR_HOOKFUNCTION(buffs_PlayerDamage_SplitHealthArmor)
 {
@@ -364,20 +403,6 @@ MUTATOR_HOOKFUNCTION(buffs_PlayerDamage_SplitHealthArmor)
        return false;
 }
 
-void buff_Vengeance_DelayedDamage()
-{
-       if(self.enemy)
-               Damage(self.enemy, self.owner, self.owner, self.dmg, DEATH_BUFF, self.enemy.origin, '0 0 0');
-
-       remove(self);
-       return;
-}
-
-float buff_Inferno_CalculateTime(float x, float offset_x, float offset_y, float intersect_x, float intersect_y, float base)
-{
-       return offset_y + (intersect_y - offset_y) * logn(((x - offset_x) * ((base - 1) / intersect_x)) + 1, base);
-}
-
 MUTATOR_HOOKFUNCTION(buffs_PlayerDamage_Calculate)
 {
        if(frag_deathtype == DEATH_BUFF) { return false; }
@@ -391,8 +416,7 @@ MUTATOR_HOOKFUNCTION(buffs_PlayerDamage_Calculate)
        if(!ITEM_DAMAGE_NEEDKILL(frag_deathtype))
        if(frag_attacker)
        if(random() <= autocvar_g_buffs_medic_survive_chance)
-       if(frag_target.health - autocvar_g_buffs_medic_survive_health > 0) // not if the final result would be less than 0, medic must get health
-               frag_damage = frag_target.health - autocvar_g_buffs_medic_survive_health;
+               frag_damage = max(5, frag_target.health - autocvar_g_buffs_medic_survive_health);
 
        if(frag_target.buffs & BUFF_VENGEANCE)
        if(frag_attacker)
@@ -594,6 +618,18 @@ MUTATOR_HOOKFUNCTION(buffs_WeaponRate)
        return false;
 }
 
+MUTATOR_HOOKFUNCTION(buffs_WeaponSpeed)
+{
+       if(self.buffs & BUFF_SPEED)
+               ret_float *= autocvar_g_buffs_speed_weaponspeed;
+
+       if(time < self.buff_disability_time)
+               ret_float *= autocvar_g_buffs_disability_weaponspeed;
+
+       return false;
+}
+
+string autocvar_blah;
 MUTATOR_HOOKFUNCTION(buffs_PlayerThink)
 {
        if(gameover || self.deadflag != DEAD_NO) { return false; }
@@ -671,30 +707,20 @@ MUTATOR_HOOKFUNCTION(buffs_PlayerThink)
                        self.alpha = self.buff_invisible_prev_alpha;
 
                BUFF_ONADD(BUFF_FLIGHT)
-                       self.gravity = self.buff_flight_prev_gravity;
-
-               BUFF_ONREM(BUFF_FLIGHT)
                {
                        self.buff_flight_prev_gravity = self.gravity;
                        self.gravity = autocvar_g_buffs_flight_gravity;
                }
 
+               BUFF_ONREM(BUFF_FLIGHT)
+                       self.gravity = self.buff_flight_prev_gravity;
+
                self.oldbuffs = self.buffs;
                if(self.buffs)
                {
                        if(!self.buff_model)
-                       {
-                               self.buff_model = spawn();
-                               setmodel(self.buff_model, "models/relics/relic.md3");
-                               setsize(self.buff_model, '0 0 -40', '0 0 40');
-                               setattachment(self.buff_model, self, "");
-                               setorigin(self.buff_model, '0 0 1' * (self.buff_model.maxs.z * 1));
-                               self.buff_model.owner = self;
-                               self.buff_model.scale = 0.7;
-                               self.buff_model.pflags = PFLAGS_FULLDYNAMIC;
-                               self.buff_model.light_lev = 200;
-                               self.buff_model.customizeentityforclient = buffs_BuffModel_Customize;
-                       }
+                               buffs_BuffModel_Spawn(self);
+
                        self.buff_model.color = Buff_Color(self.buffs);
                        self.buff_model.glowmod = buff_GlowColor(self.buff_model);
                        self.buff_model.skin = Buff_Skin(self.buffs);
@@ -795,7 +821,7 @@ void buffs_DelayedInit()
 
 void buffs_Initialize()
 {
-       precache_model("models/relics/relic.md3");
+       precache_model(BUFF_MODEL);
        precache_sound("misc/strength_respawn.wav");
        precache_sound("misc/shield_respawn.wav");
        precache_sound("relics/relic_effect.wav");
@@ -828,6 +854,7 @@ MUTATOR_DEFINITION(mutator_buffs)
        MUTATOR_HOOK(OnEntityPreSpawn, buffs_OnEntityPreSpawn, CBC_ORDER_ANY);
        MUTATOR_HOOK(CustomizeWaypoint, buffs_CustomizeWaypoint, CBC_ORDER_ANY);
        MUTATOR_HOOK(WeaponRateFactor, buffs_WeaponRate, CBC_ORDER_ANY);
+       MUTATOR_HOOK(WeaponSpeedFactor, buffs_WeaponSpeed, CBC_ORDER_ANY);
        MUTATOR_HOOK(PlayerPreThink, buffs_PlayerThink, CBC_ORDER_ANY);
        MUTATOR_HOOK(GetCvars, buffs_GetCvars, CBC_ORDER_ANY);
        MUTATOR_HOOK(BuildMutatorsString, buffs_BuildMutatorsString, CBC_ORDER_ANY);
index 8833813ae705149deae87d9e2aa736c33cc92f44..7c1734fc5581130b9cbb0c3f855ef33278408723 100644 (file)
@@ -14,6 +14,8 @@
 // disability
 .float buff_disability_time;
 .float buff_disability_effect_time;
+// common buff variables
+.float buff_effect_delay;
 
 // buff definitions
 .float buff_active;
@@ -23,6 +25,8 @@
 .int oldbuffs; // for updating effects
 .entity buff_model; // controls effects (TODO: make csqc)
 
+const string BUFF_MODEL = "models/relics/relic.md3";
+
 const vector BUFF_MIN = ('-16 -16 -20');
 const vector BUFF_MAX = ('16 16 20');
 
index c3532d3d67a4cf29bde6541827acb005189ca8f0..1f0c363b1aec364723c8f535800b5fbf03d07d6f 100644 (file)
@@ -145,7 +145,7 @@ vector W_CalculateProjectileVelocity(vector pvelocity, vector mvelocity, float f
        float mspeed;
        vector outvelocity;
 
-       mvelocity = mvelocity * g_weaponspeedfactor;
+       mvelocity = mvelocity * W_WeaponSpeedFactor();
 
        mdirection = normalize(mvelocity);
        mspeed = vlen(mvelocity);
index ab85389c5c9dc675e84f4917e21a6c08cf47eb03..72ec7f53926dfd2d7c92cc1bf661af64185fc5c0 100644 (file)
@@ -42,6 +42,18 @@ float W_WeaponRateFactor()
        return t;
 }
 
+float W_WeaponSpeedFactor()
+{
+       float t;
+       t = 1.0 * g_weaponspeedfactor;
+
+       ret_float = t;
+       MUTATOR_CALLHOOK(WeaponSpeedFactor);
+       t = ret_float;
+
+       return t;
+}
+
 
 void(float fr, float t, void() func) weapon_thinkf;
 
index bb0cea798d96a0afbb4932ac731f95b50e267711..7ec33a06358e8dd216c66d67483c166fd0a940f5 100644 (file)
@@ -32,6 +32,8 @@ void W_WeaponFrame();
 
 float W_WeaponRateFactor();
 
+float W_WeaponSpeedFactor();
+
 float weapon_prepareattack(float secondary, float attacktime);
 
 float weapon_prepareattack_check(float secondary, float attacktime);