From: bones_was_here Date: Fri, 9 Feb 2024 19:28:37 +0000 (+1000) Subject: Q3 compat: implement a 1ms fallback traveltime for all movers X-Git-Url: https://de.git.xonotic.org/?a=commitdiff_plain;h=df3189e33d9390422360fcaeaa362f874548f86b;p=xonotic%2Fxonotic-data.pk3dir.git Q3 compat: implement a 1ms fallback traveltime for all movers This fixes the doors failing to open on q3df map sdc-uk_08 which uses trigger_multiple -> func_button.speed = -1 -> func_door Buttons trigger targets at the end of their movement and that one didn't move at all. Signed-off-by: bones_was_here --- diff --git a/qcsrc/common/mapobjects/subs.qc b/qcsrc/common/mapobjects/subs.qc index f89ab21e2..09ceba21f 100644 --- a/qcsrc/common/mapobjects/subs.qc +++ b/qcsrc/common/mapobjects/subs.qc @@ -298,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.