X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;ds=sidebyside;f=qcsrc%2Fcommon%2Fturrets%2Fturret%2Fplasma_weapon.qc;h=de53de98407a8c75fad8dcdc699d6cf9c5e0ba11;hb=HEAD;hp=65e182be387b25781eef23f05f1a166f70ab67d2;hpb=cb0667e2b81410e86b1b5dfbd0a283c83d207017;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/turrets/turret/plasma_weapon.qc b/qcsrc/common/turrets/turret/plasma_weapon.qc index 65e182be3..de53de984 100644 --- a/qcsrc/common/turrets/turret/plasma_weapon.qc +++ b/qcsrc/common/turrets/turret/plasma_weapon.qc @@ -1,17 +1,4 @@ -#ifndef TURRET_PLASMA_WEAPON_H -#define TURRET_PLASMA_WEAPON_H - -CLASS(PlasmaAttack, PortoLaunch) -/* flags */ ATTRIB(PlasmaAttack, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED); -/* impulse */ ATTRIB(PlasmaAttack, impulse, int, 5); -/* refname */ ATTRIB(PlasmaAttack, netname, string, "turret_plasma"); -/* wepname */ ATTRIB(PlasmaAttack, m_name, string, _("Plasma")); -ENDCLASS(PlasmaAttack) -REGISTER_WEAPON(PLASMA, NEW(PlasmaAttack)); - -#endif - -#ifdef IMPLEMENTATION +#include "plasma_weapon.qh" #ifdef SVQC SOUND(PlasmaAttack_FIRE, W_Sound("electro_fire")); @@ -21,18 +8,16 @@ METHOD(PlasmaAttack, wr_think, void(entity thiswep, entity actor, .entity weapon if (!isPlayer || weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR_PRI(electro, refire))) { if (isPlayer) { turret_initparams(actor); - W_SetupShot_Dir(actor, v_forward, false, 0, SND(PlasmaAttack_FIRE), CH_WEAPON_B, 0); + W_SetupShot_Dir(actor, weaponentity, v_forward, false, 0, SND_PlasmaAttack_FIRE, CH_WEAPON_B, 0, DEATH_TURRET_PLASMA.m_id); actor.tur_shotdir_updated = w_shotdir; actor.tur_shotorg = w_shotorg; actor.tur_head = actor; weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_PRI(electro, animtime), w_ready); } - entity missile = turret_projectile(SND(HAGAR_FIRE), 1, 0, DEATH_TURRET_PLASMA.m_id, PROJECTILE_ELECTRO_BEAM, true, true); + entity missile = turret_projectile(actor, SND_HAGAR_FIRE, 1, 0, DEATH_TURRET_PLASMA.m_id, PROJECTILE_ELECTRO_BEAM, true, true); missile.missile_flags = MIF_SPLASH; Send_Effect(EFFECT_BLASTER_MUZZLEFLASH, actor.tur_shotorg, actor.tur_shotdir_updated * 1000, 1); } } #endif - -#endif