fix main menu crashing with debug display

This commit is contained in:
nilllzz 2018-02-24 18:54:28 +01:00
parent fc6a4c4d93
commit 7733e814d2
2 changed files with 13 additions and 6 deletions

View File

@ -15,6 +15,9 @@
ActionscriptActive = CType(Core.CurrentScreen, OverworldScreen).ActionScript.IsReady ActionscriptActive = CType(Core.CurrentScreen, OverworldScreen).ActionScript.IsReady
End If End If
Dim cameraInformation = ""
If Not Screen.Camera Is Nothing Then
Dim thirdPersonString As String = "" Dim thirdPersonString As String = ""
If Screen.Camera.Name = "Overworld" Then If Screen.Camera.Name = "Overworld" Then
Dim c As OverworldCamera = CType(Screen.Camera, OverworldCamera) Dim c As OverworldCamera = CType(Screen.Camera, OverworldCamera)
@ -23,8 +26,12 @@
End If End If
End If End If
cameraInformation = Screen.Camera.Position.ToString() & thirdPersonString & Environment.NewLine & Screen.Camera.Yaw & "; " & Screen.Camera.Pitch & Environment.NewLine
End If
Dim s As String = GameController.GAMENAME & " " & GameController.GAMEDEVELOPMENTSTAGE & " " & GameController.GAMEVERSION & " / FPS: " & Math.Round(Core.GameInstance.FPSMonitor.Value, 0) & isDebugString & Environment.NewLine & Dim s As String = GameController.GAMENAME & " " & GameController.GAMEDEVELOPMENTSTAGE & " " & GameController.GAMEVERSION & " / FPS: " & Math.Round(Core.GameInstance.FPSMonitor.Value, 0) & isDebugString & Environment.NewLine &
Screen.Camera.Position.ToString() & thirdPersonString & Environment.NewLine & Screen.Camera.Yaw & "; " & Screen.Camera.Pitch & Environment.NewLine & cameraInformation &
"E: " & _drawnVertices.ToString() & "/" & _maxVertices.ToString() & Environment.NewLine & "E: " & _drawnVertices.ToString() & "/" & _maxVertices.ToString() & Environment.NewLine &
"C: " & _maxDistance.ToString() & " A: " & ActionscriptActive.ToString() "C: " & _maxDistance.ToString() & " A: " & ActionscriptActive.ToString()

Binary file not shown.