(ef6edf745) Fixed remote characters frequently getting stuck to the ragdoll state in multiplayer. Happened because the characters are forced to stay in ragdoll mode if they're moving more than 1 m/s, and if the character stops being ragdolled server-side and starts moving, the movement will prevent it from going back to normal state client-side. Now the client will simply determine the ragdoll state based on the ragdoll input from the server.
This commit is contained in:
@@ -155,9 +155,6 @@ namespace EventInput
|
||||
return SetWindowLongPtr(hWnd, nIndex, dwNewLong);
|
||||
}
|
||||
|
||||
[DllImport("user32.dll", CharSet = CharSet.Unicode)]
|
||||
static extern IntPtr SetWindowLong(IntPtr hWnd, int nIndex, IntPtr dwNewLong);
|
||||
|
||||
[DllImport("user32.dll", CharSet = CharSet.Unicode)]
|
||||
static extern IntPtr SetWindowLongPtr(IntPtr hWnd, int nIndex, IntPtr dwNewLong);
|
||||
#endif
|
||||
@@ -176,8 +173,8 @@ namespace EventInput
|
||||
#if WINDOWS
|
||||
hookProcDelegate = HookProc;
|
||||
|
||||
prevWndProc = TrySetWindowLong(window.Handle, GWL_WNDPROC,
|
||||
Marshal.GetFunctionPointerForDelegate(hookProcDelegate));
|
||||
prevWndProc = SetWindowLongPtr(window.Handle, GWL_WNDPROC,
|
||||
Marshal.GetFunctionPointerForDelegate(hookProcDelegate));
|
||||
|
||||
hIMC = ImmGetContext(window.Handle);
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user