From: Juhu <5894800-Juhu_@users.noreply.gitlab.com> Date: Sat, 4 Feb 2023 10:27:19 +0000 (+0100) Subject: q3df compat: only simulate q3df target_speed bugs when using Q3COMPAT X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4ac47d5b18aa8380ce6b61321a25a688a46941aa;p=xonotic%2Fxonotic-data.pk3dir.git q3df compat: only simulate q3df target_speed bugs when using Q3COMPAT --- diff --git a/qcsrc/common/mapobjects/target/speed.qc b/qcsrc/common/mapobjects/target/speed.qc index 7ad194bfe..1862f5198 100644 --- a/qcsrc/common/mapobjects/target/speed.qc +++ b/qcsrc/common/mapobjects/target/speed.qc @@ -50,6 +50,12 @@ vector target_speed_calculatevelocity(entity this, float speed, entity pushed_en float launcherspeed = 0; + if(!STAT(Q3COMPAT)) // no need to simulate this bug + { + launcherspeed += speed; + if(is_add) launcherspeed += oldspeed; // add the add speed in the same variable as it goes in the same direction + } + FOR_XYZ(i) { if(((pushvel[i] != 0) || is_launcher) && (is_positive[i] != is_negative[i])) @@ -57,8 +63,11 @@ vector target_speed_calculatevelocity(entity this, float speed, entity pushed_en if(is_launcher) { pushvel[i] = 1; // every direction weighs the same amount on launchers, movedir does not matter - launcherspeed += speed; - if(is_add) launcherspeed += oldspeed; // add the add speed in the same variable as it goes in the same direction + if(STAT(Q3COMPAT)) + { + launcherspeed += speed; + if(is_add) launcherspeed += oldspeed; // add the add speed in the same variable as it goes in the same direction + } } if(is_positive[i])