From 000e242e8ac1d9670120be33ed96e0b5a973ef9d Mon Sep 17 00:00:00 2001 From: TimePath Date: Wed, 30 Sep 2015 09:26:54 +1000 Subject: [PATCH] Turrets: fix damage --- qcsrc/common/turrets/turret/plasma_dual.qc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qcsrc/common/turrets/turret/plasma_dual.qc b/qcsrc/common/turrets/turret/plasma_dual.qc index 49f0b24b2..62f0c7138 100644 --- a/qcsrc/common/turrets/turret/plasma_dual.qc +++ b/qcsrc/common/turrets/turret/plasma_dual.qc @@ -38,8 +38,12 @@ METHOD(PlasmaDualAttack, wr_think, bool(entity thiswep, bool fire1, bool fire2)) self.tur_shotdir_updated = w_shotdir; self.tur_shotorg = w_shotorg; self.tur_head = self; + self.shot_refire = bound(0.01, ((!self.shot_refire) ? 1 : self.shot_refire), 9999); + self.shot_dmg = max(1, ((!self.shot_dmg) ? self.shot_refire * 50 : self.shot_dmg)); + self.shot_radius = max(1, ((!self.shot_radius) ? self.shot_dmg * 0.5 : self.shot_radius)); 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); + self.shot_force = bound(0.001, ((!self.shot_force) ? self.shot_dmg * 0.5 + self.shot_radius * 0.5 : self.shot_force), 5000); TUR_ACTION(TUR_PLASMA_DUAL.m_id, TR_ATTACK); weapon_thinkf(WFRAME_FIRE1, WEP_CVAR_PRI(electro, animtime), w_ready); } -- 2.39.2