]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mutators/mutator/nades/net.qc
Merge branch 'master' into Mario/entcs
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mutators / mutator / nades / net.qc
index 269574cda4be6fdcab792156a3dfbbf61cfe25e0..498d878d2d272341bd2ba9b04fd8908393a5e713 100644 (file)
@@ -1,6 +1,8 @@
-#include "nades.qh"
+#include "net.qh"
+
+#ifdef GAMEQC
 
-#ifdef IMPLEMENTATION
+#include "nades.qh"
 
 #ifdef CSQC
 .float ltime;
@@ -13,11 +15,13 @@ void orb_draw(entity this)
 
        this.alpha = (this.ltime - time) / this.orb_lifetime;
        this.scale = min((1 - this.alpha)*this.orb_lifetime*4,1)*this.orb_radius;
+       this.angles = this.angles + dt * this.avelocity;
 }
 
 void orb_setup(entity e)
 {
        setmodel(e, MDL_NADE_ORB);
+       e.skin = 1;
 
        setorigin(e, e.origin);
 
@@ -27,12 +31,13 @@ void orb_setup(entity e)
        e.orb_radius = e.orb_radius/model_radius*0.6;
 
        e.draw = orb_draw;
+       IL_PUSH(g_drawables, e);
        e.health = 255;
-       e.movetype = MOVETYPE_NONE;
+       set_movetype(e, MOVETYPE_NONE);
        e.solid = SOLID_NOT;
        e.drawmask = MASK_NORMAL;
        e.scale = 0.01;
-       e.avelocity = e.move_avelocity = '7 0 11';
+       e.avelocity = '7 0 11';
        e.renderflags |= RF_ADDITIVE;
 }
 #endif