]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/turrets/turret/hellion.qc
Merge branch 'master' into TimePath/scrollpanel
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / turrets / turret / hellion.qc
index 3eec587b20790403d207ee0df9b3b9f7f3ed635b..15dc36b3d7eadeb107446c3d257bd9c5a5a08eb9 100644 (file)
@@ -1,39 +1,16 @@
-#ifndef TURRET_HELLION_H
-#define TURRET_HELLION_H
-
-#include "hellion_weapon.qc"
-
-CLASS(Hellion, Turret)
-/* spawnflags */ ATTRIB(Hellion, spawnflags, int, TUR_FLAG_SPLASH | TUR_FLAG_FASTPROJ | TUR_FLAG_PLAYER | TUR_FLAG_MISSILE);
-/* mins       */ ATTRIB(Hellion, mins, vector, '-32 -32 0');
-/* maxs       */ ATTRIB(Hellion, maxs, vector, '32 32 64');
-/* modelname  */ ATTRIB(Hellion, mdl, string, "base.md3");
-/* model      */ ATTRIB_STRZONE(Hellion, model, string, strcat("models/turrets/", this.mdl));
-/* head_model */ ATTRIB_STRZONE(Hellion, head_model, string, strcat("models/turrets/", "hellion.md3"));
-/* netname    */ ATTRIB(Hellion, netname, string, "hellion");
-/* fullname   */ ATTRIB(Hellion, turret_name, string, _("Hellion Missile Turret"));
-    ATTRIB(Hellion, m_weapon, Weapon, WEP_HELLION);
-ENDCLASS(Hellion)
-REGISTER_TURRET(HELLION, NEW(Hellion));
-
-#endif
-
-#ifdef IMPLEMENTATION
-
-#include "hellion_weapon.qc"
+#include "hellion.qh"
 
 #ifdef SVQC
 
-spawnfunc(turret_hellion) { if (!turret_initialize(TUR_HELLION)) remove(self); }
+spawnfunc(turret_hellion) { if (!turret_initialize(this, TUR_HELLION)) delete(this); }
 
 METHOD(Hellion, tr_think, void(Hellion thistur, entity it))
 {
-    SELFPARAM();
-    if (self.tur_head.frame != 0)
-        self.tur_head.frame += 1;
+    if (it.tur_head.frame != 0)
+        it.tur_head.frame += 1;
 
-    if (self.tur_head.frame >= 7)
-        self.tur_head.frame = 0;
+    if (it.tur_head.frame >= 7)
+        it.tur_head.frame = 0;
 }
 METHOD(Hellion, tr_setup, void(Hellion this, entity it))
 {
@@ -44,4 +21,3 @@ METHOD(Hellion, tr_setup, void(Hellion this, entity it))
 }
 
 #endif
-#endif