Limit fps to 60 by default

This commit is contained in:
in0finite 2019-06-22 20:42:12 +02:00
parent b117c27a63
commit 4a60c43ca2
2 changed files with 4 additions and 2 deletions

View file

@ -19,6 +19,8 @@ namespace SanAndreasUnity.Behaviours {
public GameObject barPrefab;
[SerializeField] [Range(10, 100)] private int m_defaultMaxFps = 60;
/// <summary> Are we in a startup scene ? </summary>
public static bool IsInStartupScene { get { return UnityEngine.SceneManagement.SceneManager.GetActiveScene ().buildIndex == 0; } }
@ -30,6 +32,8 @@ namespace SanAndreasUnity.Behaviours {
if (null == Instance)
Instance = this;
SetMaxFps(m_defaultMaxFps);
}
void OnEnable ()

View file

@ -18,8 +18,6 @@
- Gravity setting failed to load on windows - instead of 9.81, it's loaded as 981
- Max fps should be set to 60 by default
- Fix NRE when falling below the world: Ped.ResetIfFallingBelowTheWorld () (at Assets/Scripts/Behaviours/Ped/Ped.cs:449)
- Don't block camera with peds