]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/trigger/jumppads.qc
Merge master into qc_physics_prehax (blame TimePath if it's completely broken)
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / trigger / jumppads.qc
index e852ff4e8ccc83236bf1dd3c5117354ce33a9c0b..e56f3c256ea5d44ef7c5e864acd2c31c61ae6541 100644 (file)
@@ -1,6 +1,8 @@
 // TODO: split target_push and put it in the target folder
 #ifdef SVQC
 #include "jumppads.qh"
+#include "../../movetypes/movetypes.qh"
+#include "../../../server/_all.qh"
 
 void trigger_push_use()
 {
@@ -144,6 +146,7 @@ void trigger_push_touch()
        if(self.enemy)
        {
                other.velocity = trigger_push_calculatevelocity(other.origin, self.enemy, self.height);
+               other.move_velocity = other.velocity;
        }
        else if(self.target)
        {
@@ -157,14 +160,18 @@ void trigger_push_touch()
                                RandomSelection_Add(e, 0, string_null, 1, 1);
                }
                other.velocity = trigger_push_calculatevelocity(other.origin, RandomSelection_chosen_ent, self.height);
+               other.move_velocity = other.velocity;
        }
        else
        {
                other.velocity = self.movedir;
+               other.move_velocity = other.velocity;
        }
 
        UNSET_ONGROUND(other);
 
+       other.move_flags &= ~FL_ONGROUND;
+
 #ifdef SVQC
        if (IS_PLAYER(other))
        {
@@ -256,7 +263,7 @@ void trigger_push_findtarget()
 
        // first calculate a typical start point for the jump
        org = (self.absmin + self.absmax) * 0.5;
-       org_z = self.absmax.z - PL_MIN_z;
+       org_z = self.absmax.z - PL_MIN.z;
 
        if (self.target)
        {
@@ -344,7 +351,7 @@ void trigger_push_updatelink()
 
 void trigger_push_link()
 {
-       Net_LinkEntity(self, false, 0, trigger_push_send);
+       //Net_LinkEntity(self, false, 0, trigger_push_send);
 }
 #endif
 #ifdef SVQC