diff options
author | Treeki <treeki@gmail.com> | 2013-05-22 21:19:01 +0200 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2013-05-22 21:19:01 +0200 |
commit | a165a5fd2e8bd9ce78e7f67e410ad26f4ef87a49 (patch) | |
tree | 18f332068dac9c49cf2959579e49ed669a301b68 /src | |
parent | f525c40321d24bbc83d8dcfdbcd63e89c368917f (diff) | |
download | kamek-a165a5fd2e8bd9ce78e7f67e410ad26f4ef87a49.tar.gz kamek-a165a5fd2e8bd9ce78e7f67e410ad26f4ef87a49.zip |
chestnut anti-bubble fix
Diffstat (limited to 'src')
-rw-r--r-- | src/chestnut.cpp | 8 |
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; + } } } |