[git]playerFOV() fix

Where bugs go to lie down and rest

Moderator: Moderator

Post Reply
Message
Author
zhouwei_e
Cornac
Posts: 35
Joined: Tue Feb 14, 2012 10:01 am

[git]playerFOV() fix

#1 Post by zhouwei_e »

Code: Select all

 game/modules/tome/class/Player.lua |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/game/modules/tome/class/Player.lua b/game/modules/tome/class/Player.lua
index 018ce0d..7039d58 100644
--- a/game/modules/tome/class/Player.lua
+++ b/game/modules/tome/class/Player.lua
@@ -406,7 +406,7 @@ function _M:playerFOV()
 
 		-- Handle infravision/heightened_senses which allow to see outside of lite radius but with LOS
 		if self:attr("infravision") or self:attr("heightened_senses") then
-			local rad1 = math.max((self.heightened_senses or 0), (self.infravision or 0))
+			local rad = math.max((self.heightened_senses or 0), (self.infravision or 0))
 			rad1 = math.min(rad, self.sight)
 			local rad2 = math.max(1, math.floor(rad1 / 4))
 			self:computeFOV(rad1, "block_sight", function(x, y, dx, dy, sqdist) if game.level.map(x, y, game.level.map.ACTOR) then game.level.map.seens(x, y, fovdist[sqdist]) end end, true, true, true)

edge2054
Retired Ninja
Posts: 3756
Joined: Fri May 28, 2010 4:38 pm

Re: [git]playerFOV() fix

#2 Post by edge2054 »

Thanks, I saw this too. Waiting for the gitoreous mirror to update so I can pull without having to change anything :/

edge2054
Retired Ninja
Posts: 3756
Joined: Fri May 28, 2010 4:38 pm

Re: [git]playerFOV() fix

#3 Post by edge2054 »

Fixed in my local copy. If you find any other bugs in that big weapon egos patch please feel free to post :)

Post Reply