From 5c1e2000231e0348ad155d304e447aad1ff309af Mon Sep 17 00:00:00 2001
From: Stijn Buys <ingar@osirion.org>
Date: Sun, 26 Apr 2009 12:16:12 +0000
Subject: mouse cursor no longer hoovers invalid targets

---
 src/client/targets.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/client')

diff --git a/src/client/targets.cc b/src/client/targets.cc
index 2350fce..0bec6c5 100644
--- a/src/client/targets.cc
+++ b/src/client/targets.cc
@@ -358,7 +358,7 @@ void frame()
 		}
 
 		// find the current target
-		if (!core::localplayer()->view() && core::localcontrol()) {
+		if (!core::localplayer()->view() && core::localcontrol() && is_valid_hud_target(entity)) {
 
 			if (entity->id() == current_target_id) {
 				current_target = entity;
-- 
cgit v1.2.3