From 281fdb9d649c5ad604fc095eaf40656c45f43c6d Mon Sep 17 00:00:00 2001 From: Mikko Mononen Date: Tue, 27 Jul 2010 05:56:49 +0000 Subject: [PATCH] Fix for Issue 100:Convex poly tool always removes last shape --- RecastDemo/Source/ConvexVolumeTool.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RecastDemo/Source/ConvexVolumeTool.cpp b/RecastDemo/Source/ConvexVolumeTool.cpp index f571a04..fd3afb3 100644 --- a/RecastDemo/Source/ConvexVolumeTool.cpp +++ b/RecastDemo/Source/ConvexVolumeTool.cpp @@ -175,7 +175,7 @@ void ConvexVolumeTool::handleClick(const float* p, bool shift) for (int i = 0; i < geom->getConvexVolumeCount(); ++i) { if (pointInPoly(vols[i].nverts, vols[i].verts, p) && - p[1] >= vols[i].hmin, p[1] <= vols[i].hmax) + p[1] >= vols[i].hmin && p[1] <= vols[i].hmax) { nearestIndex = i; }