Really fix invisible offsetmapfloors

This commit is contained in:
JappaWakka 2022-12-19 06:28:02 +01:00
parent 9d9045218c
commit 7468fb38b1
1 changed files with 53 additions and 54 deletions

View File

@ -211,7 +211,7 @@
Case TagTypes.Entity
AddEntity(Tags, New Size(1, 1), 1, True, New Vector3(1, 1, 1))
Case TagTypes.Floor
AddFloor(Tags)
AddFloor(Tags, loadOffsetMap)
Case TagTypes.Level
If loadOffsetMap = False Then
SetupLevel(Tags)
@ -433,9 +433,7 @@
entList.Add(Screen.Level.OffsetmapEntities(i))
Next
For i = offsetFloorCount To Screen.Level.OffsetmapFloors.Count - 1
If Screen.Level.OffsetmapFloors(i).Visible = True Then
floorList.Add(Screen.Level.OffsetmapFloors(i))
End If
Next
mapList.AddRange({entList, floorList})
@ -673,7 +671,7 @@
End If
End Sub
Private Sub AddFloor(ByVal Tags As Dictionary(Of String, Object))
Private Sub AddFloor(ByVal Tags As Dictionary(Of String, Object), Optional IsOffsetFloor As Boolean = False)
Dim sizeList As List(Of Integer) = CType(GetTag(Tags, "Size"), List(Of Integer))
Dim Size As Size = New Size(sizeList(0), sizeList(1))
@ -729,7 +727,7 @@
If loadOffsetMap = True Then
floorList = Screen.Level.OffsetmapFloors
End If
If IsOffsetFloor = False OrElse IsOffsetFloor = True AndAlso Visible = True Then
If RemoveFloor = False Then
For x = 0 To Size.Width - 1
For z = 0 To Size.Height - 1
@ -787,6 +785,7 @@
Next
Next
End If
End If
End Sub
Private Sub AddEntity(ByVal Tags As Dictionary(Of String, Object), ByVal Size As Size, ByVal SizeY As Integer, ByVal Fill As Boolean, ByVal Steps As Vector3)