X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fturrets%2Fturret%2Fphaser_weapon.qc;h=3fb34fb14c2b9b1d97f7c0a6ad3008ba3e6011af;hb=2183056a5b6e75d2e025aa6c718eeb6f87de31b6;hp=ea48a6479024734fd4a425f044c37548d40118e9;hpb=df2fe9b28cb6210b671bec6d5ae834ff4eb2e2db;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/turrets/turret/phaser_weapon.qc b/qcsrc/common/turrets/turret/phaser_weapon.qc index ea48a6479..3fb34fb14 100644 --- a/qcsrc/common/turrets/turret/phaser_weapon.qc +++ b/qcsrc/common/turrets/turret/phaser_weapon.qc @@ -1,7 +1,5 @@ #include "phaser_weapon.qh" -#ifdef IMPLEMENTATION - #ifdef SVQC void beam_think(entity this); @@ -14,7 +12,7 @@ METHOD(PhaserTurretAttack, wr_think, void(entity thiswep, entity actor, .entity 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_PhaserTurretAttack_FIRE, CH_WEAPON_B, 0); + W_SetupShot_Dir(actor, weaponentity, v_forward, false, 0, SND_PhaserTurretAttack_FIRE, CH_WEAPON_B, 0); actor.tur_shotdir_updated = w_shotdir; actor.tur_shotorg = w_shotorg; actor.tur_head = actor; @@ -33,9 +31,10 @@ METHOD(PhaserTurretAttack, wr_think, void(entity thiswep, entity actor, .entity beam.owner = actor; beam.shot_dmg = actor.shot_dmg / (actor.shot_speed / beam.ticrate); beam.scale = actor.target_range / 256; - beam.movetype = MOVETYPE_NONE; + set_movetype(beam, MOVETYPE_NONE); beam.enemy = actor.enemy; beam.bot_dodge = true; + IL_PUSH(g_bot_dodge, beam); beam.bot_dodgerating = beam.shot_dmg; sound (beam, CH_SHOTS_SINGLE, SND_TUR_PHASER, VOL_BASE, ATTEN_NORM); actor.fireflag = 1; @@ -60,7 +59,7 @@ void beam_think(entity this) this.owner.fireflag = 2; this.owner.tur_head.frame = 10; sound (this, CH_SHOTS_SINGLE, SND_Null, VOL_BASE, ATTEN_NORM); - remove(this); + delete(this); return; } @@ -89,5 +88,3 @@ void beam_think(entity this) } #endif - -#endif