# HG changeset patch # User Grumpy7 # Date 1381479149 -7200 # Node ID f094bfb4ba313e8f359c9928bc173f93c5e70bcc # Parent 785be3f53d9bb2b3466cf6b259b64335f82f11c5# Parent 5ea627a263dd1de43350ba2ffc979adb7c9edcf2 Merge diff -r 785be3f53d9b -r f094bfb4ba31 Mouse.cpp --- a/Mouse.cpp Fri Oct 11 10:12:24 2013 +0200 +++ b/Mouse.cpp Fri Oct 11 10:12:29 2013 +0200 @@ -512,7 +512,9 @@ y = pY; x = pX; } - if ( pCurrentScreen != SCREEN_GAME)// || !dword_507B98_ctrl_pressed ) // stealing cursor + + extern bool _507B98_ctrl_pressed; + if ( pCurrentScreen != SCREEN_GAME || !_507B98_ctrl_pressed ) // stealing cursor goto LABEL_30; v4 = GetCurrentMenuID(); x = pX; @@ -580,7 +582,9 @@ else v5 = pRenderer->pActiveZBuffer[pX + pSRZBufferLineOffsets[pY]]; v6 = (unsigned __int16)v5; - if (PID_TYPE(v5) == OBJECT_Actor + + auto type = PID_TYPE(v6); + if (type == OBJECT_Actor && uActiveCharacter && v5 < 0x2000000 && pPlayers[uActiveCharacter]->CanAct() diff -r 785be3f53d9b -r f094bfb4ba31 OSWindow.cpp --- a/OSWindow.cpp Fri Oct 11 10:12:24 2013 +0200 +++ b/OSWindow.cpp Fri Oct 11 10:12:29 2013 +0200 @@ -57,12 +57,16 @@ } +bool _507B98_ctrl_pressed = false; bool OSWindow::WinApiMessageProc(UINT msg, WPARAM wparam, LPARAM lparam, LRESULT *result) { switch (msg) { case WM_KEYUP: { + if (wparam == VK_CONTROL) + _507B98_ctrl_pressed = false; + OnKey(wparam); return *result = 0, true; } @@ -207,6 +211,11 @@ UI_OnKeyDown(wparam); return 0; } + if (wparam == VK_CONTROL) + { + _507B98_ctrl_pressed = true; + return false; + } if ( wparam == VK_ESCAPE ) { pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, window_SpeakInHouse != 0, 0);