]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Tracewalk: allow to jump small obstacles swimming underwater upwards even if higher...
authorterencehill <piuntn@gmail.com>
Mon, 31 Jul 2017 13:26:32 +0000 (15:26 +0200)
committerterencehill <piuntn@gmail.com>
Mon, 31 Jul 2017 13:26:32 +0000 (15:26 +0200)
qcsrc/server/bot/default/navigation.qc

index e450da01f369ee6e862acf77e7639348004ab59f..fc993400e2845a2da9404964810e099afb63d6fb 100644 (file)
@@ -308,7 +308,7 @@ bool tracewalk(entity e, vector start, vector m1, vector m2, vector end, float e
                                {
                                        // stepswim
                                        vector stepswim_move = move + stepheightvec;
-                                       if (flatdist > 0 && stepswim_move.z > end2.z) // don't allow stepswim to go higher than destination
+                                       if (flatdist > 0 && stepswim_move.z > end2.z + stepheightvec.z) // don't allow stepswim to go higher than destination
                                                stepswim_move.z = end2.z;
 
                                        tracebox(org + stepheightvec, m1, m2, stepswim_move, movemode, e);