From 5626011fdcaf807992d40b5f2a708f874e838775 Mon Sep 17 00:00:00 2001 From: ac_stef Date: Tue, 3 Mar 2009 15:05:29 +0000 Subject: [PATCH] small optimization git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4241 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/world.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/src/world.cpp b/source/src/world.cpp index c1db66f3..f54f0983 100644 --- a/source/src/world.cpp +++ b/source/src/world.cpp @@ -158,7 +158,7 @@ int closestent() // used for delent and edit mode ent display bdist = dist; } } - if(best < 0) break; + if(best < 0 || bcnt == 1) break; if(bcnt) clentsel %= bcnt; } return best;