[b23] Weird map movement

Where bugs go to lie down and rest

Moderator: Moderator

Post Reply
Message
Author
Palparepa
Wayist
Posts: 22
Joined: Thu Feb 10, 2011 1:24 am

[b23] Weird map movement

#1 Post 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

tiger_eye
Perspiring Physicist
Posts: 889
Joined: Thu Feb 17, 2011 5:20 am

Re: [b23] Weird map movement

#2 Post 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);

darkgod
Master of Eyal
Posts: 10751
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: [b23] Weird map movement

#3 Post by darkgod »

OMFG tiger eye you are my hero!
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

tiger_eye
Perspiring Physicist
Posts: 889
Joined: Thu Feb 17, 2011 5:20 am

Re: [b23] Weird map movement

#4 Post by tiger_eye »

darkgod wrote:OMFG tiger eye you are my hero!
8)
Can't get higher praise than that! :D

Post Reply