]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/turrets/unit/ewheel.qc
Merge branch 'master' into TimePath/effectinfo
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / turrets / unit / ewheel.qc
index 1a09611da0bad5a414cd10973362139af581ac42..cd111b258e6851a2d2b5450dd6ed396b7b7d98c8 100644 (file)
@@ -1,4 +1,4 @@
-#ifdef REGISTER_TURRET
+#ifndef IMPLEMENTATION
 REGISTER_TURRET(
 /* TUR_##id   */ EWHEEL,
 /* function   */ t_ewheel,
@@ -25,7 +25,7 @@ const float ewheel_anim_bck_fast = 4;
 
 //#define EWHEEL_FANCYPATH
 void ewheel_move_path()
-{
+{SELFPARAM();
 #ifdef EWHEEL_FANCYPATH
     // Are we close enougth to a path node to switch to the next?
     if (vlen(self.origin  - self.pathcurrent.origin) < 64)
@@ -68,7 +68,7 @@ void ewheel_move_path()
 }
 
 void ewheel_move_enemy()
-{
+{SELFPARAM();
     float newframe;
 
     self.steerto = steerlib_arrive(self.enemy.origin,self.target_range_optimal);
@@ -109,7 +109,7 @@ void ewheel_move_enemy()
 }
 
 void ewheel_move_idle()
-{
+{SELFPARAM();
     if(self.frame != 0)
     {
         self.SendFlags |= TNSF_ANIM;
@@ -121,10 +121,10 @@ void ewheel_move_idle()
         movelib_beak_simple((autocvar_g_turrets_unit_ewheel_speed_stop));
 }
 
-void spawnfunc_turret_ewheel() { if(!turret_initialize(TUR_EWHEEL)) remove(self); }
+void spawnfunc_turret_ewheel() { SELFPARAM(); if(!turret_initialize(TUR_EWHEEL.m_id)) remove(self); }
 
 float t_ewheel(float req)
-{
+{SELFPARAM();
     switch(req)
     {
         case TR_ATTACK:
@@ -136,7 +136,7 @@ float t_ewheel(float req)
             {
                 turret_do_updates(self);
 
-                _mis = turret_projectile(W_Sound("lasergun_fire"), 1, 0, DEATH_TURRET_EWHEEL, PROJECTILE_BLASTER, TRUE, TRUE);
+                _mis = turret_projectile(SND(LASERGUN_FIRE), 1, 0, DEATH_TURRET_EWHEEL, PROJECTILE_BLASTER, TRUE, TRUE);
                 _mis.missile_flags = MIF_SPLASH;
 
                 Send_Effect(EFFECT_BLASTER_MUZZLEFLASH, self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
@@ -252,8 +252,6 @@ float t_ewheel(float req)
         }
         case TR_PRECACHE:
         {
-            precache_model ("models/turrets/ewheel-base2.md3");
-            precache_model ("models/turrets/ewheel-gun1.md3");
             return true;
         }
     }
@@ -265,7 +263,7 @@ float t_ewheel(float req)
 #ifdef CSQC
 
 void ewheel_draw()
-{
+{SELFPARAM();
     float dt;
 
     dt = time - self.move_time;
@@ -284,7 +282,7 @@ void ewheel_draw()
 }
 
 float t_ewheel(float req)
-{
+{SELFPARAM();
     switch(req)
     {
         case TR_SETUP: