Regarding the edge scroling, do you have mouse lock turned off? Because that is what it is there for.
Yes. It is off. Mouse Lock allows the cursor to leave the game window. It does not effect the map movement.
Test it with a multi-monitor setup.
I assume the code is only testing cursor position at the edge, not timing a pause at the edge before executing the map movement. I imagine about 250ms (about 15 ticks) would be sufficient.
Moving the cursor in another monitor causes the map to move (while the game has focus). As the player needs to select something in the other monitor to have focus, it cause the map to scroll wildly.
Moving the cursor on the desktop for example, causes this wild map movement.
Finally, moving the cursor back into the game's monitor also causes the position test to begin moving the map yet again.
< Message edited by Malevolence -- 6/17/2020 8:57:51 PM >
Nicht kleckern, sondern klotzen!
*Please remember all posts are made by a malevolent, autocratic despot whose rule is marked by unjust severity and arbitrary behavior. Your experiences may vary.