From: terencehill <piuntn@gmail.com>
Date: Sat, 15 Apr 2017 14:13:46 +0000 (+0200)
Subject: Better estimation of time needed to reach jumppad destination (still far from a good... 
X-Git-Tag: xonotic-v0.8.5~2378^2~187
X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=082e0b10bfb5ba3dd2ea848b89c1889e790fb999;p=xonotic%2Fxonotic-data.pk3dir.git

Better estimation of time needed to reach jumppad destination (still far from a good estimation)
---

diff --git a/qcsrc/common/triggers/trigger/jumppads.qc b/qcsrc/common/triggers/trigger/jumppads.qc
index 3c1b854c21..b1405cff1d 100644
--- a/qcsrc/common/triggers/trigger/jumppads.qc
+++ b/qcsrc/common/triggers/trigger/jumppads.qc
@@ -337,7 +337,7 @@ void trigger_push_findtarget(entity this)
 				}
 			}
 			if (valid_best_target)
-				waypoint_spawnforteleporter(this, best_target, vlen(best_target - best_org) / vlen(e.velocity));
+				waypoint_spawnforteleporter(this, best_target, (vlen(t.origin - best_org) + vlen(best_target - t.origin)) / vlen(e.velocity));
 			delete(e);
 #endif
 		}