Update PlayerInteractionHandler.cs
This commit is contained in:
parent
3deb223006
commit
c35c73b3a2
@ -76,9 +76,11 @@ public class PlayerInteractionHandler : NetworkBehaviour
|
||||
shift = GameObject.Find("CameraHidden").GetComponent<CameraShift>();
|
||||
|
||||
}
|
||||
[ServerRpc]
|
||||
|
||||
[ObserversRpc(ExcludeOwner = true)]
|
||||
public void SwitchWeaponMode()
|
||||
{
|
||||
|
||||
GunEnabled = !GunEnabled;
|
||||
if (!GunEnabled)
|
||||
pistol.Disable();
|
||||
@ -201,7 +203,7 @@ public class PlayerInteractionHandler : NetworkBehaviour
|
||||
{
|
||||
|
||||
SwitchWeaponMode();
|
||||
if (true) {
|
||||
if (!IsServer) {
|
||||
GunEnabled = !GunEnabled;
|
||||
if (!GunEnabled)
|
||||
pistol.Disable();
|
||||
|
Reference in New Issue
Block a user