aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormaximius <none@none>2009-10-28 20:05:20 -0700
committermaximius <none@none>2009-10-28 20:05:20 -0700
commit12622ee1a2e1c7cef77fd86eec4253566486006c (patch)
treef59bb7a0b188fea603df777bedee531c6801b9f4 /src
parent14193ccc035b14dea8565aa31420cce1a09647ce (diff)
*More precise method for determining whether or not a seat is occupied (disregarding object size).
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/GameObject.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/game/GameObject.cpp b/src/game/GameObject.cpp
index f95fb9643d8..fa66576feb1 100644
--- a/src/game/GameObject.cpp
+++ b/src/game/GameObject.cpp
@@ -1018,7 +1018,7 @@ void GameObject::Use(Unit* user)
if(itr->second)
if(Player* ChairUser = objmgr.GetPlayer(itr->second))
- if(ChairUser->IsSitState() && ChairUser->getStandState() != UNIT_STAND_STATE_SIT && ChairUser->GetDistance2d(x_i, y_i) == 0)
+ if(ChairUser->IsSitState() && ChairUser->getStandState() != UNIT_STAND_STATE_SIT && ChairUser->GetExactDist2d(x_i, y_i) < 0.1f)
continue; // This seat is already occupied by ChairUser. NOTE: Not sure if the ChairUser->getStandState() != UNIT_STAND_STATE_SIT check is required.
else
itr->second = 0; // This seat is unoccupied.