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) \
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),
{
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),
return TRUE;
}
- case WR_RELOAD:
- {
- W_Reload(0, "weapons/reload.wav");
- return TRUE;
- }
-
case WR_SUICIDEMESSAGE:
{
return WEAPON_LASER_SUICIDE;