]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Only cancel out the secondary flags when launcher is set on target_speed Mario/target_speed
authorMario <mario@smbclan.net>
Sun, 18 Aug 2019 03:16:45 +0000 (13:16 +1000)
committerMario <mario@smbclan.net>
Sun, 18 Aug 2019 03:16:45 +0000 (13:16 +1000)
qcsrc/server/compat/quake3.qc

index f9d4740884ff08e69377f64b1d348af0e86d064a..fdf2e457c51801dfabb83abfff6428c0d86cf29d 100644 (file)
@@ -246,7 +246,7 @@ void target_speed_use(entity this, entity actor, entity trigger)
 
        bool launcher = (this.spawnflags & TSPEED_LAUNCHER);
 
-#define HAVE_ONE(flg, plusflg, minusflg) (((flg & plusflg) && !(flg & minusflg)) || ((flg & minusflg) && !(flg & plusflg)))
+#define HAVE_ONE(flg, plusflg, minusflg) (((flg & plusflg) && (!(flg & minusflg) || !launcher)) || ((flg & minusflg) && (!(flg & plusflg) || !launcher)))
        if(HAVE_ONE(this.spawnflags, TSPEED_PLUSX, TSPEED_MINUSX) && (actor.velocity_x || launcher))
                actor.velocity_x = target_speed_getspeed((this.spawnflags & TSPEED_PLUSX), this.spawnflags, actor.velocity_x, this.speed);
        if(HAVE_ONE(this.spawnflags, TSPEED_PLUSY, TSPEED_MINUSY) && (actor.velocity_y || launcher))