]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/func/plat.qc
Merge branch 'TimePath/modules'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / func / plat.qc
index 6f7ebaad31522130f7b69bf3509346c2e1e5098c..5d90924daa248b0e079f8ff4bc99bf5b6c4e125e 100644 (file)
@@ -1,3 +1,4 @@
+#include "plat.qh"
 REGISTER_NET_LINKED(ENT_CLIENT_PLAT)
 
 #ifdef SVQC
@@ -168,17 +169,16 @@ NET_HANDLE(ENT_CLIENT_PLAT, bool isnew)
 
                this.classname = "plat";
                this.solid = SOLID_BSP;
-               this.movetype = MOVETYPE_PUSH;
+               set_movetype(this, MOVETYPE_PUSH);
                this.drawmask = MASK_NORMAL;
                this.draw = plat_draw;
+               if (isnew) IL_PUSH(g_drawables, this);
                this.use = plat_use;
                this.entremove = trigger_remove_generic;
 
                plat_reset(this); // also called here
 
-               this.move_movetype = MOVETYPE_PUSH;
-               this.move_origin = this.origin;
-               this.move_angles = this.angles;
+               set_movetype(this, MOVETYPE_PUSH);
                this.move_time = time;
 
                plat_spawn_inside_trigger(this);
@@ -188,8 +188,6 @@ NET_HANDLE(ENT_CLIENT_PLAT, bool isnew)
        {
                plat_reset(this);
 
-               this.move_origin = this.origin;
-               this.move_angles = this.angles;
                this.move_time = time;
        }
        return true;