From a165a5fd2e8bd9ce78e7f67e410ad26f4ef87a49 Mon Sep 17 00:00:00 2001 From: Treeki Date: Wed, 22 May 2013 21:19:01 +0200 Subject: chestnut anti-bubble fix --- src/chestnut.cpp | 8 +++++--- 1 file 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; + } } } -- cgit v1.2.3