Page 1 of 1

[b23] Weird map movement

Posted: Fri Apr 01, 2011 5:18 am
by Palparepa
When fast-moving (shift+direction), I usually get some weird results in the map, as if the darkness can't keep with my speed, as shown here, where the dark/light tiles are all two tiles higher than they should.

Image

Re: [b23] Weird map movement

Posted: Thu Sep 15, 2011 7:27 pm
by tiger_eye
Aha!! The following change appears to fix this:

Code: Select all

Index: src/map.c
===================================================================
--- src/map.c	(revision 4412)
+++ src/map.c	(working copy)
@@ -942,8 +942,8 @@
 
 	int mx = map->mx;
 	int my = map->my;
-	x -= map->tile_w * (map->used_animdx + map->used_mx);
-	y -= map->tile_h * (map->used_animdy + map->used_my);
+	x -= map->tile_w * (map->used_animdx + map->mx);
+	y -= map->tile_h * (map->used_animdy + map->my);
 
 	tglBindTexture(GL_TEXTURE_2D, map->seens_texture);

Re: [b23] Weird map movement

Posted: Thu Sep 15, 2011 10:20 pm
by darkgod
OMFG tiger eye you are my hero!

Re: [b23] Weird map movement

Posted: Thu Sep 15, 2011 10:55 pm
by tiger_eye
darkgod wrote:OMFG tiger eye you are my hero!
8)
Can't get higher praise than that! :D