Skip to content

Commit

Permalink
Update to v3.7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
g0aty committed Sep 14, 2024
1 parent fdfdf82 commit 4eb18ec
Show file tree
Hide file tree
Showing 38 changed files with 307 additions and 421 deletions.
1 change: 1 addition & 0 deletions FEATURES.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ View the game options!
- **Move While in Vent & Shapeshifting** Allows you to move in vent and while shapeshifting (Default: OFF)
- **Always Move** Allows you to move in meetings and game menus such as tasks (Default: OFF)
- **Shapeshift without Animation** Allows you to shapeshift without the animation (Default: OFF)
- **Copy Lobby Code on Disconnect** Automatically copies the lobby code to your clipboard when you get disconnected unintentionally (Default: OFF)
- **NoClip** Allows you to walk through walls (Default: OFF)
- **Kill Other Impostors** *(Only with Safe Mode disabled)* Allows you to kill fellow impostors (Default: OFF)
- **Unlock Kill Button** *(Only with Safe Mode disabled)* Allows you to use kill button at any time (Default: OFF)
Expand Down
258 changes: 0 additions & 258 deletions FEATURES.md.backup

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# 👺 SickoMenu v3.7
A powerful utility for Among Us that aims to enhance the game experience!
# 👺 SickoMenu v3.7.2
A powerful utility for Among Us that aims to improve the game experience!

