]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/trigger/jumppads.qc
Merge branch 'terencehill/cl_forceplayercolors_2' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / trigger / jumppads.qc
index cdd383e536216af459824fbfd2be574b3d33d848..d0b8f9459766d583f11b3bb32a848e02e943537e 100644 (file)
@@ -1,7 +1,7 @@
 // TODO: split target_push and put it in the target folder
 #ifdef SVQC
 #include "jumppads.qh"
-#include "../../movetypes/movetypes.qh"
+#include "../../physics/movetypes/movetypes.qh"
 
 void trigger_push_use()
 {SELFPARAM();
@@ -134,10 +134,8 @@ void trigger_push_touch()
        if (this.active == ACTIVE_NOT)
                return;
 
-#ifdef SVQC
        if (!isPushable(other))
                return;
-#endif
 
        if(this.team)
                if(((this.spawnflags & 4) == 0) == (DIFF_TEAM(this, other)))
@@ -174,6 +172,22 @@ void trigger_push_touch()
        UNSET_ONGROUND(other);
 #elif defined(CSQC)
        other.move_flags &= ~FL_ONGROUND;
+
+       if (other.flags & FL_PROJECTILE)
+       {
+               other.move_angles = vectoangles (other.move_velocity);
+               switch(other.move_movetype)
+               {
+                       case MOVETYPE_FLY:
+                               other.move_movetype = MOVETYPE_TOSS;
+                               other.gravity = 1;
+                               break;
+                       case MOVETYPE_BOUNCEMISSILE:
+                               other.move_movetype = MOVETYPE_BOUNCE;
+                               other.gravity = 1;
+                               break;
+               }
+       }
 #endif
 
 #ifdef SVQC
@@ -243,6 +257,12 @@ void trigger_push_touch()
                UpdateCSQCProjectile(other);
        }
 
+       /*if (other.flags & FL_ITEM)
+       {
+               ItemUpdate(other);
+               other.SendFlags |= ISF_DROP;
+       }*/
+
        if (this.spawnflags & PUSH_ONCE)
        {
                this.touch = func_null;