]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/w_blaster.qc
Clean up SetupProjectileVelocity a little bit
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / w_blaster.qc
index cd8ba5d207772ed3ab4c978beb692174a48b8ab6..30a2e437d86910872b8aa1d887c1c08a5bd1bc12 100644 (file)
@@ -2,31 +2,30 @@
 REGISTER_WEAPON(
 /* WEP_##id */ BLASTER,
 /* function */ W_Blaster,
-/* ammotype */ 0,
+/* ammotype */ ammo_none,
 /* impulse  */ 1,
-/* flags    */ WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH,
+/* flags    */ WEP_FLAG_NORMAL | WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH,
 /* rating   */ 0,
+/* color       */ '1 0.5 0.5',
 /* model    */ "laser",
 /* netname  */ "laser",
 /* fullname */ _("Blaster")
 );
 
-#define BLASTER_SETTINGS(w_cvar,w_prop) BLASTER_SETTINGS_LIST(w_cvar, w_prop, WEP_BLASTER, blaster)
+#define BLASTER_SETTINGS(w_cvar,w_prop) BLASTER_SETTINGS_LIST(w_cvar, w_prop, BLASTER, blaster)
 #define BLASTER_SETTINGS_LIST(w_cvar,w_prop,id,sn) \
-       w_cvar(id, sn, MO_BOTH, animtime) \
-       w_cvar(id, sn, MO_BOTH, damage) \
-       w_cvar(id, sn, MO_BOTH, delay) \
-       w_cvar(id, sn, MO_BOTH, edgedamage) \
-       w_cvar(id, sn, MO_BOTH, force) \
-       w_cvar(id, sn, MO_BOTH, lifetime) \
-       w_cvar(id, sn, MO_BOTH, radius) \
-       w_cvar(id, sn, MO_BOTH, refire) \
-       w_cvar(id, sn, MO_BOTH, shotangle) \
-       w_cvar(id, sn, MO_BOTH, speed) \
-       w_cvar(id, sn, MO_BOTH, spread) \
-       w_cvar(id, sn, MO_NONE, secondary) \
-       w_prop(id, sn, float,  reloading_ammo, reload_ammo) \
-       w_prop(id, sn, float,  reloading_time, reload_time) \
+       w_cvar(id, sn, BOTH, animtime) \
+       w_cvar(id, sn, BOTH, damage) \
+       w_cvar(id, sn, BOTH, delay) \
+       w_cvar(id, sn, BOTH, edgedamage) \
+       w_cvar(id, sn, BOTH, force) \
+       w_cvar(id, sn, BOTH, lifetime) \
+       w_cvar(id, sn, BOTH, radius) \
+       w_cvar(id, sn, BOTH, refire) \
+       w_cvar(id, sn, BOTH, shotangle) \
+       w_cvar(id, sn, BOTH, speed) \
+       w_cvar(id, sn, BOTH, spread) \
+       w_cvar(id, sn, NONE, secondary) \
        w_prop(id, sn, float,  switchdelay_raise, switchdelay_raise) \
        w_prop(id, sn, float,  switchdelay_drop, switchdelay_drop) \
        w_prop(id, sn, string, weaponreplace, weaponreplace) \
@@ -163,15 +162,10 @@ float W_Blaster(float request)
                
                case WR_THINK:
                {
-                       if(WEP_CVAR(blaster, reload_ammo) && self.clip_load < 1) // forced reload
-                       {
-                               WEP_ACTION(self.weapon, WR_RELOAD);
-                       }
-                       else if(self.BUTTON_ATCK)
+                       if(self.BUTTON_ATCK)
                        {
                                if(weapon_prepareattack(0, WEP_CVAR_PRI(blaster, refire)))
                                {
-                                       W_DecreaseAmmo(ammo_none, 1, TRUE); // WEAPONTODO is this necessary?
                                        W_Blaster_Attack(
                                                WEP_CVAR_PRI(blaster, shotangle),
                                                WEP_CVAR_PRI(blaster, damage),
@@ -201,7 +195,6 @@ float W_Blaster(float request)
                                        {
                                                if(weapon_prepareattack(1, WEP_CVAR_SEC(blaster, refire)))
                                                {
-                                                       W_DecreaseAmmo(ammo_none, 1, TRUE);
                                                        W_Blaster_Attack(
                                                                WEP_CVAR_SEC(blaster, shotangle),
                                                                WEP_CVAR_SEC(blaster, damage),
@@ -251,12 +244,6 @@ float W_Blaster(float request)
                        return TRUE;
                }
                
-               case WR_RELOAD:
-               {
-                       W_Reload(0, "weapons/reload.wav");
-                       return TRUE;
-               }
-               
                case WR_SUICIDEMESSAGE:
                {
                        return WEAPON_LASER_SUICIDE;