Join our very own Discord server for support, bug reports, and sneak peeks!
### Vanity invite: https://discord.gg/sickos
Expand Down
3 changes: 2 additions & 1 deletion gui/tabs/debug_tab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ namespace DebugTab {

ImGui::Dummy(ImVec2(4, 4) * State.dpiScale);

ToggleButton("Log Unity Debug Messages", &State.ShowUnityLogs);
if (ToggleButton("Log Unity Debug Messages", &State.ShowUnityLogs)) State.Save();
if (ToggleButton("Log Hook Debug Messages", &State.ShowHookLogs)) State.Save();

ImGui::Dummy(ImVec2(4, 4) * State.dpiScale);

Expand Down
147 changes: 79 additions & 68 deletions gui/tabs/players_tab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,73 +125,84 @@ namespace PlayersTab {

if (selectedPlayer.has_value() && selectedPlayers.size() == 1) //Upon first startup no player is selected. Also rare case where the playerdata is deleted before the next gui cycle
{
bool isUsingMod = selectedPlayer.is_LocalPlayer() || State.modUsers.find(selectedPlayer.get_PlayerData()->fields.PlayerId) != State.modUsers.end();
ImGui::Text("Is using Modified Client: %s", isUsingMod ? "Yes" : "No");
if (isUsingMod)
ImGui::Text("Client Name: %s", selectedPlayer.is_LocalPlayer() ? "SickoMenu" : RemoveHtmlTags(State.modUsers.at(selectedPlayer.get_PlayerData()->fields.PlayerId)).c_str());
std::uint8_t playerId = selectedPlayer.get_PlayerData()->fields.PlayerId;
std::string playerIdText = std::format("Player ID: {}", playerId);
ImGui::Text(const_cast<char*>(playerIdText.c_str()));
std::string friendCode = convert_from_string(selectedPlayer.get_PlayerData()->fields.FriendCode);
std::string friendCodeText = std::format("Friend Code: {}", (!IsStreamerMode()) ? friendCode : ((friendCode != "") ? friendCode.substr(0, 1) + "..." : ""));
if (friendCode != "") {
ImGui::Text(const_cast<char*>(friendCodeText.c_str()));
}
std::string puid = convert_from_string(selectedPlayer.get_PlayerData()->fields.Puid);
std::string puidText = std::format("PUID:\n{}", (!IsStreamerMode()) ? puid : ((puid != "") ? puid.substr(0, 1) + "..." : ""));
if (puid != "") {
ImGui::Text(const_cast<char*>(puidText.c_str()));
}
uint32_t playerLevel = selectedPlayer.get_PlayerData()->fields.PlayerLevel + 1;
std::string levelText = std::format("Level: {}", playerLevel);
ImGui::Text(const_cast<char*>(levelText.c_str()));
std::string platform = "Unknown";
auto client = app::InnerNetClient_GetClientFromCharacter((InnerNetClient*)(*Game::pAmongUsClient), selectedPlayer.get_PlayerControl(), NULL);
if (GetPlayerControlById(selectedPlayer.get_PlayerData()->fields.PlayerId)->fields._.OwnerId == client->fields.Id) {
switch (client->fields.PlatformData->fields.Platform) {
case Platforms__Enum::StandaloneEpicPC:
platform = "Epic Games (PC)";
break;
case Platforms__Enum::StandaloneSteamPC:
platform = "Steam (PC)";
break;
case Platforms__Enum::StandaloneMac:
platform = "Mac";
break;
case Platforms__Enum::StandaloneWin10:
platform = "Microsoft Store (PC)";
break;
case Platforms__Enum::StandaloneItch:
platform = "itch.io (PC)";
break;
case Platforms__Enum::IPhone:
platform = "iOS/iPadOS (Mobile)";
break;
case Platforms__Enum::Android:
platform = "Android (Mobile)";
break;
case Platforms__Enum::Switch:
platform = "Nintendo Switch (Console)";
break;
case Platforms__Enum::Xbox:
platform = "Xbox (Console)";
break;
case Platforms__Enum::Playstation:
platform = "Playstation (Console)";
break;
default:
platform = "Unknown";
break;
if ((IsInMultiplayerGame() || IsInLobby()) || (selectedPlayer.has_value() && selectedPlayer.is_LocalPlayer())) {
bool isUsingMod = selectedPlayer.is_LocalPlayer() || State.modUsers.find(selectedPlayer.get_PlayerData()->fields.PlayerId) != State.modUsers.end();
ImGui::Text("Is using Modified Client: %s", isUsingMod ? "Yes" : "No");
if (isUsingMod)
ImGui::Text("Client Name: %s", selectedPlayer.is_LocalPlayer() ? "SickoMenu" : RemoveHtmlTags(State.modUsers.at(selectedPlayer.get_PlayerData()->fields.PlayerId)).c_str());
std::uint8_t playerId = selectedPlayer.get_PlayerData()->fields.PlayerId;
std::string playerIdText = std::format("Player ID: {}", playerId);
ImGui::Text(const_cast<char*>(playerIdText.c_str()));
std::string friendCode = convert_from_string(selectedPlayer.get_PlayerData()->fields.FriendCode);
std::string friendCodeText = std::format("Friend Code: {}", (!IsStreamerMode()) ? friendCode : ((friendCode != "") ? friendCode.substr(0, 1) + "..." : ""));
if (friendCode != "") {
ImGui::Text(const_cast<char*>(friendCodeText.c_str()));
}
std::string puid = convert_from_string(selectedPlayer.get_PlayerData()->fields.Puid);
std::string puidText = std::format("PUID:\n{}", (!IsStreamerMode()) ? puid : ((puid != "") ? puid.substr(0, 1) + "..." : ""));
if (puid != "") {
ImGui::Text(const_cast<char*>(puidText.c_str()));
}
uint32_t playerLevel = selectedPlayer.get_PlayerData()->fields.PlayerLevel + 1;
std::string levelText = std::format("Level: {}", playerLevel);
ImGui::Text(const_cast<char*>(levelText.c_str()));
std::string platform = "Unknown";
auto client = app::InnerNetClient_GetClientFromCharacter((InnerNetClient*)(*Game::pAmongUsClient), selectedPlayer.get_PlayerControl(), NULL);
if (GetPlayerControlById(selectedPlayer.get_PlayerData()->fields.PlayerId)->fields._.OwnerId == client->fields.Id) {
switch (client->fields.PlatformData->fields.Platform) {
case Platforms__Enum::StandaloneEpicPC:
platform = "Epic Games (PC)";
break;
case Platforms__Enum::StandaloneSteamPC:
platform = "Steam (PC)";
break;
case Platforms__Enum::StandaloneMac:
platform = "Mac";
break;
case Platforms__Enum::StandaloneWin10:
platform = "Microsoft Store (PC)";
break;
case Platforms__Enum::StandaloneItch:
platform = "itch.io (PC)";
break;
case Platforms__Enum::IPhone:
platform = "iOS/iPadOS (Mobile)";
break;
case Platforms__Enum::Android:
platform = "Android (Mobile)";
break;
case Platforms__Enum::Switch:
platform = "Nintendo Switch (Console)";
break;
case Platforms__Enum::Xbox:
platform = "Xbox (Console)";
break;
case Platforms__Enum::Playstation:
platform = "Playstation (Console)";
break;
default:
platform = "Unknown";
break;
}
}
std::string platformText = std::format("Platform: {}", platform);
ImGui::Text(platformText.c_str());
uint64_t psnId = client->fields.PlatformData->fields.PsnPlatformId;
std::string psnText = std::format("PSN Platform ID: {}", psnId);
if (psnId != 0) ImGui::Text(const_cast<char*>(psnText.c_str()));
uint64_t xboxId = client->fields.PlatformData->fields.XboxPlatformId;
std::string xboxText = std::format("Xbox Platform ID: {}", xboxId);
if (xboxId != 0) ImGui::Text(const_cast<char*>(xboxText.c_str()));
}
else {
ImGui::Text("Is using Modified Client: No");
std::uint8_t playerId = selectedPlayer.get_PlayerData()->fields.PlayerId;
std::string playerIdText = std::format("Player ID: {}", playerId);
ImGui::Text(const_cast<char*>(playerIdText.c_str()));
uint32_t playerLevel = selectedPlayer.get_PlayerData()->fields.PlayerLevel + 1;
std::string levelText = std::format("Level: {}", playerLevel);
ImGui::Text(const_cast<char*>(levelText.c_str()));
}
std::string platformText = std::format("Platform: {}", platform);
ImGui::Text(platformText.c_str());
uint64_t psnId = client->fields.PlatformData->fields.PsnPlatformId;
std::string psnText = std::format("PSN Platform ID: {}", psnId);
if (psnId != 0) ImGui::Text(const_cast<char*>(psnText.c_str()));
uint64_t xboxId = client->fields.PlatformData->fields.XboxPlatformId;
std::string xboxText = std::format("Xbox Platform ID: {}", xboxId);
if (xboxId != 0) ImGui::Text(const_cast<char*>(xboxText.c_str()));
}

ImGui::EndChild();
Expand Down Expand Up @@ -679,7 +690,7 @@ namespace PlayersTab {
{
if (ImGui::Button("Reset Impersonation"))
{
ResetOriginalAppearance();
ControlAppearance(false);
}
}

Expand Down Expand Up @@ -869,14 +880,14 @@ namespace PlayersTab {

if ((IsInGame() || IsInLobby()) && selectedPlayer.has_value() && selectedPlayers.size() == 1)
{
if ((State.playerToAttach.equals(State.selectedPlayer) && State.ActiveAttach) || (selectedPlayer.is_LocalPlayer() && selectedPlayer.has_value())) {
if (State.ActiveAttach && selectedPlayer.has_value() && (State.playerToAttach.equals(State.selectedPlayer) || selectedPlayer.is_LocalPlayer())) {
if (ImGui::Button("Stop Attaching")) {
State.playerToAttach = {};
State.ActiveAttach = false;
}
}
else {
if (ImGui::Button("Attach To") && !selectedPlayer.is_LocalPlayer()) {
if (!selectedPlayer.is_LocalPlayer() && ImGui::Button("Attach To")) {
State.playerToAttach = State.selectedPlayer;
State.ActiveAttach = true;
}
Expand Down
4 changes: 4 additions & 0 deletions gui/tabs/self_tab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,10 @@ namespace SelfTab {
if (ToggleButton("No Shapeshift Animation", &State.AnimationlessShapeshift)) {
State.Save();
}
ImGui::SameLine();
if (ToggleButton("Copy Lobby Code on Disconnect", &State.AutoCopyLobbyCode)) {
State.Save();
}

if (ToggleButton("NoClip", &State.NoClip)) {
State.Save();
Expand Down
1 change: 1 addition & 0 deletions hooks/AccountManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "state.hpp"

void dAccountManager_UpdateKidAccountDisplay(AccountManager* __this, MethodInfo* method) {
if (State.ShowHookLogs) LOG_DEBUG("Hook dAccountManager_UpdateKidAccountDisplay executed");
// grant permissions
if (!State.PanicMode) {
__this->fields.freeChatAllowed = KWSPermissionStatus__Enum::Granted;
Expand Down
2 changes: 2 additions & 0 deletions hooks/AirshipStatus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

void dAirshipStatus_OnEnable(AirshipStatus* __this, MethodInfo* method)
{
if (State.ShowHookLogs) LOG_DEBUG("Hook dAirshipStatus_OnEnable executed");
AirshipStatus_OnEnable(__this, method);
State.mapType = Settings::MapType::Airship;
try {
Expand Down Expand Up @@ -40,6 +41,7 @@ void dAirshipStatus_OnEnable(AirshipStatus* __this, MethodInfo* method)
}

float dAirshipStatus_CalculateLightRadius(AirshipStatus* __this, NetworkedPlayerInfo* player, MethodInfo* method) {
if (State.ShowHookLogs) LOG_DEBUG("Hook dAirshipStatus_CalculateLightRadius executed");
if (!State.PanicMode && State.MaxVision)
return 420.F;
return AirshipStatus_CalculateLightRadius(__this, player, method);
Expand Down
18 changes: 4 additions & 14 deletions hooks/Camera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,16 @@ static bool refreshChat = true;

Vector3 dCamera_ScreenToWorldPoint(Camera* __this, Vector3 position, MethodInfo* method)
{
if (State.ShowHookLogs) LOG_DEBUG("Hook dCamera_ScreenToWorldPoint executed");
try {
if (!State.PanicMode && (State.GameLoaded || IsInLobby()))
{
auto chatState = Game::HudManager.GetInstance()->fields.Chat->fields.state;
bool chatOpen = chatState == ChatControllerState__Enum::Open || chatState == ChatControllerState__Enum::Opening || chatState == ChatControllerState__Enum::Closing;
/*//Figured it is better to restore the current camera height than using state
//Figured it is better to restore the current camera height than using state
float orthographicSize = Camera_get_orthographicSize(__this, NULL);
Camera_set_orthographicSize(__this, 3.0f, NULL);
Vector3 ret = Camera_ScreenToWorldPoint(__this, position, method);
Camera_set_orthographicSize(__this, orthographicSize, NULL);
return ret;*/
float newCamHeight = 3.f * ((State.EnableZoom && !State.InMeeting && !chatOpen) ? State.CameraHeight : 1.f);
if (camHeight != newCamHeight) {
camHeight = newCamHeight;
float orthographicSize = Camera_get_orthographicSize(__this, NULL);
Camera_set_orthographicSize(__this, 3.0f, NULL);
Vector3 ret = Camera_ScreenToWorldPoint(__this, position, method);
Camera_set_orthographicSize(__this, camHeight, NULL);
Screen_SetResolution_1(Screen_get_width(NULL), Screen_get_height(NULL), Screen_get_fullScreen(NULL), 165, NULL);
return ret;
}
return ret;
}
}
catch (...) {
Expand All @@ -40,6 +29,7 @@ Vector3 dCamera_ScreenToWorldPoint(Camera* __this, Vector3 position, MethodInfo*
}

void dFollowerCamera_Update(FollowerCamera* __this, MethodInfo* method) {
if (State.ShowHookLogs) LOG_DEBUG("Hook dFollowerCamera_Update executed");
try {
if (!State.PanicMode) {
if (auto playerToFollow = State.playerToFollow.validate(); playerToFollow.has_value())
Expand Down
19 changes: 8 additions & 11 deletions hooks/Chat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ static std::string strToLower(std::string str) {
}

void dChatController_AddChat(ChatController* __this, PlayerControl* sourcePlayer, String* chatText, bool censor, MethodInfo* method) {
if (State.ShowHookLogs) LOG_DEBUG("Hook dChatController_AddChat executed");
if (!State.PanicMode) {
auto player = GetPlayerData(sourcePlayer);
auto local = GetPlayerData(*Game::pLocalPlayer);
Expand Down Expand Up @@ -82,6 +83,7 @@ void dChatController_AddChat(ChatController* __this, PlayerControl* sourcePlayer
}

void dChatController_SetVisible(ChatController* __this, bool visible, MethodInfo* method) {
if (State.ShowHookLogs) LOG_DEBUG("Hook dChatController_SetVisible executed");
if (State.ChatAlwaysActive && !State.PanicMode)
ChatController_SetVisible(__this, true, method);
else
Expand All @@ -92,6 +94,7 @@ void dChatController_SetVisible(ChatController* __this, bool visible, MethodInfo
}

void dChatBubble_SetName(ChatBubble* __this, String* playerName, bool isDead, bool voted, Color color, MethodInfo* method) {
if (State.ShowHookLogs) LOG_DEBUG("Hook dChatBubble_SetName executed");
if (!State.PanicMode && (IsInGame() || IsInLobby())) {
for (auto playerData : GetAllPlayerData()) {
auto outfit = GetPlayerOutfit(playerData);
Expand Down Expand Up @@ -141,6 +144,7 @@ void dChatBubble_SetName(ChatBubble* __this, String* playerName, bool isDead, bo

void dChatController_Update(ChatController* __this, MethodInfo* method)
{
if (State.ShowHookLogs) LOG_DEBUG("Hook dChatController_Update executed");
__this->fields.freeChatField->fields.textArea->fields.characterLimit = State.SafeMode ? 120 : 2147483647;
__this->fields.freeChatField->fields.textArea->fields.allowAllCharacters = true;
__this->fields.freeChatField->fields.textArea->fields.AllowEmail = true;
Expand Down Expand Up @@ -204,17 +208,6 @@ void dChatController_Update(ChatController* __this, MethodInfo* method)
State.ChatCooldown = __this->fields.timeSinceLastMessage;
State.ChatFocused = __this->fields.freeChatField->fields.textArea->fields.hasFocus;

/*if (State.FollowerCam != nullptr && !State.PanicMode && State.EnableZoom &&
(__this->fields.state == ChatControllerState__Enum::Closed || (__this->fields.state == ChatControllerState__Enum::Closing && State.EnableZoom))) {
Camera_set_orthographicSize(State.FollowerCam, 3.f, NULL);
int32_t width = Screen_get_width(NULL);
int32_t height = Screen_get_height(NULL);
bool fullscreen = Screen_get_fullScreen(NULL);
ChatController_OnResolutionChanged(__this, (float)(width / height), width, height, fullscreen, NULL);
if (__this->fields.state == ChatControllerState__Enum::Closing && State.EnableZoom) ChatController_ForceClosed(__this, NULL); //force close the chat as it stays open otherwise
Camera_set_orthographicSize(State.FollowerCam, 3.f * (State.EnableZoom ? State.CameraHeight : 1.f), NULL);
}*/

if (!State.PanicMode && State.SafeMode && State.ChatSpam && (IsInGame() || IsInLobby()) && __this->fields.timeSinceLastMessage >= 3.5f) {
PlayerControl_RpcSendChat(*Game::pLocalPlayer, convert_to_string(State.chatMessage), NULL);
//remove rpc queue stuff cuz of delay and anticheat kick
Expand All @@ -227,6 +220,7 @@ void dChatController_Update(ChatController* __this, MethodInfo* method)

bool dTextBoxTMP_IsCharAllowed(TextBoxTMP* __this, uint16_t unicode_char, MethodInfo* method)
{
if (State.ShowHookLogs) LOG_DEBUG("Hook dTextBoxTMP_IsCharAllowed executed");
//0x08 is backspace, 0x0D is carriage return, 0x7F is delete character, 0x3C is <, 0x3E is >
//lobby codes force uppercase, and we don't change that to fix joining a lobby with code not working
if (!__this->fields.ForceUppercase) return (unicode_char != 0x08 && unicode_char != 0x0D && unicode_char != 0x7F && ((State.SafeMode && unicode_char != 0x3C && unicode_char != 0x3E) || !State.SafeMode));
Expand All @@ -235,6 +229,7 @@ bool dTextBoxTMP_IsCharAllowed(TextBoxTMP* __this, uint16_t unicode_char, Method

void dTextBoxTMP_SetText(TextBoxTMP* __this, String* input, String* inputCompo, MethodInfo* method)
{
if (State.ShowHookLogs) LOG_DEBUG("Hook dTextBoxTMP_SetText executed");
if (!State.PanicMode) {
if (!State.SafeMode)
__this->fields.characterLimit = 2147483647;
Expand All @@ -249,6 +244,7 @@ void dTextBoxTMP_SetText(TextBoxTMP* __this, String* input, String* inputCompo,

void dPlayerControl_RpcSendChat(PlayerControl* __this, String* chatText, MethodInfo* method)
{
if (State.ShowHookLogs) LOG_DEBUG("Hook dPlayerControl_RpcSendChat executed");
if (!State.PanicMode) {
auto playerToChatAs = (!State.SafeMode && State.activeChatSpoof && State.playerToChatAs.has_value()) ? State.playerToChatAs.validate().get_PlayerControl() : *Game::pLocalPlayer;
if (State.ReadAndSendAumChat && convert_from_string(chatText).substr(0, 5) == "/aum ") {
Expand Down Expand Up @@ -294,6 +290,7 @@ void dPlayerControl_RpcSendChat(PlayerControl* __this, String* chatText, MethodI
}

void dChatBubble_SetText(ChatBubble* __this, String* chatText, MethodInfo* method) {
if (State.ShowHookLogs) LOG_DEBUG("Hook dChatBubble_SetText executed");
if (State.DarkMode) {
auto black = Palette__TypeInfo->static_fields->Black;
if (__this->fields.playerInfo->fields.IsDead) black.a *= 0.75f;
Expand Down
2 changes: 2 additions & 0 deletions hooks/Dleks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@
}*/

int32_t dConstants_1_GetBroadcastVersion(MethodInfo* method) {
if (State.ShowHookLogs) LOG_DEBUG("Hook dConstants_1_GetBroadcastVersion executed");
int32_t orig_return = Constants_1_GetBroadcastVersion(method);
if (State.DisableHostAnticheat) orig_return += 25;
return orig_return;
}

bool dConstants_1_IsVersionModded(MethodInfo* method) {
if (State.ShowHookLogs) LOG_DEBUG("Hook dConstants_1_IsVersionModded executed");
if (State.DisableHostAnticheat) return true; //this helps to bypass anticheat in our hosted lobbies
//return false;
return Constants_1_IsVersionModded(method);
Expand Down
Loading

0 comments on commit 4eb18ec

Please sign in to comment.