Skip to content

Commit 420be61

Browse files
committed
Fix spectator mode
1 parent e83a409 commit 420be61

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hooks/PlayerControl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,7 @@ void dPlayerControl_OnGameStart(PlayerControl* __this, MethodInfo* method) {
895895
}
896896
}
897897

898-
if (State.SpectatorMode && (GetNormalPlayerTasks(*Game::pLocalPlayer).size() != 0 || GetPlayerData(*Game::pLocalPlayer)->fields.RoleType != RoleTypes__Enum::CrewmateGhost)) {
898+
if (IsHost() && State.SpectatorMode && (GetNormalPlayerTasks(*Game::pLocalPlayer).size() != 0 || GetPlayerData(*Game::pLocalPlayer)->fields.RoleType != RoleTypes__Enum::CrewmateGhost)) {
899899
PlayerControl_RpcSetRole(*Game::pLocalPlayer, RoleTypes__Enum::ImpostorGhost, false, NULL);
900900
PlayerControl_RpcSetRole(*Game::pLocalPlayer, RoleTypes__Enum::CrewmateGhost, false, NULL);
901901
}

0 commit comments

Comments
 (0)