Skip to content

Commit

Permalink
Update to v3.5???
Browse files Browse the repository at this point in the history
  • Loading branch information
g0aty committed Jun 22, 2024
1 parent b071587 commit d4f0477
Show file tree
Hide file tree
Showing 12 changed files with 12,752 additions and 3,166 deletions.
11,129 changes: 11,129 additions & 0 deletions appdata/il2cpp-types - Copy.h

Large diffs are not rendered by default.

4,660 changes: 1,554 additions & 3,106 deletions appdata/il2cpp-types.h

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion gui/tabs/host_tab.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace HostTab {
const std::vector<const char*> MAP_NAMES = { "The Skeld", "Mira HQ", "Polus", /*"ehT dlekS", */"Airship", "The Fungle"};
const std::vector<const char*> IMPOSTOR_COUNTS = { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59", "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "90", "91", "92", "93", "94", "95", "96", "97", "98", "99", "100", "101", "102", "103", "104", "105", "106", "107", "108", "109", "110", "111", "112", "113", "114", "115", "116", "117", "118", "119", "120", "121", "122", "123", "124", "125", "126", "127", "128", "129", "130", "131", "132", "133", "134", "135", "136", "137", "138", "139", "140", "141", "142", "143", "144", "145", "146", "147", "148", "149", "150", "151", "152", "153", "154", "155", "156", "157", "158", "159", "160", "161", "162", "163", "164", "165", "166", "167", "168", "169", "170", "171", "172", "173", "174", "175", "176", "177", "178", "179", "180", "181", "182", "183", "184", "185", "186", "187", "188", "189", "190", "191", "192", "193", "194", "195", "196", "197", "198", "199", "200", "201", "202", "203", "204", "205", "206", "207", "208", "209", "210", "211", "212", "213", "214", "215", "216", "217", "218", "219", "220", "221", "222", "223", "224", "225", "226", "227", "228", "229", "230", "231", "232", "233", "234", "235", "236", "237", "238", "239", "240", "241", "242", "243", "244", "245", "246", "247", "248", "249", "250", "251", "252", "253", "254", "255" };
//set it to the maximum player count if you ever want to play a 100 player mod or something like that
const std::vector<const char*> ROLE_NAMES = { "Random", "Crewmate", "Scientist", "Engineer", "Impostor", "Shapeshifter" };
const std::vector<const char*> ROLE_NAMES = { "Random", "Crewmate", "Scientist", "Engineer", "Noisemaker", "Tracker", "Impostor", "Shapeshifter", "Phantom" };
const std::vector<const char*> GAMEENDREASON = { "Crewmates (Votes)", "Crewmates (Tasks)", "Impostors (Votes)", "Impostors (Kill)", "Impostors (Sabotage)", "D/C (Imp)", "D/C (Crew)", "Timer (HNS)", "Kill (HNS)" };
const std::vector<const char*> HOSTCOLORS = { "Red", "Blue", "Green", "Pink", "Orange", "Yellow", "Black", "White", "Purple", "Brown", "Cyan", "Lime", "Maroon", "Rose", "Banana", "Gray", "Tan", "Coral", "Fortegreen" };
void Render();
Expand Down
2 changes: 1 addition & 1 deletion gui/tabs/self_tab.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace SelfTab {
const std::vector<const char*> TPOPTIONS = { "None", "Radar", "Anywhere" };
const std::vector<const char*> FAKEROLES = { "Crewmate", "Impostor", "Scientist", "Engineer", "Guardian Angel", "Shapeshifter", "Crewmate Ghost", "Impostor Ghost" };
const std::vector<const char*> FAKEROLES = { "Crewmate", "Impostor", "Scientist", "Engineer", "Guardian Angel", "Shapeshifter", "Crewmate Ghost", "Impostor Ghost", "Noisemaker", "Phantom", "Tracker" };
const std::vector<const char*> NAMEGENERATION = { "Word Combo", "Random String", "Cycler Names" };
void Render();
}
4 changes: 2 additions & 2 deletions gui/tabs/settings_tab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ namespace SettingsTab {

ImGui::Text("Keep safe mode on in official servers (NA, Europe, Asia) to prevent anticheat detection!");
}
if (openSpoofing) {
if (openSpoofing) {/*
if (ToggleButton("Spoof Guest Account", &State.SpoofGuestAccount)) {
State.Save();
}
Expand All @@ -202,7 +202,7 @@ namespace SettingsTab {
ImGui::Text("It will only apply after restarting the game. For best results, use version.dll!");
if (ImGui::Button("Force Login as Guest")) {
State.ForceLoginAsGuest = true;
}
}*/
if (ToggleButton("Spoof Level", &State.SpoofLevel)) {
State.Save();
}
Expand Down
36 changes: 18 additions & 18 deletions hooks/EOSManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,21 @@ void fakeSuccessfulLogin(EOSManager* eosManager)
}

void dEOSManager_StartInitialLoginFlow(EOSManager* __this, MethodInfo* method) {
if (!State.SpoofGuestAccount) {
//if (!State.SpoofGuestAccount) {
EOSManager_StartInitialLoginFlow(__this, method);
return;
}
EOSManager_StartTempAccountFlow(__this, method);
EOSManager_CloseStartupWaitScreen(__this, method);
//return;
//}
//EOSManager_StartTempAccountFlow(__this, method);
//EOSManager_CloseStartupWaitScreen(__this, method);
}

void dEOSManager_LoginFromAccountTab(EOSManager* __this, MethodInfo* method)
{
EOSManager_LoginFromAccountTab(__this, method);
if (State.SpoofGuestAccount) {
/*if (State.SpoofGuestAccount) {
LOG_DEBUG("Faking login");
fakeSuccessfulLogin(__this);
}
}*/
}

void dEOSManager_InitializePlatformInterface(EOSManager* __this, MethodInfo* method)
Expand All @@ -54,23 +54,23 @@ bool dEOSManager_IsFriendsListAllowed(EOSManager* __this, MethodInfo* method)
}

void dEOSManager_UpdatePermissionKeys(EOSManager* __this, void* callback, MethodInfo* method) {
Il2CppClass* klass = get_class("Assembly-CSharp, EOSManager");
/*Il2CppClass* klass = get_class("Assembly-CSharp, EOSManager");
LOG_ASSERT(klass);
FieldInfo* field = il2cpp_class_get_field_from_name(klass, "isKWSMinor");
LOG_ASSERT(field);
bool value = false;
il2cpp_field_set_value((Il2CppObject*)__this, field, &value);
il2cpp_field_set_value((Il2CppObject*)__this, field, &value);*/

app::EOSManager_UpdatePermissionKeys(__this, callback, method);
}

void dEOSManager_Update(EOSManager* __this, MethodInfo* method) {
static bool hasDeletedDeviceId = false;
__this->fields.ageOfConsent = 0; //why tf does amogus have an age of consent lmao
if (State.SpoofFriendCode && IsHost()) __this->fields.friendCode = convert_to_string(State.FakeFriendCode);
//static bool hasDeletedDeviceId = false;
//__this->fields.ageOfConsent = 0; //why tf does amogus have an age of consent lmao
//if (State.SpoofFriendCode && IsHost()) __this->fields.friendCode = convert_to_string(State.FakeFriendCode);
EOSManager_Update(__this, method);
//EOSManager_set_FriendCode(__this, __this->fields.friendCode, NULL);
if (State.SpoofGuestAccount) {
/*if (State.SpoofGuestAccount) {
auto player = app::DataManager_get_Player(nullptr);
static FieldInfo* field = il2cpp_class_get_field_from_name(player->Il2CppClass.klass, "account");
LOG_ASSERT(field != nullptr);
Expand All @@ -91,9 +91,9 @@ void dEOSManager_Update(EOSManager* __this, MethodInfo* method) {
LOG_DEBUG("Successfully deleted device ID!");
hasDeletedDeviceId = true;
}
}
}*/

if (State.ForceLoginAsGuest) {
/*if (State.ForceLoginAsGuest) {
EOSManager_PlayOffline(__this, NULL);
EOSManager_StartTempAccountFlow(__this, NULL);
auto player = app::DataManager_get_Player(nullptr);
Expand All @@ -112,12 +112,12 @@ void dEOSManager_Update(EOSManager* __this, MethodInfo* method) {
//EditAccountUsername_SaveUsername(username, NULL);
}
State.ForceLoginAsGuest = false; //button behavior
}
}*/

if (!IsHost() && (IsInLobby() || IsInGame())) {
/*if (!IsHost() && (IsInLobby() || IsInGame())) {
auto friendCode = (*Game::pLocalPlayer)->fields.FriendCode;
__this->fields.friendCode = friendCode;
}
}*/
}

String* dEOSManager_get_ProductUserId(EOSManager* __this, MethodInfo* method) {
Expand Down
60 changes: 33 additions & 27 deletions hooks/HudManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ void dHudManager_Update(HudManager* __this, MethodInfo* method) {
__this->fields.Chat->fields.freeChatField->fields.textArea->fields.AllowPaste = State.ChatPaste && !State.PanicMode;
}

/*
static bool DisableActivation = false; //so a ghost seek button doesn't show up
if (State.InMeeting)
Expand All @@ -34,7 +35,7 @@ void dHudManager_Update(HudManager* __this, MethodInfo* method) {
HudManager_SetHudActive(__this, true, NULL);
DisableActivation = true;
}
}
}*/

if ((IsInGame() || IsInLobby())) {
auto localData = GetPlayerData(*Game::pLocalPlayer);
Expand All @@ -44,10 +45,11 @@ void dHudManager_Update(HudManager* __this, MethodInfo* method) {
}
GameObject* shadowLayerObject = Component_get_gameObject((Component_1*)__this->fields.ShadowQuad, NULL);
if (IsInGame() || IsInLobby()) {
GameObject_SetActive(shadowLayerObject,
(State.PanicMode || (!(State.IsRevived || State.FreeCam || State.EnableZoom || State.playerToFollow.has_value() || State.Wallhack || (State.MaxVision && IsInLobby()))))
&& !localData->fields.IsDead,
NULL);
if (shadowLayerObject != NULL)
GameObject_SetActive(shadowLayerObject,
(State.PanicMode || (!(State.IsRevived || State.FreeCam || State.EnableZoom || State.playerToFollow.has_value() || State.Wallhack || (State.MaxVision && IsInLobby()))))
&& !localData->fields.IsDead,
NULL);

if (State.OutfitCooldown == 0) {
if (!State.CanChangeOutfit && IsInLobby() && !State.PanicMode && State.confuser && State.confuseOnJoin)
Expand All @@ -71,20 +73,22 @@ void dHudManager_Update(HudManager* __this, MethodInfo* method) {
app::RoleTypes__Enum role = playerRole != nullptr ? playerRole->fields.Role : app::RoleTypes__Enum::Crewmate;
GameObject* ImpostorVentButton = app::Component_get_gameObject((Component_1*)__this->fields.ImpostorVentButton, NULL);

if (role == RoleTypes__Enum::Engineer && State.UnlockVents && !State.PanicMode)
{
app::EngineerRole* engineerRole = (app::EngineerRole*)playerRole;
if (engineerRole->fields.cooldownSecondsRemaining > 0.0f)
engineerRole->fields.cooldownSecondsRemaining = 0.01f; //This will be deducted below zero on the next FixedUpdate call
engineerRole->fields.inVentTimeRemaining = 30.0f; //Can be anything as it will always be written
}
else if ((GetPlayerData(*Game::pLocalPlayer)->fields.IsDead || IsInLobby()))
{
app::GameObject_SetActive(ImpostorVentButton, false, nullptr);
}
else
{
app::GameObject_SetActive(ImpostorVentButton, (State.UnlockVents && !State.PanicMode) || (((*Game::pLocalPlayer)->fields.inVent && role == RoleTypes__Enum::Engineer)) || (PlayerIsImpostor(localData) && GameOptions().GetGameMode() == GameModes__Enum::Normal), nullptr);
if (ImpostorVentButton != NULL) {
if (role == RoleTypes__Enum::Engineer && State.UnlockVents && !State.PanicMode)
{
app::EngineerRole* engineerRole = (app::EngineerRole*)playerRole;
if (engineerRole->fields.cooldownSecondsRemaining > 0.0f)
engineerRole->fields.cooldownSecondsRemaining = 0.01f; //This will be deducted below zero on the next FixedUpdate call
engineerRole->fields.inVentTimeRemaining = 30.0f; //Can be anything as it will always be written
}
else if ((GetPlayerData(*Game::pLocalPlayer)->fields.IsDead || IsInLobby()))
{
app::GameObject_SetActive(ImpostorVentButton, false, nullptr);
}
else
{
app::GameObject_SetActive(ImpostorVentButton, (State.UnlockVents && !State.PanicMode) || (((*Game::pLocalPlayer)->fields.inVent && role == RoleTypes__Enum::Engineer)) || (PlayerIsImpostor(localData) && GameOptions().GetGameMode() == GameModes__Enum::Normal), nullptr);
}
}

if ((IsInGame() || IsInLobby())) {
Expand All @@ -99,13 +103,15 @@ void dHudManager_Update(HudManager* __this, MethodInfo* method) {
playerInfo->fields.Role->fields.CanBeKilled = false;
}
GameObject* KillButton = app::Component_get_gameObject((Component_1*)__this->fields.KillButton, NULL);
if ((!State.PanicMode && State.UnlockKillButton && !localData->fields.IsDead) || PlayerIsImpostor(localData)) {
app::GameObject_SetActive(KillButton, true, nullptr);
playerRole->fields.CanUseKillButton = true;
}
else {
app::GameObject_SetActive(KillButton, false, nullptr);
playerRole->fields.CanUseKillButton = false;
if (KillButton != NULL) {
if ((!State.PanicMode && State.UnlockKillButton && !localData->fields.IsDead) || PlayerIsImpostor(localData)) {
app::GameObject_SetActive(KillButton, true, nullptr);
playerRole->fields.CanUseKillButton = true;
}
else {
app::GameObject_SetActive(KillButton, false, nullptr);
playerRole->fields.CanUseKillButton = false;
}
}
}
}
Expand Down Expand Up @@ -158,7 +164,7 @@ void dPingTracker_Update(PingTracker* __this, MethodInfo* method) {
}
else {
std::string ping = convert_from_string(app::TMP_Text_get_text((app::TMP_Text*)__this->fields.text, nullptr));
app::TMP_Text_set_alignment((app::TMP_Text*)__this->fields.text, app::TextAlignmentOptions__Enum::TopRight, nullptr);
app::TMP_Text_set_alignment((app::TMP_Text*)__this->fields.text, app::TextAlignmentOptions__Enum::BaselineGeoAligned, nullptr);
app::TMP_Text_set_text((app::TMP_Text*)__this->fields.text, convert_to_string(ping), nullptr);
}
}
Expand Down
4 changes: 2 additions & 2 deletions hooks/InnerNetClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -997,7 +997,7 @@ void dVoteBanSystem_AddVote(VoteBanSystem* __this, int32_t srcClient, int32_t cl
}*/

void dDisconnectPopup_DoShow(DisconnectPopup* __this, MethodInfo* method) {
if (!State.PanicMode) {
/*if (!State.PanicMode) {
switch (State.LastDisconnectReason) {
case DisconnectReasons__Enum::Hacking: {
TMP_Text_set_text((TMP_Text*)__this->fields._textArea,
Expand All @@ -1013,6 +1013,6 @@ void dDisconnectPopup_DoShow(DisconnectPopup* __this, MethodInfo* method) {
}
break;
}
}
}*/
DisconnectPopup_DoShow(__this, method);
}
10 changes: 5 additions & 5 deletions hooks/PlayerControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ void dPlayerControl_FixedUpdate(PlayerControl* __this, MethodInfo* method) {
}
}

if (!playerData || !localData)
return;

if (IsInGame() && State.DisableVents && __this->fields.inVent) {
if (State.rpcCooldown == 0) {
//copy rpc code so that we don't spam the rpc queue
Expand All @@ -77,13 +80,10 @@ void dPlayerControl_FixedUpdate(PlayerControl* __this, MethodInfo* method) {
}
}

if (!playerData || !localData)
return;

app::NetworkedPlayerInfo_PlayerOutfit* outfit = GetPlayerOutfit(playerData, true);
auto outfit = GetPlayerOutfit(playerData, true);
std::string playerName = "<Unknown>";
if (outfit != NULL)
playerName = convert_from_string(NetworkedPlayerInfo_get_PlayerName(playerData, nullptr));
playerName = convert_from_string(outfit->fields.PlayerName);

static int nameDelay = 0;

Expand Down
2 changes: 1 addition & 1 deletion user/state.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ class Settings {
Replay::Reset();
}

std::string SickoVersion = "v4.0_pr4";
std::string SickoVersion = "v3.5_tr0.11";

void Load();
void Save();
Expand Down
2 changes: 1 addition & 1 deletion user/utility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1161,7 +1161,7 @@ float GetDistanceBetweenPoints_ImGui(const ImVec2& p1, const ImVec2& p2)

void ShowHudNotification(std::string text) {
std::string notificationText = "<#fb0>[<#0f0>Sicko</color><#f00>Menu</color>]</color> " + text;
if (IsInGame() || IsInLobby()) NotificationPopper_AddDisconnectMessage(Game::HudManager.GetInstance()->fields.Notifier, convert_to_string(notificationText), NULL);
if (IsInGame() || IsInLobby()) NotificationPopper_AddDisconnectMessage((NotificationPopper*)(Game::HudManager.GetInstance()->fields.Notifier), convert_to_string(notificationText), NULL);
}

void DoPolylineSimplification(std::vector<ImVec2>& inPoints, std::vector<std::chrono::system_clock::time_point>& inTimeStamps, std::vector<ImVec2>& outPoints, std::vector<std::chrono::system_clock::time_point>& outTimeStamps, float sqDistanceThreshold, bool clearInputs)
Expand Down
7 changes: 5 additions & 2 deletions user/utility.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,11 @@ enum class RoleType
Crewmate = 1,
Scientist = 2,
Engineer = 3,
Impostor = 4,
Shapeshifter = 5,
Noisemaker = 4,
Tracker = 5,
Impostor = 6,
Shapeshifter = 7,
Phantom = 8,
};

class RoleRates {
Expand Down

0 comments on commit d4f0477

Please sign in to comment.