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>();
|
shift = GameObject.Find("CameraHidden").GetComponent<CameraShift>();
|
||||||
|
|
||||||
}
|
}
|
||||||
[ServerRpc]
|
|
||||||
|
[ObserversRpc(ExcludeOwner = true)]
|
||||||
public void SwitchWeaponMode()
|
public void SwitchWeaponMode()
|
||||||
{
|
{
|
||||||
|
|
||||||
GunEnabled = !GunEnabled;
|
GunEnabled = !GunEnabled;
|
||||||
if (!GunEnabled)
|
if (!GunEnabled)
|
||||||
pistol.Disable();
|
pistol.Disable();
|
||||||
@ -201,7 +203,7 @@ public class PlayerInteractionHandler : NetworkBehaviour
|
|||||||
{
|
{
|
||||||
|
|
||||||
SwitchWeaponMode();
|
SwitchWeaponMode();
|
||||||
if (true) {
|
if (!IsServer) {
|
||||||
GunEnabled = !GunEnabled;
|
GunEnabled = !GunEnabled;
|
||||||
if (!GunEnabled)
|
if (!GunEnabled)
|
||||||
pistol.Disable();
|
pistol.Disable();
|
||||||
|
Reference in New Issue
Block a user