]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/trigger/jumppads.qc
Merge branch 'master' into TimePath/physics
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / trigger / jumppads.qc
index 88f785f39ecf62296fe0ffbd45c8ff4946ccd81e..5ec7b41fd484c84fe3cbbe8ce7f32452038c8d9e 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,22 +159,18 @@ 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:
@@ -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,7 +290,7 @@ 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);
 #endif