X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fturrets%2Funit%2Fplasma.qc;h=59c0f850a76f5663cc81de0ffa53416d8da0400f;hb=32ca966802c45c4c231210c2d8776bc3f4135dc2;hp=dfebe1a40880a9fe0c942f4c76e0db8b9972a4d2;hpb=919c48e2ad5873bf1efb041be2e23e2e60903baf;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/turrets/unit/plasma.qc b/qcsrc/common/turrets/unit/plasma.qc index dfebe1a40..59c0f850a 100644 --- a/qcsrc/common/turrets/unit/plasma.qc +++ b/qcsrc/common/turrets/unit/plasma.qc @@ -1,4 +1,4 @@ -#ifdef REGISTER_TURRET +#ifndef IMPLEMENTATION REGISTER_TURRET( /* TUR_##id */ PLASMA, /* function */ t_plasma, @@ -11,10 +11,10 @@ REGISTER_TURRET( ); #else #ifdef SVQC -void spawnfunc_turret_plasma() { if(!turret_initialize(TUR_PLASMA)) remove(self); } +spawnfunc(turret_plasma) { if(!turret_initialize(TUR_PLASMA.m_id)) remove(self); } float t_plasma(float req) -{ +{SELFPARAM(); switch(req) { case TR_ATTACK: @@ -27,25 +27,20 @@ float t_plasma(float req) FireRailgunBullet (self.tur_shotorg, self.tur_shotorg + self.tur_shotdir_updated * MAX_SHOT_DISTANCE, 10000000000, 800, 0, 0, 0, 0, DEATH_TURRET_PLASMA); - Send_Effect("nex_muzzleflash", self.tur_shotorg, self.tur_shotdir_updated * 1000, 1); + Send_Effect(EFFECT_VORTEX_MUZZLEFLASH, self.tur_shotorg, self.tur_shotdir_updated * 1000, 1); // teamcolor / hit beam effect - vector v; - string s; - v = WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos); - s = strcat("TE_TEI_G3", ((self.team) ? Static_Team_ColorName_Upper(self.team) : "")); - - WarpZone_TrailParticles(world, particleeffectnum(s), self.tur_shotorg, v); - + vector v = WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos); + WarpZone_TrailParticles(world, particleeffectnum(EFFECT_VAPORIZER(self.team)), self.tur_shotorg, v); if (self.tur_head.frame == 0) self.tur_head.frame = 1; } else { - entity missile = turret_projectile(W_Sound("hagar_fire"), 1, 0, DEATH_TURRET_PLASMA, PROJECTILE_ELECTRO_BEAM, TRUE, TRUE); + entity missile = turret_projectile(SND(HAGAR_FIRE), 1, 0, DEATH_TURRET_PLASMA, PROJECTILE_ELECTRO_BEAM, TRUE, TRUE); missile.missile_flags = MIF_SPLASH; - Send_Effect("laser_muzzleflash", self.tur_shotorg, self.tur_shotdir_updated * 1000, 1); + Send_Effect(EFFECT_BLASTER_MUZZLEFLASH, self.tur_shotorg, self.tur_shotdir_updated * 1000, 1); if (self.tur_head.frame == 0) self.tur_head.frame = 1; } @@ -79,8 +74,6 @@ float t_plasma(float req) } case TR_PRECACHE: { - precache_model ("models/turrets/base.md3"); - precache_model ("models/turrets/plasma.md3"); return true; } }