Skip to content

Commit

Permalink
Update to v3.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
g0aty committed Jul 5, 2024
1 parent a6c855c commit 51a275c
Show file tree
Hide file tree
Showing 14 changed files with 60 additions and 60 deletions.
5 changes: 3 additions & 2 deletions appdata/il2cpp-functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ DO_APP_FUNC(void, NetHelpers_WriteVector2, (Vector2 vec, MessageWriter* writer,
DO_APP_FUNC(void, AccountTab_Open, (AccountTab* __this, MethodInfo* method), "Assembly-CSharp, System.Void AccountTab::Open()");
DO_APP_FUNC(void, FullAccount_CanSetCustomName, (FullAccount* __this, bool canSetName, MethodInfo* method), "Assembly-CSharp, System.Void FullAccount::CanSetCustomName(System.Boolean)");
DO_APP_FUNC(void, FollowerCamera_Update, (FollowerCamera* __this, MethodInfo* method), "Assembly-CSharp, System.Void FollowerCamera::Update()");
DO_APP_FUNC(void, AmongUsClient_OnGameEnd, (AmongUsClient* __this, Object* endGameResult, MethodInfo* method), "Assembly-CSharp, System.Void AmongUsClient::OnGameEnd(EndGameResult)");
DO_APP_FUNC(void, AmongUsClient_OnGameEnd, (AmongUsClient* __this, void* endGameResult, MethodInfo* method), "Assembly-CSharp, System.Void AmongUsClient::OnGameEnd(EndGameResult)");

DO_APP_FUNC(void, Debug_Log, (Object* message, MethodInfo* method), "UnityEngine.CoreModule, System.Void UnityEngine.Debug::Log(System.Object)");
DO_APP_FUNC(void, Debug_LogError, (Object* message, MethodInfo* method), "UnityEngine.CoreModule, System.Void UnityEngine.Debug::LogError(System.Object)");
Expand Down Expand Up @@ -329,4 +329,5 @@ DO_APP_FUNC(void, GameOptionsManager_set_GameHostOptions, (GameOptionsManager* _
DO_APP_FUNC(void, LogicOptions_SyncOptions, (LogicOptions* __this, MethodInfo* method), "Assembly-CSharp, System.Void LogicOptions::SyncOptions()");
DO_APP_FUNC(void, EOSManager_PlayOffline, (EOSManager* __this, MethodInfo* method), "Assembly-CSharp, System.Void EOSManager::PlayOffline()");
DO_APP_FUNC(void, DisconnectPopup_DoShow, (DisconnectPopup* __this, MethodInfo* method), "Assembly-CSharp, System.Void DisconnectPopup::DoShow()");
DO_APP_FUNC(bool, NetworkedPlayerInfo_Serialize, (NetworkedPlayerInfo* __this, MessageWriter* writer, bool initialState, MethodInfo* method), "Assembly-CSharp, System.Boolean NetworkedPlayerInfo::Serialize(Hazel.MessageWriter, System.Boolean)");
DO_APP_FUNC(bool, NetworkedPlayerInfo_Serialize, (NetworkedPlayerInfo* __this, MessageWriter* writer, bool initialState, MethodInfo* method), "Assembly-CSharp, System.Boolean NetworkedPlayerInfo::Serialize(Hazel.MessageWriter, System.Boolean)");
DO_APP_FUNC(bool, GameManager_DidImpostorsWin, (GameManager* __this, GameOverReason__Enum reason, MethodInfo* method), "Assembly-CSharp, System.Boolean GameManager::DidImpostorsWin(GameOverReason)");
8 changes: 7 additions & 1 deletion gui/esp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ImGuiWindow* CurrentWindow = nullptr;

static void RenderText(std::string_view text, const ImVec2& pos, const ImVec4& color, const bool outlined = true, const bool centered = true)
{
if (text.empty()) return;
if (text.empty() || State.PanicMode) return;
ImVec2 ImScreen = pos;
if (centered)
{
Expand All @@ -31,6 +31,8 @@ static void RenderText(std::string_view text, const ImVec2& pos, const ImVec4& c

static void RenderLine(const ImVec2& start, const ImVec2& end, const ImVec4& color, bool shadow = false) noexcept
{
if (State.PanicMode) return;

if (shadow)
{
CurrentWindow->DrawList->AddLine(
Expand All @@ -44,6 +46,8 @@ static void RenderLine(const ImVec2& start, const ImVec2& end, const ImVec4& col

static void RenderBox(const ImVec2& top, const ImVec2& bottom, const float height, const float width, const ImVec4& color, const bool wantsShadow = true)
{
if (State.PanicMode) return;

const ImVec2 points[] = {
bottom, { bottom.x, ((float)(int)(bottom.y * 0.75f + top.y * 0.25f)) },
{ bottom.x - 0.5f * State.dpiScale, bottom.y }, { ((float)(int)(bottom.x * 0.75f + top.x * 0.25f)), bottom.y },
Expand Down Expand Up @@ -73,6 +77,8 @@ bool renderPlayerEsp = false;

void Esp::Render()
{
if (State.PanicMode) return;

CurrentWindow = ImGui::GetCurrentWindow();

drawing_t& instance = Esp::GetDrawing();
Expand Down
14 changes: 10 additions & 4 deletions gui/tabs/players_tab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ namespace PlayersTab {
openTrolling = group == Groups::Trolling;
}

static bool murderLoop = false;
static bool suicideLoop = false;

void Render() {
if (IsInGame() || IsInLobby()) {
ImGui::SameLine(100 * State.dpiScale);
Expand Down Expand Up @@ -669,9 +672,8 @@ namespace PlayersTab {
}

static int murderCount = 0;
static bool murderLoop = false;
static int murderDelay = 0;
if (ImGui::Button("Murder Loop")) {
if (IsInGame() && ImGui::Button("Murder Loop")) {
murderLoop = true;
murderCount = 20; //controls how many times the player is to be murdered
}
Expand Down Expand Up @@ -700,9 +702,8 @@ namespace PlayersTab {
else murderDelay--;

static int suicideCount = 0;
static bool suicideLoop = false;
static int suicideDelay = 0;
if (!State.SafeMode) {
if (!State.SafeMode && IsInGame()) {
ImGui::SameLine();
if (ImGui::Button("Suicide Loop")) {
suicideLoop = true;
Expand Down Expand Up @@ -1015,5 +1016,10 @@ namespace PlayersTab {

ImGui::EndChild();
}

if (openPlayer || State.selectedPlayers.size() == 0 || IsInLobby()) { //clear murder/suicide loops
murderLoop = false;
suicideLoop = false;
}
}
}
2 changes: 1 addition & 1 deletion gui/tabs/players_tab.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

namespace PlayersTab {
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*> COLORS = { "Red", "Blue", "Green", "Pink", "Orange", "Yellow", "Black", "White", "Purple", "Brown", "Cyan", "Lime", "Maroon", "Rose", "Banana", "Gray", "Tan", "Coral", "Fortegreen" };
void Render();
}
15 changes: 9 additions & 6 deletions hooks/EOSManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ void dEOSManager_UpdatePermissionKeys(EOSManager* __this, void* 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);
if (State.SpoofFriendCode) __this->fields.friendCode = convert_to_string(State.FakeFriendCode);
EOSManager_Update(__this, method);
//EOSManager_set_FriendCode(__this, __this->fields.friendCode, NULL);
if (State.SpoofGuestAccount) {
Expand All @@ -93,9 +93,7 @@ void dEOSManager_Update(EOSManager* __this, MethodInfo* method) {
}
}

/*if (State.ForceLoginAsGuest) {
EOSManager_PlayOffline(__this, NULL);
EOSManager_StartTempAccountFlow(__this, NULL);
if (State.ForceLoginAsGuest) {
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 @@ -106,13 +104,18 @@ void dEOSManager_Update(EOSManager* __this, MethodInfo* method) {
auto loggedOut = EOSManager_AccountLoginStatus__Enum::Offline;
if ((int)il2cpp_field_get_value_object(field1, (Il2CppObject*)account) != (int)loggedOut)
il2cpp_field_set_value((Il2CppObject*)account, field1, &loggedIn);
if (State.UseGuestFriendCode && State.GuestFriendCode != "") {
/*if (State.UseGuestFriendCode && State.GuestFriendCode != "") {
auto username = __this->fields.editAccountUsername;
TMP_Text_set_text((TMP_Text*)username->fields.UsernameText, convert_to_string(State.GuestFriendCode), NULL);
//EditAccountUsername_SaveUsername(username, NULL);
}*/
if (__this->fields.hasRunLoginFlow && !hasDeletedDeviceId) {
EOSManager_DeleteDeviceID(__this, NULL, NULL);
LOG_DEBUG("Successfully deleted device ID!");
hasDeletedDeviceId = true;
}
State.ForceLoginAsGuest = false; //button behavior
}*/
}

/*if (!IsHost() && (IsInLobby() || IsInGame())) {
auto friendCode = (*Game::pLocalPlayer)->fields.FriendCode;
Expand Down
34 changes: 5 additions & 29 deletions hooks/HudManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,30 +118,6 @@ void dHudManager_Update(HudManager* __this, MethodInfo* method) {
}
}
}

static bool didSabotage = false;
static int sabotageDelay = 50;
if (IsHost() && IsInGame()) {
if (*Game::pLocalPlayer != NULL && !didSabotage) {
if (sabotageDelay == 50) {
if (State.mapType == Settings::MapType::Ship || State.mapType == Settings::MapType::Hq || State.mapType == Settings::MapType::Fungle)
State.rpcQueue.push(new RpcUpdateSystem(SystemTypes__Enum::Reactor, 128));
else if (State.mapType == Settings::MapType::Pb)
State.rpcQueue.push(new RpcUpdateSystem(SystemTypes__Enum::Laboratory, 128));
else if (State.mapType == Settings::MapType::Airship)
State.rpcQueue.push(new RpcUpdateSystem(SystemTypes__Enum::HeliSabotage, 128));
}
if (sabotageDelay == 0) {
RepairSabotage(*Game::pLocalPlayer);
didSabotage = true;
}
else sabotageDelay--;
}
}
else {
didSabotage = false;
sabotageDelay = 50;
}
}
}
catch (...) {
Expand Down Expand Up @@ -179,20 +155,20 @@ void dPingTracker_Update(PingTracker* __this, MethodInfo* method) {
Color32 playerColor = GetPlayerColor(outfit->fields.ColorId);
std::string colorCode = std::format("<#{:02x}{:02x}{:02x}{:02x}>",
playerColor.r, playerColor.g, playerColor.b, playerColor.a);
spectating = " ~ Now Spectating: " + colorCode + RemoveHtmlTags(convert_from_string(NetworkedPlayerInfo_get_PlayerName(GetPlayerData(GetPlayerControlById(State.playerToFollow.get_PlayerId())), nullptr)));
spectating = " ~ Now Spectating: " + colorCode + RemoveHtmlTags(convert_from_string(NetworkedPlayerInfo_get_PlayerName(GetPlayerData(GetPlayerControlById(State.playerToFollow.get_PlayerId())), nullptr))) + "</color>";
}
else spectating = "";
std::string hostText = State.ShowHost && IsInGame() ?
(IsHost() ? " ~ You are Host" : std::format(" ~ Host: {}", GetHostUsername(true))) : "";
std::string voteKicksText = (State.ShowVoteKicks && State.VoteKicks > 0) ? std::format(" Vote Kicks: {}", State.VoteKicks) : "";
std::string pingText = std::format("<size={}%><#0f0>Sicko</color><#f00>Menu</color> <#fb0>{}</color> by <#9ef>goaty</color> ~ {}{}{}{}{}{}{}</size>{}", spectating == "" ? 100 : 50,
State.SickoVersion, ping, fpsText, hostText, voteKicksText, autoKill, noClip, freeCam, spectating, IsInGame() ? "\n<#0000>0</color>" : "");
app::TMP_Text_set_alignment((app::TMP_Text*)__this->fields.text, app::TextAlignmentOptions__Enum::BaselineGeoAligned, nullptr);
std::string pingText = std::format("<size={}%><#0f0>Sicko</color><#f00>Menu</color> <#fb0>{}</color> by <#9ef>goaty</color> ~ {}{}{}{}{}{}{}{}</size>", spectating == "" ? 100 : 50,
State.SickoVersion, ping, fpsText, hostText, voteKicksText, autoKill, noClip, freeCam, spectating, IsInGame() ? "" : "");
app::TMP_Text_set_alignment((app::TMP_Text*)__this->fields.text, app::TextAlignmentOptions__Enum::TopGeoAligned, nullptr);
app::TMP_Text_set_text((app::TMP_Text*)__this->fields.text, convert_to_string(pingText), nullptr);
}
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::BaselineGeoAligned, nullptr);
app::TMP_Text_set_alignment((app::TMP_Text*)__this->fields.text, app::TextAlignmentOptions__Enum::TopGeoAligned, nullptr);
app::TMP_Text_set_text((app::TMP_Text*)__this->fields.text, convert_to_string(ping), nullptr);
}
}
Expand Down
10 changes: 7 additions & 3 deletions hooks/InnerNetClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,7 @@ void dCustomNetworkTransform_SnapTo(CustomNetworkTransform* __this, Vector2 posi
CustomNetworkTransform_SnapTo(__this, position, minSid, method);
}

void dAmongUsClient_OnGameEnd(AmongUsClient* __this, Object* endGameResult, MethodInfo* method) {
void dAmongUsClient_OnGameEnd(AmongUsClient* __this, void* endGameResult, MethodInfo* method) {
try {
onGameEnd();
}
Expand Down Expand Up @@ -933,13 +933,13 @@ void dInnerNetClient_EnqueueDisconnect(InnerNetClient* __this, DisconnectReasons
}

void dGameManager_RpcEndGame(GameManager* __this, GameOverReason__Enum endReason, bool showAd, MethodInfo* method) {
/*try {
try {
if (!State.PanicMode && IsHost() && State.NoGameEnd)
return;
}
catch (...) {
LOG_ERROR("Exception occurred in GameManager_RpcEndGame (InnerNetClient)");
}*/
}
return GameManager_RpcEndGame(__this, endReason, showAd, method);
}

Expand Down Expand Up @@ -1041,4 +1041,8 @@ void dDisconnectPopup_DoShow(DisconnectPopup* __this, MethodInfo* method) {
}
}*/
DisconnectPopup_DoShow(__this, method);
}

bool dGameManager_DidImpostorsWin(GameManager* __this, GameOverReason__Enum reason, MethodInfo* method) {
return GameManager_DidImpostorsWin(__this, reason, method);
}
6 changes: 3 additions & 3 deletions hooks/PlayerControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1073,16 +1073,17 @@ void dKillButton_SetTarget(KillButton* __this, PlayerControl* target, MethodInfo
}

if (!State.PanicMode && result != nullptr && State.AutoKill && (State.AlwaysMove || PlayerControl_get_CanMove(*Game::pLocalPlayer, NULL)) && (*Game::pLocalPlayer)->fields.killTimer <= 0.f) {
if (IsInGame()) State.rpcQueue.push(new RpcMurderPlayer(*Game::pLocalPlayer, result));
else State.lobbyRpcQueue.push(new RpcMurderPlayer(*Game::pLocalPlayer, result));
State.rpcQueue.push(new RpcMurderPlayer(*Game::pLocalPlayer, result));
}
KillButton_SetTarget(__this, result, NULL);
}
if (IsInLobby()) result = NULL;
else if (amImpostor) KillButton_SetTarget(__this, result, NULL);
else KillButton_SetTarget(__this, NULL, NULL);
}

PlayerControl* dImpostorRole_FindClosestTarget(ImpostorRole* __this, MethodInfo* method) {
if (IsInLobby()) return nullptr;
auto result = ImpostorRole_FindClosestTarget(__this, method);
if (!State.PanicMode && result == nullptr && State.InfiniteKillRange) {
PlayerControl* new_result = nullptr;
Expand All @@ -1104,7 +1105,6 @@ PlayerControl* dImpostorRole_FindClosestTarget(ImpostorRole* __this, MethodInfo*

if (!State.PanicMode && result != nullptr && State.AutoKill && (State.AlwaysMove || PlayerControl_get_CanMove(*Game::pLocalPlayer, NULL)) && (*Game::pLocalPlayer)->fields.killTimer <= 0.f) {
if (IsInGame()) State.rpcQueue.push(new RpcMurderPlayer(*Game::pLocalPlayer, result));
else State.lobbyRpcQueue.push(new RpcMurderPlayer(*Game::pLocalPlayer, result));
}
return result;
}
Expand Down
4 changes: 2 additions & 2 deletions hooks/RoleManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ void AssignPreChosenRoles(RoleRates& roleRates, std::vector<uint8_t>& assignedPl
auto trueRole = GetRoleTypesEnum(role);
roleRates.SubtractRole(trueRole);

PlayerControl_RpcSetRole(player, trueRole, true, NULL);
PlayerControl_RpcSetRole(player, trueRole, false, NULL);
assignedPlayers.push_back(player->fields.PlayerId);
}
}
Expand Down Expand Up @@ -89,7 +89,7 @@ void AssignRoles(RoleRates& roleRates, int roleChance, RoleTypes__Enum role, il2
if (CanPlayerBeAssignedToRole(player, assignedPlayers))
{
roleRates.SubtractRole(role);
PlayerControl_RpcSetRole(player, role, true, NULL);
PlayerControl_RpcSetRole(player, role, false, NULL);
assignedPlayers.push_back(player->fields.PlayerId);
break;
}
Expand Down
2 changes: 2 additions & 0 deletions hooks/_hooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ void DetourInitilization() {
HOOKFUNC(NetworkedPlayerInfo_Serialize);
HOOKFUNC(DisconnectPopup_DoShow);
HOOKFUNC(EditAccountUsername_SaveUsername);
HOOKFUNC(GameManager_DidImpostorsWin);

if (!HookFunction(&(PVOID&)oPresent, dPresent, "D3D_PRESENT_FUNCTION")) return;

Expand Down Expand Up @@ -328,6 +329,7 @@ void DetourUninitialization()
UNHOOKFUNC(NetworkedPlayerInfo_Serialize);
UNHOOKFUNC(DisconnectPopup_DoShow);
UNHOOKFUNC(EditAccountUsername_SaveUsername);
UNHOOKFUNC(GameManager_DidImpostorsWin);

if (DetourDetach(&(PVOID&)oPresent, dPresent) != 0) return;

Expand Down
5 changes: 3 additions & 2 deletions hooks/_hooks.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ void dPlayerPhysics_FixedUpdate(PlayerPhysics* __this, MethodInfo* method);
bool dSaveManager_GetPurchase(String* itemKey, String* bundleKey, MethodInfo* method);
void dPlayerControl_TurnOnProtection(PlayerControl* __this, bool visible, int32_t colorId, int32_t guardianPlayerId, MethodInfo* method);
void dPlayerControl_RemoveProtection(PlayerControl* __this, MethodInfo* method);
void dAmongUsClient_OnGameEnd(AmongUsClient* __this, Object* endGameResult, MethodInfo* method);
void dAmongUsClient_OnGameEnd(AmongUsClient* __this, void* endGameResult, MethodInfo* method);
void dAccountManager_UpdateKidAccountDisplay(AccountManager* __this, MethodInfo* method);
void dPlayerStorageManager_OnReadPlayerPrefsComplete(PlayerStorageManager* __this, void* data, MethodInfo* method);
bool dPlayerPurchasesData_GetPurchase(PlayerPurchasesData* __this, String* itemKey, String* bundleKey, MethodInfo* method);
Expand All @@ -116,4 +116,5 @@ bool dLogicGameFlowHnS_IsGameOverDueToDeath(LogicGameFlowHnS* __this, MethodInfo
void dPlayerControl_CoSetRole(PlayerControl* __this, RoleTypes__Enum role, bool canOverride, MethodInfo* method);
void dNetworkedPlayerInfo_Serialize(NetworkedPlayerInfo* __this, MessageWriter* writer, bool initialState, MethodInfo* method);
void dDisconnectPopup_DoShow(DisconnectPopup* __this, MethodInfo* method);
void dEditAccountUsername_SaveUsername(EditAccountUsername* __this, MethodInfo* method);
void dEditAccountUsername_SaveUsername(EditAccountUsername* __this, MethodInfo* method);
bool dGameManager_DidImpostorsWin(GameManager* __this, GameOverReason__Enum reason, MethodInfo* method);
7 changes: 3 additions & 4 deletions rpc/RpcMurderPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ RpcMurderPlayer::RpcMurderPlayer(PlayerControl* Player, PlayerControl* target, b
void RpcMurderPlayer::Process()
{
if (!PlayerSelection(Player).has_value() || !PlayerSelection(target).has_value()) return;

if (IsInGame() && !IsInMultiplayerGame()) PlayerControl_RpcMurderPlayer(Player, target, success, NULL);
else if (target != *Game::pLocalPlayer || IsInGame()) {
PlayerControl_RpcMurderPlayer(Player, target, success, NULL);
Expand All @@ -34,8 +33,7 @@ void RpcMurderPlayer::Process()
MessageWriter_WriteInt32(writer, int32_t(success ? MurderResultFlags__Enum::Succeeded : MurderResultFlags__Enum::FailedProtected), NULL);
InnerNetClient_FinishRpcImmediately((InnerNetClient*)(*Game::pAmongUsClient), writer, NULL);
}
Player->fields.moveable = true;
//prevent not moving when you murder
if (success) GetPlayerData(*Game::pLocalPlayer)->fields.IsDead = true;
}
}
}
Expand Down Expand Up @@ -221,7 +219,8 @@ void RpcRevive::Process()
{
if (!PlayerSelection(Player).has_value()) return;

//PlayerControl_Revive(Player, NULL);
PlayerControl_Revive(Player, NULL);
PlayerControl_RpcSetColor(Player, GetPlayerOutfit(GetPlayerData(Player))->fields.ColorId, NULL);
if (PlayerIsImpostor(GetPlayerData(Player)))
PlayerControl_RpcSetRole(Player, RoleTypes__Enum::Impostor, true, NULL);
else
Expand Down
6 changes: 4 additions & 2 deletions rpc/RpcSetRole.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ void RpcSetRole::Process()
{
if (Player == nullptr) return;

PlayerControl_RpcSetRole(Player, Role, true, NULL);
bool isDeadRole = Role == RoleTypes__Enum::CrewmateGhost || Role == RoleTypes__Enum::GuardianAngel || Role == RoleTypes__Enum::ImpostorGhost;

PlayerControl_RpcSetRole(Player, Role, Player->fields.roleAssigned && !isDeadRole, NULL);
}

SetRole::SetRole(RoleTypes__Enum role)
Expand All @@ -23,6 +25,6 @@ SetRole::SetRole(RoleTypes__Enum role)

void SetRole::Process()
{
PlayerControl_CoSetRole(*Game::pLocalPlayer, Role, true, NULL);
PlayerControl_CoSetRole(*Game::pLocalPlayer, Role, false, NULL);
RoleManager_SetRole(Game::RoleManager.GetInstance(), *Game::pLocalPlayer, Role, NULL);
}
2 changes: 1 addition & 1 deletion user/state.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ class Settings {
Replay::Reset();
}

std::string SickoVersion = "v3.5.1";
std::string SickoVersion = "v3.5.2";

void Load();
void Save();
Expand Down

0 comments on commit 51a275c

Please sign in to comment.