Fixed Control Lock If Hit a Pitfall While Paused

- Also fixed a minor bug where you could refresh the IP if you weren't
  the host
This commit is contained in:
2022-04-22 18:22:07 -05:00
parent 71a58caee3
commit db8b95f710
3 changed files with 57 additions and 3 deletions

View File

@@ -201,6 +201,18 @@ public class PlayerStats : MonoBehaviour
else if (GameObject.FindGameObjectWithTag("FogSystem").GetComponent<ParticleSystem>().isPlaying) {
SetWeather(Weather.Fog);
}
StartCoroutine(UnPause());
}
}
IEnumerator UnPause() {
yield return new WaitForSecondsRealtime(3f);
if (gameObject.transform.root.GetComponentInChildren<PlayerStats>().IsPaused) {
GameObject PauseMenu = GameObject.FindGameObjectWithTag("PauseMenu");
PauseMenu.GetComponent<PauseMenu>().setPlayerControlsStateServerRPC(true);
PauseMenu.GetComponent<PauseMenu>().TurnOffPanelServerRPC();
}
}