summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2013-05-22 21:19:01 +0200
committerTreeki <treeki@gmail.com>2013-05-22 21:19:01 +0200
commita165a5fd2e8bd9ce78e7f67e410ad26f4ef87a49 (patch)
tree18f332068dac9c49cf2959579e49ed669a301b68
parentf525c40321d24bbc83d8dcfdbcd63e89c368917f (diff)
downloadkamek-a165a5fd2e8bd9ce78e7f67e410ad26f4ef87a49.tar.gz
kamek-a165a5fd2e8bd9ce78e7f67e410ad26f4ef87a49.zip
chestnut anti-bubble fix
-rw-r--r--src/chestnut.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/chestnut.cpp b/src/chestnut.cpp
index 7ebfc4d..ff653c0 100644
--- a/src/chestnut.cpp
+++ b/src/chestnut.cpp
@@ -159,9 +159,11 @@ float daEnChestnut_c::nearestPlayerDistance() {
for (int i = 0; i < 4; i++) {
if (dAcPy_c *player = dAcPy_c::findByID(i)) {
- float thisDist = abs(player->pos.x - pos.x);
- if (thisDist < bestSoFar)
- bestSoFar = thisDist;
+ if (strcmp(player->states2.getCurrentState()->getName(), "dAcPy_c::StateID_Balloon")) {
+ float thisDist = abs(player->pos.x - pos.x);
+ if (thisDist < bestSoFar)
+ bestSoFar = thisDist;
+ }
}
}