Part of my custom movement system involves moving around without using keys. When doing this though, i often reach black areas of the map. For example, the leaping part uses
PHP Code:
player.x -= cos(ang)*1.6;
player.y += sin(ang)*1.6;
If a player just leaps using mouse without touching the keyboard, the tiles eventually go black but you can still see NPCs. The movement is done clientside but so are most movement systems. How can I fix this?