Mercurial > mm7
changeset 1841:f094bfb4ba31
Merge
author | Grumpy7 |
---|---|
date | Fri, 11 Oct 2013 10:12:29 +0200 |
parents | 785be3f53d9b (current diff) 5ea627a263dd (diff) |
children | 175bf8da83d9 |
files | |
diffstat | 2 files changed, 15 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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()
--- 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);