Fixed multiple bugs related to the new game intro sequence

This commit is contained in:
CaptainSegis 2017-10-17 01:15:45 -05:00
parent 22c7a0abe9
commit 4b6ca42e3e
3 changed files with 26 additions and 26 deletions

View File

@ -1098,6 +1098,12 @@
GameJoltTempStoreString.Clear()
If Not IsGameJoltSave Then
If IO.Directory.Exists(GameController.GamePath & "\Save\" & filePrefix) = False Then
IO.Directory.CreateDirectory(GameController.GamePath & "\Save\" & filePrefix)
End If
End If
SavePlayer(IsAutosave)
SaveParty()
SaveItems()

View File

@ -13,13 +13,21 @@
View = Matrix.CreateLookAt(Position, Vector3.Zero, Vector3.Up)
Projection = Matrix.CreatePerspectiveFieldOfView(MathHelper.ToRadians(45.0), Core.GraphicsDevice.Viewport.AspectRatio, 0.01, 16)
FOV = 45
CreateProjectionMatrix()
Update()
End Sub
Private Sub CreateProjectionMatrix()
Projection = Matrix.CreatePerspectiveFieldOfView(MathHelper.ToRadians(FOV), GraphicsDevice.Viewport.AspectRatio, 0.01, FarPlane)
End Sub
Public Overrides Sub Update()
Ray = createRay()
UpdateViewMatrix()
UpdateMatrices()
UpdateFrustrum()
End Sub

View File

@ -9,15 +9,6 @@
Private Shared _fadeValue As Integer = 255 'Fade progress value for the black screen fade.
'Public Shared Property FadeValue() As Integer
' Get
' Return _fadeValue
' End Get
' Set(value As Integer)
' _fadeValue = value
' End Set
'End Property
Public Sub New(ByVal currentScreen As Screen)
Identification = Identifications.NewGameScreen
CanChat = False
@ -73,15 +64,15 @@
End If
If ActionScript.Scripts.Count = 0 Then
If CurrentScreen.Identification = Screen.Identifications.NewGameScreen Then
Core.SetScreen(New TransitionScreen(CurrentScreen, New OverworldScreen(), Color.Black, False))
Core.SetScreen(New TransitionScreen(CurrentScreen, New OverworldScreen(), Color.Black, False, AddressOf RemoveFade))
Else
Dim fadeSpeed As Integer = 12
If OverworldScreen.FadeValue > 0 Then
OverworldScreen.FadeValue -= fadeSpeed
If OverworldScreen.FadeValue <= 0 Then
OverworldScreen.FadeValue = 0
End If
End If
'Dim fadeSpeed As Integer = 12
'If OverworldScreen.FadeValue > 0 Then
' OverworldScreen.FadeValue -= fadeSpeed
' If OverworldScreen.FadeValue <= 0 Then
' OverworldScreen.FadeValue = 0
' End If
'End If
End If
Else
Me.ActionScript.Update() 'Update construct scripts.
@ -97,6 +88,9 @@
Level.World.Initialize(Level.EnvironmentType, Level.WeatherType)
End Sub
Public Sub RemoveFade()
FadeValue = 0
End Sub
Public Overrides Sub Draw()
SkyDome.Draw(Camera.FOV)
@ -140,14 +134,11 @@
IO.Directory.CreateDirectory(GameController.GamePath & "\Save")
End If
IO.Directory.CreateDirectory(savePath & folderPath)
'IO.Directory.CreateDirectory(savePath & folderPath)
Core.Player.filePrefix = folderPath
Core.Player.GameStart = Date.Now
Core.Player.SaveGame(False)
Core.Player.LoadGame(folderPath)
Core.Player.startFOV = 60
Core.Player.startFreeCameraMode = True
Core.Player.startPosition = New Vector3(x, y, z)
@ -158,11 +149,6 @@
Core.Player.startRiding = False
Core.Player.startRotation = CSng(MathHelper.Pi * (rot / 2))
'Construct.Controller.GetInstance().Context = Construct.ScriptContext.Overworld
''SetScreen(New TransitionScreen(CurrentScreen, New OverworldScreen(), Color.Black, False))
''SetScreen(New OverworldScreen())
Core.Player.SaveGame(False)
End Sub
''' <summary>