]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mapobjects/subs.qc
Merge branch 'master' into 'terencehill/nades_stuff'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mapobjects / subs.qc
index fbcb4b39aa2747af30cf7ef06bebf7443dde2e16..09ceba21f0bb4caee58bc093bfb1ea6a11b5e8a6 100644 (file)
@@ -104,6 +104,8 @@ void SUB_CalcMoveDone(entity this)
 
 void SUB_CalcMovePause(entity this)
 {
+       if (!this.move_controller)
+               return;
        this.move_controller.animstate_starttime += frametime;
        this.move_controller.animstate_endtime += frametime;
 }
@@ -296,6 +298,11 @@ void SUB_CalcMove (entity this, vector tdest, float tspeedtype, float tspeed, vo
                        break;
        }
 
+       // Q3 implements this fallback for all movers at the end of its InitMover()
+       // If .speed is negative this applies, instead of the mover-specific default speed.
+       if (traveltime <= 0)
+               traveltime = 0.001;
+
        // Very short animations don't really show off the effect
        // of controlled animation, so let's just use linear movement.
        // Alternatively entities can choose to specify non-controlled movement.