mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
Fix for mouse movement when clicking on mercs. In windowed mode would move the cursor to odd places on screen
Enemy group invasion tactics fixed. Now reinforcements come from all directions, same as from surrounding stationary reinforcements Removed shuriken check Fix for mercs turing lame git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1154 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -1574,6 +1574,7 @@ BOOLEAN IsCursorRestricted( void )
|
||||
|
||||
void SimulateMouseMovement( UINT32 uiNewXPos, UINT32 uiNewYPos )
|
||||
{
|
||||
#if 0
|
||||
FLOAT flNewXPos, flNewYPos;
|
||||
|
||||
// Wizardry NOTE: This function currently doesn't quite work right for in any Windows resolution other than 640x480.
|
||||
@@ -1591,6 +1592,17 @@ void SimulateMouseMovement( UINT32 uiNewXPos, UINT32 uiNewYPos )
|
||||
flNewYPos = ( (FLOAT)uiNewYPos / SCREEN_HEIGHT ) * 65536;
|
||||
|
||||
mouse_event( MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE, (UINT32)flNewXPos, (UINT32)flNewYPos, 0, 0 );
|
||||
#endif
|
||||
// 0verhaul:
|
||||
// The above is a bad hack. Especially in windowed mode. We don't want coords relative to the entire screen in that case.
|
||||
// So instead, get screen coords and then use the setcursorpos call.
|
||||
POINT newmouse;
|
||||
newmouse.x = uiNewXPos;
|
||||
newmouse.y = uiNewYPos;
|
||||
ClientToScreen( ghWindow, &newmouse);
|
||||
SetCursorPos( newmouse.x, newmouse.y);
|
||||
|
||||
// Does this generate a mouse move message? I'll first try without
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user