setsize (missile, '0 0 0', '0 0 0');
setorigin(missile, self.origin + '0 0 10' + v_forward * 14);
missile.scale = self.scale;
+ missile.flags = FL_PROJECTILE;
missile.velocity = dir * 400;
missile.avelocity = '300 300 300';
missile.nextthink = time + 5;
missile.movetype = MOVETYPE_FLYMISSILE;
setsize (missile, fmins, fmaxs);
setorigin(missile, self.origin + '0 0 10' + v_forward * 14);
+ missile.flags = FL_PROJECTILE;
missile.velocity = dir * 400;
missile.avelocity = '300 300 300';
missile.nextthink = time + 5;
return TRUE;
}
-void() ShalHome;
-void ShalMissile_Spawn ()
-{
- local vector dir = '0 0 0';
- local float dist = 0;
-
- self.realowner.effects |= EF_MUZZLEFLASH;
-
- dir = normalize((self.owner.enemy.origin + '0 0 10') - self.owner.origin);
- dist = vlen (self.owner.enemy.origin - self.owner.origin);
-
- self.solid = SOLID_BBOX;
- self.movetype = MOVETYPE_FLYMISSILE;
- CSQCProjectile(self, TRUE, PROJECTILE_CRYLINK, TRUE);
-
- self.realowner.v_angle = self.realowner.angles;
- makevectors (self.realowner.angles);
-
- setsize (self, '0 0 0', '0 0 0');
-
- setorigin (self, self.realowner.origin + v_forward * 14 + '0 0 30' + v_right * -14);
- self.velocity = dir * 400;
- self.avelocity = '300 300 300';
- self.enemy = self.realowner.enemy;
- self.touch = W_Plasma_TouchExplode;
- ShalHome();
-}
-
-void ShalMissile ()
-{
- local entity missile = world;
-
- sound (self, CHAN_WEAPON, "weapons/spike.wav", 1, ATTN_NORM);
-
- missile = spawn ();
- missile.owner = missile.realowner = self;
-
- missile.think = ShalMissile_Spawn;
- missile.nextthink = time;
-}
-
.float shal_cycles;
void ShalHome ()
{
}
dir = normalize(vtemp - self.origin);
UpdateCSQCProjectile(self);
- if (autocvar_skill == 3)
+ if (monster_skill == 3)
self.velocity = dir * 350;
else
self.velocity = dir * 250;
self.think = ShalHome;
}
+void ShalMissile ()
+{
+ local entity missile = world;
+ local vector dir = '0 0 0';
+ local float dist = 0;
+
+ self.effects |= EF_MUZZLEFLASH;
+
+ sound (self, CHAN_WEAPON, "weapons/spike.wav", 1, ATTN_NORM);
+
+ missile = spawn ();
+ missile.owner = missile.realowner = self;
+
+ self.v_angle = self.angles;
+ makevectors (self.angles);
+
+ dir = normalize((self.enemy.origin + '0 0 10') - self.origin);
+ dist = vlen (self.enemy.origin - self.origin);
+
+ missile.think = ShalHome;
+ missile.nextthink = time;
+ missile.solid = SOLID_BBOX;
+ missile.movetype = MOVETYPE_FLYMISSILE;
+ missile.flags = FL_PROJECTILE;
+ setorigin (missile, self.origin + v_forward * 14 + '0 0 30' + v_right * -14);
+ setsize (missile, '0 0 0', '0 0 0');
+ missile.velocity = dir * 400;
+ missile.avelocity = '300 300 300';
+ missile.enemy = self.enemy;
+ missile.touch = W_Plasma_TouchExplode;
+
+ CSQCProjectile(missile, TRUE, PROJECTILE_CRYLINK, TRUE);
+}
+
float ShalrathCheckAttack ()
{
local vector spot1 = '0 0 0', spot2 = '0 0 0';
MUTATOR_HOOKFUNCTION(td_TurretValidateTarget)
{
+ if(turret_flags & TFL_TARGETSELECT_MISSILESONLY)
+ if(turret_target.flags & FL_PROJECTILE)
+ if(turret_target.owner.flags & FL_MONSTER)
+ return TRUE; // flac support
+
if(turret.turrcaps_flags & TFL_TURRCAPS_SUPPORT && turret_target.turrcaps_flags & TFL_TURRCAPS_ISTURRET)
return TRUE;
if not(turret_target.flags & FL_MONSTER)
sprint(self, "Spawned 1 MLRS turret", "\n");
return TRUE;
}
+ case "flac":
+ {
+ if(self.ammo_fuel < autocvar_g_td_turret_flac_cost) break;
+ self.ammo_fuel -= autocvar_g_td_turret_flac_cost;
+ spawnturret(self, self, "flac", trace_endpos);
+ sprint(self, "Spawned 1 FLAC Cannon", "\n");
+ return TRUE;
+ }
case "walker":
{
if(self.ammo_fuel < autocvar_g_td_turret_walker_cost) break;