mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-10-20 01:46:25 +00:00
fix black screen when no role assigned
This commit is contained in:
1 parent
7a0d00866f
commit
6e130c28bf
7 files changed
+96
-84
No files matched your search
@@ -338,8 +338,17 @@ internal static class ExtendedPlayerControl
|
||||
|
||||
if (setRoleMap)
|
||||
{
|
||||
(byte, byte) key = (player.PlayerId, GetClientById(clientId).Character.PlayerId);
|
||||
StartGameHostPatch.RpcSetRoleReplacer.RoleMap[key] = (role, StartGameHostPatch.RpcSetRoleReplacer.RoleMap[key].CustomRole);
|
||||
try
|
||||
{
|
||||
(byte, byte) key = (player.PlayerId, GetClientById(clientId).Character.PlayerId);
|
||||
|
||||
if (StartGameHostPatch.RpcSetRoleReplacer.RoleMap.TryGetValue(key, out var pair))
|
||||
{
|
||||
pair.RoleType = role;
|
||||
StartGameHostPatch.RpcSetRoleReplacer.RoleMap[key] = pair;
|
||||
}
|
||||
}
|
||||
catch (Exception e) { ThrowException(e); }
|
||||
}
|
||||
|
||||
if (AmongUsClient.Instance.ClientId == clientId)
|
||||
|
||||
Reference in new issue
Block a user