turret_tid2info(_tid);
if(turret_is_precache[_tid])
{
- dprint("turret_precache: ", tid2info_name, "allready precache, skipping.\n");
+ dprint("turret_precache: ", tid2info_name, " allready precachd, skipping.\n");
return;
}
else
self.tur_head.angles += dt * self.tur_head.move_avelocity;
if (self.health < 127)
- if(random() < 0.25)
- te_spark(self.origin + '0 0 40', randomvec() * 256 + '0 0 256', 16);
+ {
+ dt = random();
+
+ if(dt < 0.25)
+ te_spark(self.origin + '0 0 40', randomvec() * 256 + '0 0 256', 16);
+
+ }
+
+ if(self.health < 85)
+ if(dt < 0.1)
+ pointparticles(particleeffectnum("smoke_small"), (self.origin + (randomvec() * 80)), '0 0 0', 1);
+
+ if(self.health < 32)
+ if(dt < 0.1)
+ pointparticles(particleeffectnum("smoke_large"), (self.origin + (randomvec() * 80)), '0 0 0', 1);
+
}
-
void turret_walker_draw()
{
float dt;
break;
case TID_WALKER:
self.draw = turret_walker_draw;
- }
-
+ }
}
}
{
float i;
- sound (self, CHAN_PROJECTILE, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
+ sound (self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
pointparticles(particleeffectnum("rocket_explode"), self.origin, '0 0 0', 1);
for (i = 1; i < 5; i = i + 1)
setmodel(self, "");
setmodel(self.tur_head, "");
- sound (self, CHAN_PROJECTILE, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
+ sound (self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
pointparticles(particleeffectnum("rocket_explode"), self.origin, '0 0 0', 1);
turret_tid2info(self.turret_type);
dprint("Turret ", tid2info_name, " dies.\n");
self.team = _team;
turret_changeteam();
}
+
+ if(self.health == 0)
+ turret_die();
}
- if(self.health == 0)
- turret_die();
}