Skip to content
This repository has been archived by the owner on Oct 10, 2024. It is now read-only.

Fix #641 #642

Merged
merged 1 commit into from
Jul 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion appdata/il2cpp-functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ DO_APP_FUNC(void, PlayerControl_MurderPlayer, (PlayerControl* __this, PlayerCont
DO_APP_FUNC(void, PlayerControl_RpcMurderPlayer, (PlayerControl* __this, PlayerControl* target, bool didSucceed, MethodInfo* method), "Assembly-CSharp, System.Void PlayerControl::RpcMurderPlayer(PlayerControl, System.Boolean)");
DO_APP_FUNC(void, PlayerControl_ReportDeadBody, (PlayerControl* __this, NetworkedPlayerInfo* target, MethodInfo* method), "Assembly-CSharp, System.Void PlayerControl::ReportDeadBody(NetworkedPlayerInfo)");
DO_APP_FUNC(void, PlayerControl_StartMeeting, (PlayerControl* __this, NetworkedPlayerInfo* target, MethodInfo* method), "Assembly-CSharp, System.Void PlayerControl::StartMeeting(NetworkedPlayerInfo)");
DO_APP_FUNC(void, PlayerControl_RpcSetRole, (PlayerControl* __this, RoleTypes__Enum roleType, MethodInfo* method), "Assembly-CSharp, System.Void PlayerControl::RpcSetRole(AmongUs.GameOptions.RoleTypes)");
DO_APP_FUNC(void, PlayerControl_RpcSetRole, (PlayerControl* __this, RoleTypes__Enum roleType, bool canOverrideRole, MethodInfo* method), "Assembly-CSharp, System.Void PlayerControl::RpcSetRole(AmongUs.GameOptions.RoleTypes, System.Boolean)");
DO_APP_FUNC(void, PlayerControl_RpcSetScanner, (PlayerControl* __this, bool value, MethodInfo* method), "Assembly-CSharp, System.Void PlayerControl::RpcSetScanner(System.Boolean)");
DO_APP_FUNC(void, PlayerControl_CmdCheckColor, (PlayerControl* __this, uint8_t bodyColor, MethodInfo* method), "Assembly-CSharp, System.Void PlayerControl::CmdCheckColor(System.Byte)");
DO_APP_FUNC(void, PlayerControl_RpcSetColor, (PlayerControl* __this, uint8_t bodyColor, MethodInfo* method), "Assembly-CSharp, System.Void PlayerControl::RpcSetColor(System.Byte)");
Expand Down
4 changes: 2 additions & 2 deletions hooks/RoleManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void AssignPreChosenRoles(RoleRates& roleRates, std::vector<uint8_t>& assignedPl
auto trueRole = GetRoleTypesEnum(role);
roleRates.SubtractRole(trueRole);

PlayerControl_RpcSetRole(player, trueRole, NULL);
PlayerControl_RpcSetRole(player, trueRole, false, NULL);
assignedPlayers.push_back(player->fields.PlayerId);
}
}
Expand Down Expand Up @@ -87,7 +87,7 @@ void AssignRoles(RoleRates& roleRates, int roleChance, RoleTypes__Enum role, il2
if (CanPlayerBeAssignedToRole(player, assignedPlayers))
{
roleRates.SubtractRole(role);
PlayerControl_RpcSetRole(player, role, NULL);
PlayerControl_RpcSetRole(player, role, false, NULL);
assignedPlayers.push_back(player->fields.PlayerId);
break;
}
Expand Down
2 changes: 1 addition & 1 deletion rpc/RpcSetRole.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ RpcSetRole::RpcSetRole(PlayerControl* player, RoleTypes__Enum role)

void RpcSetRole::Process()
{
PlayerControl_RpcSetRole(Player, Role, NULL);
PlayerControl_RpcSetRole(Player, Role, false, NULL);
}
Loading