]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/trigger/jumppads.qc
Merge branch 'master' into Mario/entcs
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / trigger / jumppads.qc
index 4a30ca69510d59a5c1aac0577f6a92fed64095d1..ef13dd5bec0d95af57d2432ba25e83953335cfa5 100644 (file)
@@ -1,3 +1,4 @@
+#include "jumppads.qh"
 // TODO: split target_push and put it in the target folder
 #ifdef SVQC
 #include "jumppads.qh"
@@ -174,11 +175,11 @@ void trigger_push_touch(entity this, entity toucher)
                switch(toucher.move_movetype)
                {
                        case MOVETYPE_FLY:
-                               toucher.move_movetype = MOVETYPE_TOSS;
+                               set_movetype(toucher, MOVETYPE_TOSS);
                                toucher.gravity = 1;
                                break;
                        case MOVETYPE_BOUNCEMISSILE:
-                               toucher.move_movetype = MOVETYPE_BOUNCE;
+                               set_movetype(toucher, MOVETYPE_BOUNCE);
                                toucher.gravity = 1;
                                break;
                }
@@ -235,6 +236,7 @@ void trigger_push_touch(entity this, entity toucher)
        if (toucher.flags & FL_PROJECTILE)
        {
                toucher.angles = vectoangles (toucher.velocity);
+               toucher.com_phys_gravity_factor = 1;
                switch(toucher.move_movetype)
                {
                        case MOVETYPE_FLY:
@@ -291,7 +293,7 @@ void trigger_push_findtarget(entity this)
                        tracetoss(e, e);
                        if(e.move_movetype == MOVETYPE_NONE)
                                waypoint_spawnforteleporter(this, trace_endpos, vlen(trace_endpos - org) / vlen(e.velocity));
-                       remove(e);
+                       delete(e);
 #endif
                }
 
@@ -323,7 +325,7 @@ void trigger_push_findtarget(entity this)
                e.velocity = this.movedir;
                tracetoss(e, e);
                waypoint_spawnforteleporter(this, trace_endpos, vlen(trace_endpos - org) / vlen(e.velocity));
-               remove(e);
+               delete(e);
        }
 
        trigger_push_link(this);