diff --git a/src/game/Game.h b/src/game/Game.h index 21f877b..07e2d79 100644 --- a/src/game/Game.h +++ b/src/game/Game.h @@ -95,7 +95,7 @@ struct GameTracker int field_24; int field_28; int field_2C; - int field_30; + int streamFlags; int field_34; char baseAreaName[128]; diff --git a/src/modules/MainMenu.cpp b/src/modules/MainMenu.cpp index 40327d8..fe71d64 100644 --- a/src/modules/MainMenu.cpp +++ b/src/modules/MainMenu.cpp @@ -68,4 +68,25 @@ void MainMenu::OnFrame() font->SetCursor(5.f, 430.f); font->Print("TRLAU-Menu-Hook"); } +} + +void MainMenu::OnInput(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + auto gameTracker = Game::GetGameTracker(); + + // Freeze the game + if (msg == WM_KEYUP && wParam == VK_F3) + { + gameTracker->streamFlags ^= 0x1000; + } + + // Ragdoll death + if (msg == WM_KEYUP && wParam == VK_F11) + { +#ifndef TR8 + INSTANCE_Post(gameTracker->playerInstance, 262167, 3); +#else + INSTANCE_Post(gameTracker->playerInstance, 4, 3); +#endif + } } \ No newline at end of file diff --git a/src/modules/MainMenu.h b/src/modules/MainMenu.h index 7bfb723..8bf0811 100644 --- a/src/modules/MainMenu.h +++ b/src/modules/MainMenu.h @@ -10,4 +10,5 @@ class MainMenu : public Module public: void OnDraw(); void OnFrame(); + void OnInput(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); }; \ No newline at end of file