From d8ac0c3f6cf226f23422fa81298006d01fe53acf Mon Sep 17 00:00:00 2001
From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54>
Date: Sun, 19 Aug 2012 12:54:33 +0000
Subject: [PATCH] Switching places will correctly pickup things

git-svn-id: http://svn.net-core.org/repos/t-engine4@5521 51575b47-30f0-44d4-a5cc-537603b46e54
---
 game/modules/tome/class/Player.lua           | 4 ++--
 game/modules/tome/class/interface/Combat.lua | 2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/game/modules/tome/class/Player.lua b/game/modules/tome/class/Player.lua
index 5695992e69..ed60ecbdd4 100644
--- a/game/modules/tome/class/Player.lua
+++ b/game/modules/tome/class/Player.lua
@@ -162,8 +162,8 @@ function _M:onWorldEncounter(target, x, y)
 	end
 end
 
-function _M:describeFloor(x, y)
-	if self.old_x == x and self.old_y == y then return end
+function _M:describeFloor(x, y, force)
+	if self.old_x == x and self.old_y == y and not force then return end
 
 	-- Autopickup money
 	if self:getInven(self.INVEN_INVEN) and not self.no_inventory_access then
diff --git a/game/modules/tome/class/interface/Combat.lua b/game/modules/tome/class/interface/Combat.lua
index 00fae1237f..bbf2712a7a 100644
--- a/game/modules/tome/class/interface/Combat.lua
+++ b/game/modules/tome/class/interface/Combat.lua
@@ -62,6 +62,8 @@ function _M:bumpInto(target, x, y)
 			self.x = nil self.y = nil
 			target:move(sx, sy, true)
 			self:move(tx, ty, true)
+			if target.describeFloor then target:describeFloor(target.x, target.y, true) end
+			if self.describeFloor then self:describeFloor(self.x, self.y, true) end
 		end
 	end
 end
-- 
GitLab