diff options
author | Colin Noga <Tempus@chronometry.ca> | 2013-05-22 14:19:35 -0500 |
---|---|---|
committer | Colin Noga <Tempus@chronometry.ca> | 2013-05-22 14:19:35 -0500 |
commit | 77b1f261686cbec9593656f404d059d9fdc6fe7f (patch) | |
tree | cdef7813fb41785de54da77ac2a7924e90a34c3f /src/chestnut.cpp | |
parent | d3b2d9fd92ede02ae06232c92e830e5819104f6e (diff) | |
parent | a165a5fd2e8bd9ce78e7f67e410ad26f4ef87a49 (diff) | |
download | kamek-77b1f261686cbec9593656f404d059d9fdc6fe7f.tar.gz kamek-77b1f261686cbec9593656f404d059d9fdc6fe7f.zip |
Merge branch 'level-select' of ssh://treeki.rustedlogic.net:30000/Kamek into level-select
Diffstat (limited to 'src/chestnut.cpp')
-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; + } } } |