]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/w_electro.qc
Merge branch 'master' into Melanosuchus/minigames
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / w_electro.qc
index 8e567efaf7b76a915099325e751e72149a20c7c4..e3b809296be709e884c8d993aff7a1730e897668 100644 (file)
@@ -9,7 +9,7 @@ REGISTER_WEAPON(
 /* color     */ '0 0.5 1',
 /* modelname */ "electro",
 /* simplemdl */ "foobar",
-/* crosshair */ "gfx/crosshairelectro 0.5",
+/* crosshair */ "gfx/crosshairelectro 0.6",
 /* wepimg    */ "weaponelectro",
 /* refname   */ "electro",
 /* wepname   */ _("Electro")
@@ -90,15 +90,15 @@ void W_Electro_TriggerCombo(vector org, float rad, entity own)
                                        }
                                }
                        }
-                       
+
                        // change owner to whoever caused the combo explosion
                        e.realowner = own;
                        e.takedamage = DAMAGE_NO;
                        e.classname = "electro_orb_chain";
-                       
+
                        // now set the next one to trigger as well
                        e.think = W_Electro_ExplodeCombo;
-                       
+
                        // delay combo chains, looks cooler
                        e.nextthink =
                                (
@@ -120,7 +120,7 @@ void W_Electro_ExplodeCombo(void)
        W_Electro_TriggerCombo(self.origin, WEP_CVAR(electro, combo_comboradius), self.realowner);
 
        self.event_damage = func_null;
-       
+
        RadiusDamage(
                self,
                self.realowner,
@@ -148,7 +148,7 @@ void W_Electro_Explode(void)
 
        self.event_damage = func_null;
        self.takedamage = DAMAGE_NO;
-       
+
        if(self.movetype == MOVETYPE_BOUNCE)
        {
                RadiusDamage(
@@ -215,7 +215,7 @@ void W_Electro_Bolt_Think(void)
 
                                // now set the next one to trigger as well
                                e.think = W_Electro_ExplodeCombo;
-                               
+
                                // delay combo chains, looks cooler
                                e.nextthink =
                                        (
@@ -300,7 +300,7 @@ void W_Electro_Orb_Touch(void)
        }
 }
 
-void W_Electro_Orb_Damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+void W_Electro_Orb_Damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {
        if(self.health <= 0)
                return;
@@ -414,12 +414,12 @@ void W_Electro_CheckAttack(void)
                weapon_thinkf(WFRAME_FIRE2, WEP_CVAR_SEC(electro, animtime), W_Electro_CheckAttack);
                return;
        }
-       // WEAPONTODO: when the player releases the button, cut down the length of refire2? 
+       // WEAPONTODO: when the player releases the button, cut down the length of refire2?
        w_ready();
 }
 
 .float bot_secondary_electromooth;
-float W_Electro(float req)
+bool W_Electro(int req)
 {
        float ammo_amount;
        switch(req)
@@ -451,7 +451,7 @@ float W_Electro(float req)
                                        if(random() < 0.03) self.bot_secondary_electromooth = 0;
                                }
                        }
-                       
+
                        return true;
                }
                case WR_THINK:
@@ -469,10 +469,10 @@ float W_Electro(float req)
                                        WEP_ACTION(self.weapon, WR_RELOAD);
                                        return false;
                                }
-                               
+
                                return true;
                        }
-                       
+
                        if(self.BUTTON_ATCK)
                        {
                                if(weapon_prepareattack(0, WEP_CVAR_PRI(electro, refire)))
@@ -569,7 +569,7 @@ float W_Electro(float req)
 }
 #endif
 #ifdef CSQC
-float W_Electro(float req)
+bool W_Electro(int req)
 {
        switch(req)
        {
@@ -599,7 +599,7 @@ float W_Electro(float req)
                                                sound(self, CH_SHOTS, "weapons/electro_impact.wav", VOL_BASE, ATTEN_NORM);
                                }
                        }
-                       
+
                        return true;
                }
                case WR_INIT: