Fixed player being enabled while using grabber/being in network view
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -42,6 +42,7 @@ public class GameManager : MonoBehaviour
|
|||||||
//Leave network view with x
|
//Leave network view with x
|
||||||
if (Keyboard.current.xKey.wasPressedThisFrame && networkView)
|
if (Keyboard.current.xKey.wasPressedThisFrame && networkView)
|
||||||
{
|
{
|
||||||
|
player.GetComponent<StarterAssets.FirstPersonController>().enabled = true;
|
||||||
SetActiveCamera(networkCamera);
|
SetActiveCamera(networkCamera);
|
||||||
activeNode.GetComponent<Node>().DisableNode();
|
activeNode.GetComponent<Node>().DisableNode();
|
||||||
activeNode = null;
|
activeNode = null;
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ public class Switch : MonoBehaviour
|
|||||||
gameManager.activeNode = debugNode.gameObject;
|
gameManager.activeNode = debugNode.gameObject;
|
||||||
gameManager.SetActiveCamera(gameManager.networkCamera);
|
gameManager.SetActiveCamera(gameManager.networkCamera);
|
||||||
debugNode.SendMessage("SetActiveNode", debugNode.GetComponent<Node>());
|
debugNode.SendMessage("SetActiveNode", debugNode.GetComponent<Node>());
|
||||||
|
gameManager.player.GetComponent<StarterAssets.FirstPersonController>().enabled = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user