]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/tturrets/units/unit_plasma.qc
Merge remote branch 'origin/master' into samual/updatecommands
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / tturrets / units / unit_plasma.qc
index a19ccfe4ede34e9a430c4ebeace414aa258ccd1b..7867310329452f9f3fca928caa3cb760d7a25628 100644 (file)
@@ -29,7 +29,7 @@ void turret_plasma_attack()
 {
     entity proj;
 
-    sound (self, CHAN_WEAPON, "weapons/hagar_fire.wav", VOL_BASE, ATTN_NORM);
+    sound (self, CH_WEAPON_A, "weapons/hagar_fire.wav", VOL_BASE, ATTN_NORM);
     pointparticles(particleeffectnum("laser_muzzleflash"), self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
 
     proj                    = spawn ();
@@ -59,7 +59,7 @@ void turret_plasma_dual_attack()
 {
     entity proj;
 
-    sound (self, CHAN_WEAPON, "weapons/hagar_fire.wav", VOL_BASE, ATTN_NORM);
+    sound (self, CH_WEAPON_A, "weapons/hagar_fire.wav", VOL_BASE, ATTN_NORM);
     proj                    = spawn ();
     setorigin(proj, self.tur_shotorg);
     setsize(proj, '0 0 0', '0 0 0');
@@ -84,31 +84,17 @@ void turret_plasma_dual_attack()
 
 void turret_plasma_projectile_explode()
 {
-    vector org2;
-
-    org2 = findbetterlocation (self.origin, 8);
-    WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
-    WriteByte (MSG_BROADCAST, 79);
-    WriteCoord (MSG_BROADCAST, org2_x);
-    WriteCoord (MSG_BROADCAST, org2_y);
-    WriteCoord (MSG_BROADCAST, org2_z);
-    WriteCoord (MSG_BROADCAST, 0);             // SeienAbunae: groan... Useless clutter
-    WriteCoord (MSG_BROADCAST, 0);
-    WriteCoord (MSG_BROADCAST, 0);
-    WriteByte (MSG_BROADCAST, 155);
-
     self.event_damage = SUB_Null;
     //w_deathtypestring = "ate to much plasma";
 #ifdef TURRET_DEBUG
     float d;
 
-    d = RadiusDamage (self, self.owner, self.owner.shot_dmg, 0, self.owner.shot_radius, world, self.owner.shot_force, DEATH_TURRET, world);
+    d = RadiusDamage (self, self.owner, self.owner.shot_dmg, 0, self.owner.shot_radius, world, self.owner.shot_force, DEATH_TURRET_PLASMA, world);
     self.owner.tur_dbg_dmg_t_h = self.owner.tur_dbg_dmg_t_h + d; //self.owner.shot_dmg;
     self.owner.tur_dbg_dmg_t_f = self.owner.tur_dbg_dmg_t_f + self.owner.shot_dmg;
 #else
-    RadiusDamage (self, self.owner, self.owner.shot_dmg, 0, self.owner.shot_radius, world, self.owner.shot_force, DEATH_TURRET, world);
+    RadiusDamage (self, self.owner, self.owner.shot_dmg, 0, self.owner.shot_radius, world, self.owner.shot_force, DEATH_TURRET_PLASMA, world);
 #endif
-    sound (self, CHAN_PROJECTILE, "weapons/electro_impact.wav", VOL_BASE, ATTN_NORM);
 
     remove (self);
 }
@@ -124,7 +110,7 @@ void turret_plasma_std_init()
     self.aim_flags      = TFL_AIM_LEAD | TFL_AIM_SHOTTIMECOMPENSATE | TFL_AIM_GROUND2;
     self.turrcaps_flags = TFL_TURRCAPS_RADIUSDMG | TFL_TURRCAPS_MEDPROJ | TFL_TURRCAPS_PLAYERKILL | TFL_TURRCAPS_MISSILEKILL;
 
-    if (turret_stdproc_init("plasma_std", TRUE, "models/turrets/base.md3", "models/turrets/plasma.md3", TID_PLASMA) == 0)
+    if (turret_stdproc_init("plasma_std", "models/turrets/base.md3", "models/turrets/plasma.md3", TID_PLASMA) == 0)
     {
         remove(self);
         return;
@@ -133,9 +119,6 @@ void turret_plasma_std_init()
     self.damage_flags    |= TFL_DMG_HEADSHAKE;
     self.firecheck_flags |= TFL_FIRECHECK_AFF;
 
-    if (!turret_tag_fire_update())
-        dprint("Warning: Turret ",self.classname, " faild to initialize md3 tags\n");
-
     // Our fireing routine
     self.turret_firefunc  = turret_plasma_attack;
 
@@ -156,7 +139,7 @@ void turret_plasma_dual_init()
     self.aim_flags      = TFL_AIM_LEAD | TFL_AIM_SHOTTIMECOMPENSATE  | TFL_AIM_GROUND2 ;
     self.turrcaps_flags = TFL_TURRCAPS_RADIUSDMG | TFL_TURRCAPS_MEDPROJ | TFL_TURRCAPS_PLAYERKILL;
 
-    if (turret_stdproc_init("plasma_dual", TRUE, "models/turrets/base.md3", "models/turrets/plasmad.md3", TID_PLASMA_DUAL) == 0)
+    if (turret_stdproc_init("plasma_dual", "models/turrets/base.md3", "models/turrets/plasmad.md3", TID_PLASMA_DUAL) == 0)
     {
         remove(self);
         return;
@@ -165,9 +148,6 @@ void turret_plasma_dual_init()
     self.damage_flags    |= TFL_DMG_HEADSHAKE;
     self.firecheck_flags |= TFL_FIRECHECK_AFF;
 
-    if (!turret_tag_fire_update())
-        dprint("Warning: Turret ",self.classname, " faild to initialize md3 tags\n");
-
     // Our fireing routine
     self.turret_firefunc  = turret_plasma_dual_attack;