on FoV updating faster than the map is displayed

Where bugs go to lie down and rest

Moderator: Moderator

Post Reply
Message
Author
tiger_eye
Perspiring Physicist
Posts: 889
Joined: Thu Feb 17, 2011 5:20 am

on FoV updating faster than the map is displayed

#1 Post by tiger_eye »

Sometimes running can move faster than the display can keep up (I have a crappy gfx card :-P ). FoV is still calculated at every step, and the intermediate steps (ones that have occurred before the screen is updated) are merged together and displayed at the same time. This is the desired behavior while the player is actively running, I would think, but not when the player has stopped running, because the merged display remains even after the player stopped. Let me show with an example:

I had just auto-explored to the stairs, and I can still see the tiles on the other side of the wall:
Screenshot1.png
Screenshot1.png (190.74 KiB) Viewed 471 times
Here is what I see after moving again while on the stairs:
Screenshot2.png
Screenshot2.png (188.38 KiB) Viewed 471 times
There's probably a couple ways to address this, but the below fix works and is probably the simplest:

Code: Select all

Index: game/modules/tome/class/Player.lua
===================================================================
--- game/modules/tome/class/Player.lua	(revision 4641)
+++ game/modules/tome/class/Player.lua	(working copy)
@@ -695,6 +695,7 @@
 
 --- Called after stopping running
 function _M:runStopped()
+	game.level.map.clean_fov = true
 	self:playerFOV()
 end

Post Reply