Another problem with it is that all keys the soldier moves toward the mouse. I expected 'S' to move him backwards but that doesn't happen. the movement is also a bit weird he moves in a little circle before he moves towards the mouse. Why?
I changed the keyboard input code to:
1 2 3 4 5 6 7 8 9 10 11
case WM_KEYDOWN:
{
keys[wParam] = true;
return 0;
}
case WM_KEYUP:
{
keys[wParam] = false;
return 0;
}