mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
fix: Don't give host player authority by default (#1158)
* Don't give host player authority by default * Same when removing authority
This commit is contained in:
parent
9806e77718
commit
1fc1ed2708
@ -511,7 +511,6 @@ internal void OnStartServer(bool allowNonZeroNetId)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_IsServer = true;
|
m_IsServer = true;
|
||||||
hasAuthority = !localPlayerAuthority;
|
|
||||||
|
|
||||||
observers = new Dictionary<int, NetworkConnection>();
|
observers = new Dictionary<int, NetworkConnection>();
|
||||||
|
|
||||||
@ -1119,7 +1118,7 @@ public void RemoveClientAuthority()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// server now has authority (this is only called on server)
|
// server now has authority (this is only called on server)
|
||||||
ForceAuthority(true);
|
ForceAuthority(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -1452,7 +1452,7 @@ public static bool SpawnObjects()
|
|||||||
Spawn(identity.gameObject);
|
Spawn(identity.gameObject);
|
||||||
|
|
||||||
// these objects are server authority - even if "localPlayerAuthority" is set on them
|
// these objects are server authority - even if "localPlayerAuthority" is set on them
|
||||||
identity.ForceAuthority(true);
|
identity.ForceAuthority(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user