]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/turrets/turret/fusionreactor.qc
Merge branch 'master' into Mirio/balance
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / turrets / turret / fusionreactor.qc
index bdac1f02930f174648b1ccd8d80dc9188d1cadd6..163bffb9d70ebd8988f9f595b75b622c450bd605 100644 (file)
@@ -1,19 +1,4 @@
-#ifndef TURRET_FUSIONREACTOR_H
-#define TURRET_FUSIONREACTOR_H
-
-CLASS(FusionReactor, Turret)
-/* spawnflags */ ATTRIB(FusionReactor, spawnflags, int, TUR_FLAG_SUPPORT | TUR_FLAG_AMMOSOURCE);
-/* mins       */ ATTRIB(FusionReactor, mins, vector, '-34 -34 0');
-/* maxs       */ ATTRIB(FusionReactor, maxs, vector, '34 34 90');
-/* modelname  */ ATTRIB(FusionReactor, mdl, string, "base.md3");
-/* model      */ ATTRIB_STRZONE(FusionReactor, model, string, strcat("models/turrets/", this.mdl));
-/* head_model */ ATTRIB_STRZONE(FusionReactor, head_model, string, strcat("models/turrets/", "reactor.md3"));
-/* netname    */ ATTRIB(FusionReactor, netname, string, "fusionreactor");
-/* fullname   */ ATTRIB(FusionReactor, turret_name, string, _("Fusion Reactor"));
-ENDCLASS(FusionReactor)
-REGISTER_TURRET(FUSIONREACTOR, NEW(FusionReactor));
-
-#endif
+#include "fusionreactor.qh"
 
 #ifdef IMPLEMENTATION
 #ifdef SVQC
@@ -25,7 +10,7 @@ bool turret_fusionreactor_firecheck(entity this)
     if (IS_DEAD(this.enemy))
         return false;
 
-    if (this.enemy == world)
+    if (this.enemy == NULL)
         return false;
 
     if (this.ammo < this.shot_dmg)
@@ -46,7 +31,7 @@ bool turret_fusionreactor_firecheck(entity this)
     return true;
 }
 
-spawnfunc(turret_fusionreactor) { if (!turret_initialize(this, TUR_FUSIONREACTOR)) remove(this); }
+spawnfunc(turret_fusionreactor) { if (!turret_initialize(this, TUR_FUSIONREACTOR)) delete(this); }
 
 METHOD(FusionReactor, tr_attack, void(FusionReactor this, entity it))
 {