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,16 +15,23 @@
ActionscriptActive = CType(Core.CurrentScreen, OverworldScreen).ActionScript.IsReady
End If
Dim thirdPersonString As String = ""
If Screen.Camera.Name = "Overworld" Then
Dim c As OverworldCamera = CType(Screen.Camera, OverworldCamera)
If c.ThirdPerson = True Then
thirdPersonString = " / " & c.ThirdPersonOffset.ToString()
Dim cameraInformation = ""
If Not Screen.Camera Is Nothing Then
Dim thirdPersonString As String = ""
If Screen.Camera.Name = "Overworld" Then
Dim c As OverworldCamera = CType(Screen.Camera, OverworldCamera)
If c.ThirdPerson = True Then
thirdPersonString = " / " & c.ThirdPersonOffset.ToString()
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 &
Screen.Camera.Position.ToString() & thirdPersonString & Environment.NewLine & Screen.Camera.Yaw & "; " & Screen.Camera.Pitch & Environment.NewLine &
cameraInformation &
"E: " & _drawnVertices.ToString() & "/" & _maxVertices.ToString() & Environment.NewLine &
"C: " & _maxDistance.ToString() & " A: " & ActionscriptActive.ToString()

Binary file not shown.