aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_key_loop.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ft_key_loop.c')
-rw-r--r--src/ft_key_loop.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ft_key_loop.c b/src/ft_key_loop.c
index c68b228..d19daaa 100644
--- a/src/ft_key_loop.c
+++ b/src/ft_key_loop.c
@@ -54,6 +54,13 @@ static void
pl = &cl->plist;
x = ft_find_x(key, pl);
y = ft_find_y(key, pl);
+ if (cl->mlist.map[y][x] == 'T')
+ {
+ pl->pos_x = old_x + ((old_x - x) / 4);
+ pl->pos_y = old_y + ((old_y - y) / 4);
+ x = ft_find_x(key, pl);
+ y = ft_find_y(key, pl);
+ }
if (ft_ischarset(FT_CHRST_COLLISION, cl->mlist.map[(uint64_t)old_y][x]) ||
cl->mlist.map[(uint64_t)old_y][x] == '\0')
pl->pos_x = old_x;