/* fullname */ _("Dual Plasma Cannon")
);
#else
+
+#include "../../weapons/all.qh"
+
+CLASS(PlasmaDualAttack, PortoLaunch)
+/* flags */ ATTRIB(PlasmaDualAttack, spawnflags, int, WEP_TYPE_OTHER);
+/* impulse */ ATTRIB(PlasmaDualAttack, impulse, int, 5);
+/* refname */ ATTRIB(PlasmaDualAttack, netname, string, "plasmadual");
+/* wepname */ ATTRIB(PlasmaDualAttack, message, string, _("Dual plasma"));
+ENDCLASS(PlasmaDualAttack)
+REGISTER_WEAPON(PLASMA_DUAL, NEW(PlasmaDualAttack));
+
#ifdef SVQC
- void spawnfunc_turret_plasma_dual() { SELFPARAM(); if(!turret_initialize(TUR_PLASMA_DUAL)) remove(self); }
+
+float t_plasma_dual(float req);
+METHOD(PlasmaDualAttack, wr_think, bool(entity thiswep)) {
+ SELFPARAM();
+ if (self.BUTTON_ATCK)
+ if (weapon_prepareattack(0, WEP_CVAR_PRI(electro, refire))) {
+ W_SetupShot_Dir(self, v_forward, false, 0, W_Sound("electro_fire"), CH_WEAPON_B, 0);
+ self.tur_shotdir_updated = w_shotdir;
+ self.tur_shotorg = w_shotorg;
+ self.tur_head = self;
+ self.shot_speed = max(1, ((!self.shot_speed) ? 2500 : self.shot_speed));
+ self.shot_spread = bound(0.0001, ((!self.shot_spread) ? 0.0125 : self.shot_spread), 500);
+ t_plasma_dual(TR_ATTACK);
+ weapon_thinkf(WFRAME_FIRE1, WEP_CVAR_PRI(electro, animtime), w_ready);
+ }
+ return true;
+}
+
+ void spawnfunc_turret_plasma_dual() { SELFPARAM(); if(!turret_initialize(TUR_PLASMA_DUAL.m_id)) remove(self); }
float t_plasma_dual(float req)
{SELFPARAM();
wi = get_weaponinfo(j);
if(wi.weapon)
{
- POSTGIVE_WEAPON(e, j, W_Sound("weaponpickup"), string_null);
+ POSTGIVE_WEAPON(e, j, SND(WEAPONPICKUP), string_null);
if (!(save_weapons & WepSet_FromWeapon(j)))
if(e.weapons & WepSet_FromWeapon(j))
- WEP_ACTION(wi.weapon, WR_INIT);
+ _WEP_ACTION(wi.weapon, WR_INIT);
}
}
- POSTGIVE_VALUE(e, strength_finished, 1, "misc/powerup.wav", "misc/poweroff.wav");
- POSTGIVE_VALUE(e, invincible_finished, 1, "misc/powerup_shield.wav", "misc/poweroff.wav");
- POSTGIVE_VALUE(e, ammo_nails, 0, "misc/itempickup.wav", string_null);
- POSTGIVE_VALUE(e, ammo_cells, 0, "misc/itempickup.wav", string_null);
- POSTGIVE_VALUE(e, ammo_plasma, 0, "misc/itempickup.wav", string_null);
- POSTGIVE_VALUE(e, ammo_shells, 0, "misc/itempickup.wav", string_null);
- POSTGIVE_VALUE(e, ammo_rockets, 0, "misc/itempickup.wav", string_null);
- POSTGIVE_VALUE_ROT(e, ammo_fuel, 1, pauserotfuel_finished, autocvar_g_balance_pause_fuel_rot, pauseregen_finished, autocvar_g_balance_pause_fuel_regen, "misc/itempickup.wav", string_null);
- POSTGIVE_VALUE_ROT(e, armorvalue, 1, pauserotarmor_finished, autocvar_g_balance_pause_armor_rot, pauseregen_finished, autocvar_g_balance_pause_health_regen, "misc/armor25.wav", string_null);
- POSTGIVE_VALUE_ROT(e, health, 1, pauserothealth_finished, autocvar_g_balance_pause_health_rot, pauseregen_finished, autocvar_g_balance_pause_health_regen, "misc/megahealth.wav", string_null);
+ POSTGIVE_VALUE(e, strength_finished, 1, SND(POWERUP), SND(POWEROFF));
+ POSTGIVE_VALUE(e, invincible_finished, 1, "misc/powerup_shield.wav", SND(POWEROFF));
+ POSTGIVE_VALUE(e, ammo_nails, 0, SND(ITEMPICKUP), string_null);
+ POSTGIVE_VALUE(e, ammo_cells, 0, SND(ITEMPICKUP), string_null);
+ POSTGIVE_VALUE(e, ammo_plasma, 0, SND(ITEMPICKUP), string_null);
+ POSTGIVE_VALUE(e, ammo_shells, 0, SND(ITEMPICKUP), string_null);
+ POSTGIVE_VALUE(e, ammo_rockets, 0, SND(ITEMPICKUP), string_null);
+ POSTGIVE_VALUE_ROT(e, ammo_fuel, 1, pauserotfuel_finished, autocvar_g_balance_pause_fuel_rot, pauseregen_finished, autocvar_g_balance_pause_fuel_regen, SND(ITEMPICKUP), string_null);
+ POSTGIVE_VALUE_ROT(e, armorvalue, 1, pauserotarmor_finished, autocvar_g_balance_pause_armor_rot, pauseregen_finished, autocvar_g_balance_pause_health_regen, SND(ARMOR25), string_null);
+ POSTGIVE_VALUE_ROT(e, health, 1, pauserothealth_finished, autocvar_g_balance_pause_health_rot, pauseregen_finished, autocvar_g_balance_pause_health_regen, SND(MEGAHEALTH), string_null);
if(e.superweapons_finished <= 0)
if(self.weapons & WEPSET_SUPERWEAPONS)