]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/trigger/jumppads.qc
Merge branch 'TimePath/globalforces' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / trigger / jumppads.qc
index 88f785f39ecf62296fe0ffbd45c8ff4946ccd81e..519ba2691586fb5e5d0d99a99021361310b8c5bb 100644 (file)
@@ -146,7 +146,6 @@ void trigger_push_touch(entity this, entity toucher)
        if(this.enemy)
        {
                toucher.velocity = trigger_push_calculatevelocity(toucher.origin, this.enemy, this.height);
-               toucher.move_velocity = toucher.velocity;
        }
        else if(this.target && this.target != "")
        {
@@ -160,30 +159,26 @@ void trigger_push_touch(entity this, entity toucher)
                                RandomSelection_Add(e, 0, string_null, 1, 1);
                }
                toucher.velocity = trigger_push_calculatevelocity(toucher.origin, RandomSelection_chosen_ent, this.height);
-               toucher.move_velocity = toucher.velocity;
        }
        else
        {
                toucher.velocity = this.movedir;
-               toucher.move_velocity = toucher.velocity;
        }
 
-#ifdef SVQC
        UNSET_ONGROUND(toucher);
-#elif defined(CSQC)
-       toucher.move_flags &= ~FL_ONGROUND;
 
+#ifdef CSQC
        if (toucher.flags & FL_PROJECTILE)
        {
-               toucher.move_angles = vectoangles (toucher.move_velocity);
+               toucher.angles = vectoangles (toucher.velocity);
                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;
                }
@@ -240,14 +235,15 @@ void trigger_push_touch(entity this, entity toucher)
        if (toucher.flags & FL_PROJECTILE)
        {
                toucher.angles = vectoangles (toucher.velocity);
-               switch(toucher.movetype)
+               toucher.com_phys_gravity_factor = 1;
+               switch(toucher.move_movetype)
                {
                        case MOVETYPE_FLY:
-                               toucher.movetype = MOVETYPE_TOSS;
+                               set_movetype(toucher, MOVETYPE_TOSS);
                                toucher.gravity = 1;
                                break;
                        case MOVETYPE_BOUNCEMISSILE:
-                               toucher.movetype = MOVETYPE_BOUNCE;
+                               set_movetype(toucher, MOVETYPE_BOUNCE);
                                toucher.gravity = 1;
                                break;
                }
@@ -294,9 +290,9 @@ void trigger_push_findtarget(entity this)
                        setsize(e, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL));
                        e.velocity = trigger_push_calculatevelocity(org, t, this.height);
                        tracetoss(e, e);
-                       if(e.movetype == MOVETYPE_NONE)
+                       if(e.move_movetype == MOVETYPE_NONE)
                                waypoint_spawnforteleporter(this, trace_endpos, vlen(trace_endpos - org) / vlen(e.velocity));
-                       remove(e);
+                       delete(e);
 #endif
                }
 
@@ -328,7 +324,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);