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

Commit

Permalink
fix PlayerControl_RpcSetRole (#642)
Browse files Browse the repository at this point in the history
  • Loading branch information
cddjr authored Jul 7, 2024
1 parent c8ba629 commit 38cfc5d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
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);
}

0 comments on commit 38cfc5d

Please sign in to comment.