# HG changeset patch # User Nomad # Date 1381480872 -7200 # Node ID 5ea627a263dd1de43350ba2ffc979adb7c9edcf2 # Parent e4e27261d84ef65ac273a1585f779e7166c82273 Clicking works again diff -r e4e27261d84e -r 5ea627a263dd Mouse.cpp --- a/Mouse.cpp Fri Oct 11 07:29:14 2013 +0200 +++ b/Mouse.cpp Fri Oct 11 10:41:12 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 e4e27261d84e -r 5ea627a263dd OSWindow.cpp --- a/OSWindow.cpp Fri Oct 11 07:29:14 2013 +0200 +++ b/OSWindow.cpp Fri Oct 11 10:41:12 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);