From e850a1093052b6a848a6d0725d0c6fe4762a781e Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Sun, 28 Feb 2010 10:54:02 +0000 Subject: [PATCH] Icecrusher and Haywire: Use the bounding box to find the nearest player. SVN-Revision: 6450 --- src/badguy/haywire.cpp | 2 +- src/object/icecrusher.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/badguy/haywire.cpp b/src/badguy/haywire.cpp index 6dff5ccdf..f0aaa39b4 100644 --- a/src/badguy/haywire.cpp +++ b/src/badguy/haywire.cpp @@ -131,7 +131,7 @@ Haywire::active_update(float elapsed_time) } if (is_exploding && !turn_around_timer.started()) { - Player *p = Sector::current()->get_nearest_player (this->get_pos ()); + Player *p = Sector::current()->get_nearest_player (this->get_bbox ()); if (p) { Direction player_dir = LEFT; diff --git a/src/object/icecrusher.cpp b/src/object/icecrusher.cpp index 199ec51dc..873428c14 100644 --- a/src/object/icecrusher.cpp +++ b/src/object/icecrusher.cpp @@ -169,7 +169,7 @@ IceCrusher::update(float elapsed_time) bool IceCrusher::found_victim() { - Player* player = Sector::current()->get_nearest_player (this->get_pos ()); + Player* player = Sector::current()->get_nearest_player (this->get_bbox ()); if (!player) return false; const Rectf& player_bbox = player->get_bbox(); -- 2.11.0