diff --git a/README.md b/README.md index 4ea9dce..f7a25a0 100644 --- a/README.md +++ b/README.md @@ -11,8 +11,10 @@ Libraries and software used to create this cheat include magic_enum, Dear IMGUI, ## Features: - Force a meeting +- Force end a meeting - NoClip - Mark imposters +- Show Ghosts - Radar (courtesy of [v0idp](https://github.com/v0idp)) - Reset disconnection ban time - Spam chat, and force other players to spam diff --git a/user/CWState.cpp b/user/CWState.cpp index 27bea1c..63a32ba 100644 --- a/user/CWState.cpp +++ b/user/CWState.cpp @@ -17,6 +17,7 @@ namespace CWState bool NoClip = false; bool MarkImposters = false; + bool ShowGhosts = false; bool ShowRadar = false; float RadarZoom = 8.0F; diff --git a/user/CWState.hpp b/user/CWState.hpp index a68a985..0f160d8 100644 --- a/user/CWState.hpp +++ b/user/CWState.hpp @@ -18,6 +18,7 @@ namespace CWState extern bool NoClip; extern bool MarkImposters; + extern bool ShowGhosts; extern bool ShowRadar; extern float RadarZoom; diff --git a/user/GameUtility.cpp b/user/GameUtility.cpp index d7e10fb..4bd742f 100644 --- a/user/GameUtility.cpp +++ b/user/GameUtility.cpp @@ -58,8 +58,7 @@ bool CheckColorAvailable(uint8_t color) bool IsInGame() { - return (*AmongUsClient__TypeInfo)->static_fields->Instance->fields._.GameState == InnerNetClient_GameStates__Enum_Joined - || (*AmongUsClient__TypeInfo)->static_fields->Instance->fields._.GameState == InnerNetClient_GameStates__Enum_Started; + return (*AmongUsClient__TypeInfo)->static_fields->Instance->fields._.GameState == InnerNetClient_GameStates__Enum_Started; } CorrectedColor32 GetPlayerColor(uint8_t colorId) diff --git a/user/main.cpp b/user/main.cpp index 5b6b0c1..addeb7c 100644 --- a/user/main.cpp +++ b/user/main.cpp @@ -132,13 +132,16 @@ HRESULT __stdcall D3D_FUNCTION_HOOK(IDXGISwapChain* pThis, UINT SyncInterval, UI ImGui::Spacing(); if (ImGui::CollapsingHeader("Game")) - { - if (ImGui::Button("Call Meeting")) - { - PlayerControl_CmdReportDeadBody((*PlayerControl__TypeInfo)->static_fields->LocalPlayer, NULL, NULL); - } + { + if (ImGui::Button("Call Meeting")) + PlayerControl_CmdReportDeadBody((*PlayerControl__TypeInfo)->static_fields->LocalPlayer, NULL, NULL); + + if (ImGui::Button("End Meeting")) + MeetingHud_ForceSkipAll((*MeetingHud__TypeInfo)->static_fields->Instance, NULL); + ImGui::Checkbox("NoClip", &CWState::NoClip); ImGui::Checkbox("Mark Imposters", &CWState::MarkImposters); + ImGui::Checkbox("Show Ghosts", &CWState::ShowGhosts); ImGui::Checkbox("Radar", &CWState::ShowRadar); ImGui::Text("Radar Zoom"); ImGui::SliderFloat("##RadarZoom", &CWState::RadarZoom, 4.0F, 16.0F, "%.f", 1.0F); @@ -626,6 +629,16 @@ void HudHook(MethodInfo* m) GameObject_set_layer(comp, LayerMask_NameToLayer(CreateNETStringFromANSI("Ghost"), NULL), NULL); } + if (CWState::ShowGhosts) { + + for (auto player : GetAllPlayers()) + { + auto data = GetPlayerData(player); + if (!PlayerControl_get_Visible(player, NULL) && data->fields.IsDead) + PlayerControl_set_Visible(player, true, NULL); + } + } + if (CWState::MarkImposters) for (auto player : GetAllPlayers()) { diff --git a/user/radar.cpp b/user/radar.cpp index 1027999..e4a4e93 100644 --- a/user/radar.cpp +++ b/user/radar.cpp @@ -23,6 +23,8 @@ namespace Radar { } void RenderRadar(bool* state, float radarZoom) { + if (IsInGame()) + { ImGui::SetNextWindowSize(ImVec2(256, 256)); ImGui::SetNextWindowSizeConstraints(ImVec2(0, 0), ImVec2(FLT_MAX, FLT_MAX), SquareConstraint); @@ -42,8 +44,7 @@ namespace Radar { drawList->AddLine(ImVec2(winpos.x, winpos.y + winsize.y * 0.5F), ImVec2(winpos.x + winsize.x, winpos.y + winsize.y * 0.5F), ImColor(70, 70, 70, 255), 1.0F); - if (IsInGame()) - { + PlayerControl* localPlayer = (*PlayerControl__TypeInfo)->static_fields->LocalPlayer; if (!localPlayer) {