From f6744b92d24e0791523dcb0ebde054a2be4c6afd Mon Sep 17 00:00:00 2001 From: John Date: Thu, 9 Jul 2015 16:47:39 +0300 Subject: [PATCH] Battles dont take forever to join --- toontown/battle/BattleBase.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/toontown/battle/BattleBase.py b/toontown/battle/BattleBase.py index 391c9a2f..4500b89c 100755 --- a/toontown/battle/BattleBase.py +++ b/toontown/battle/BattleBase.py @@ -229,6 +229,8 @@ class BattleBase: posA] suitSpeed = 4.8 toonSpeed = 8.0 + maxTimeToon = 10.0 + maxTimeSuit = 11.0 def __init__(self): self.pos = Point3(0, 0, 0) @@ -256,15 +258,15 @@ class BattleBase: facing.normalize() suitdest = Point3(centerpos - Point3(facing * 6.0)) dist = Vec3(suitdest - suitpos).length() - return dist / BattleBase.suitSpeed + return min(dist / BattleBase.suitSpeed, BattleBase.maxTimeSuit) def calcSuitMoveTime(self, pos0, pos1): dist = Vec3(pos0 - pos1).length() - return dist / BattleBase.suitSpeed + return min(dist / BattleBase.suitSpeed, BattleBase.maxTimeSuit) def calcToonMoveTime(self, pos0, pos1): dist = Vec3(pos0 - pos1).length() - return dist / BattleBase.toonSpeed + return min(dist / BattleBase.toonSpeed, BattleBase.maxTimeToon) def buildJoinPointList(self, avPos, destPos, toon = 0): minDist = 999999.0