4 /* function */ t_plasma,
5 /* spawnflags */ TUR_FLAG_SPLASH | TUR_FLAG_MEDPROJ | TUR_FLAG_PLAYER,
6 /* mins,maxs */ '-32 -32 0', '32 32 64',
7 /* model */ "base.md3",
8 /* head_model */ "plasma.md3",
9 /* netname */ "plasma",
10 /* fullname */ _("Plasma Cannon")
13 #define PLASMA_SETTINGS(turret)
17 PLASMA_SETTINGS(plasma)
22 void spawnfunc_turret_plasma() { if not(turret_initialize(TUR_PLASMA)) remove(self); }
24 float t_plasma(float req)
33 flying = IsFlying(self); // do this BEFORE to make the trace values from FireRailgunBullet last
35 FireRailgunBullet (self.tur_shotorg, self.tur_shotorg + self.tur_shotdir_updated * MAX_SHOT_DISTANCE, 10000000000,
36 800, 0, 0, 0, 0, DEATH_TURRET_PLASMA);
39 pointparticles(particleeffectnum("nex_muzzleflash"), self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
41 // teamcolor / hit beam effect
43 v = WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos);
48 case NUM_TEAM_1: // Red
49 WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3RED"), self.tur_shotorg, v);
51 case NUM_TEAM_2: // Blue
52 WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3BLUE"), self.tur_shotorg, v);
54 case NUM_TEAM_3: // Yellow
55 WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3YELLOW"), self.tur_shotorg, v);
57 case NUM_TEAM_4: // Pink
58 WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3PINK"), self.tur_shotorg, v);
63 WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3"), self.tur_shotorg, v);
64 if (self.tur_head.frame == 0)
65 self.tur_head.frame = 1;
69 entity missile = turret_projectile("weapons/hagar_fire.wav", 1, 0, DEATH_TURRET_PLASMA, PROJECTILE_ELECTRO_BEAM, TRUE, TRUE);
70 missile.missile_flags = MIF_SPLASH;
72 pointparticles(particleeffectnum("laser_muzzleflash"), self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
73 if (self.tur_head.frame == 0)
74 self.tur_head.frame = 1;
81 if (self.tur_head.frame != 0)
82 self.tur_head.frame = self.tur_head.frame + 1;
84 if (self.tur_head.frame > 5)
85 self.tur_head.frame = 0;
95 self.ammo_flags = TFL_AMMO_ENERGY | TFL_AMMO_RECHARGE | TFL_AMMO_RECIEVE;
96 self.damage_flags |= TFL_DMG_HEADSHAKE;
97 self.firecheck_flags |= TFL_FIRECHECK_AFF;
98 self.aim_flags = TFL_AIM_LEAD | TFL_AIM_SHOTTIMECOMPENSATE | TFL_AIM_SPLASH;
100 turret_do_updates(self);
106 precache_model ("models/turrets/base.md3");
107 precache_model ("models/turrets/plasma.md3");
112 TUR_CONFIG_SETTINGS(PLASMA_SETTINGS(plasma))
122 float t_plasma(float req)
132 precache_model ("models/turrets/base.md3");
133 precache_model ("models/turrets/plasma.md3");
142 #endif // REGISTER_TURRET