diff --git a/Source/Contents/Actors/RenderObject.cpp b/Source/Contents/Actors/RenderObject.cpp index 0f5748671..67d263189 100644 --- a/Source/Contents/Actors/RenderObject.cpp +++ b/Source/Contents/Actors/RenderObject.cpp @@ -3498,8 +3498,11 @@ bool CGrannyCorpse3d::OnProcess() { this->alpha = static_cast(600 - tick); } - this->tick = tick + 1; - return tick <= 600; + if (this->tick++ > 600) { + return false; + } + + return true; } // OFFSET: 0x00CC7D50 diff --git a/Source/Contents/Hotkeys/UserHotkeyMgr.cpp b/Source/Contents/Hotkeys/UserHotkeyMgr.cpp index a90580c44..77b230092 100644 --- a/Source/Contents/Hotkeys/UserHotkeyMgr.cpp +++ b/Source/Contents/Hotkeys/UserHotkeyMgr.cpp @@ -147,16 +147,19 @@ void CUserHotkeyMgr::Shutdown() { // OFFSET: 0x005F80A0 // FUNCTION: fn_04058 int CUserHotkeyMgr::TabAt(int position) const { + int tab = 0; switch (position) { case 1: - return 3; + tab = 3; + break; case 2: - return 1; + tab = 1; + break; case 3: - return 2; - default: - return 0; + tab = 2; + break; } + return tab; } // OFFSET: 0x005F88D0 diff --git a/Source/UI/UIMacroUserInfoWnd.cpp b/Source/UI/UIMacroUserInfoWnd.cpp index 5388df637..04d4ec8f2 100644 --- a/Source/UI/UIMacroUserInfoWnd.cpp +++ b/Source/UI/UIMacroUserInfoWnd.cpp @@ -235,11 +235,11 @@ void UIMacroUserInfoWnd::Paint() { // OFFSET: 0x007F1160 // FUNCTION: fn_09850 void UIMacroReporterWnd::Slot25(int x, int y) { - if (this->unknown_010C == 1 && y >= 18) { + if (this->unknown_010C == 1 && y > 17) { return; } - if (g_windowMgr.lastWindowId != this->geometry.id) { + if (this->geometry.id != g_windowMgr.lastWindowId) { g_windowMgr.BringToFront(this->geometry.id); g_windowMgr.lastWindowId = this->geometry.id; } diff --git a/Source/Utility/RegistryKey.cpp b/Source/Utility/RegistryKey.cpp index 2da5d58e5..a709a55e0 100644 --- a/Source/Utility/RegistryKey.cpp +++ b/Source/Utility/RegistryKey.cpp @@ -26,5 +26,8 @@ bool RegistryKey::Query(const char* name, DWORD expectedType, BYTE* data, DWORD // OFFSET: 0x00AED0C0 // FUNCTION: fn_18153 bool RegistryKey::Set(const char* name, DWORD type, const BYTE* data, DWORD size) { - return this->handle != nullptr && RegSetValueExA(this->handle, name, 0, type, data, size) == ERROR_SUCCESS; + if (this->handle != nullptr) { + return RegSetValueExA(this->handle, name, 0, type, data, size) == ERROR_SUCCESS; + } + return false; }