X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Ftturrets%2Funits%2Funit_walker.qc;h=56cffd9a40065af6831e5a4bb1306ad644f0f4da;hb=27513c29a36495d6b9276f03f560b6f2f409675a;hp=599eb5776968117caabdc4eed6b1b1b9610a23a0;hpb=174b4f831768c0d516b25aee11904337f3e27b90;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/tturrets/units/unit_walker.qc b/qcsrc/server/tturrets/units/unit_walker.qc index 599eb5776..56cffd9a4 100644 --- a/qcsrc/server/tturrets/units/unit_walker.qc +++ b/qcsrc/server/tturrets/units/unit_walker.qc @@ -107,7 +107,7 @@ void walker_rocket_think() m_speed = vlen(self.velocity); // Enemy dead? just keep on the current heading then. - if (self.enemy == world || self.enemy.deadflag != DEAD_NO) + if (self.enemy == world || self.enemy.deadflag != DEAD_NO || (g_td && !(self.enemy.flags & FL_MONSTER || self.enemy.classname == "td_generator")) || self.enemy.classname == "td_generator") self.enemy = world; if (self.enemy) @@ -414,7 +414,7 @@ void walker_postthink() //if(self.animflag != ANIM_NO) { vector real_angle; - float turny, turnx; + float turny = 0, turnx = 0; float vz; real_angle = vectoangles(self.steerto) - self.angles; @@ -515,7 +515,7 @@ void walker_postthink() void walker_attack() { sound (self, CH_WEAPON_A, "weapons/uzi_fire.wav", VOL_BASE, ATTN_NORM); - fireBallisticBullet (self.tur_shotorg, self.tur_shotdir_updated, self.shot_spread, self.shot_speed, 5, self.shot_dmg, 0, self.shot_force, DEATH_TURRET_WALKER_GUN, 0, 1, autocvar_g_balance_uzi_bulletconstant); + fireBallisticBullet (self.tur_shotorg, self.tur_shotdir_updated, self.shot_spread, self.shot_speed, 5, self.shot_dmg, self.shot_force, DEATH_TURRET_WALKER_GUN, 0, 1, autocvar_g_balance_uzi_bulletconstant); endFireBallisticBullet(); pointparticles(particleeffectnum("laser_muzzleflash"), self.tur_shotorg, self.tur_shotdir_updated * 1000, 1); }