mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-07-30 09:15:05 +02:00
Added WallModel (ModelID=20) & CeilingModel (ModelID= 21)
This commit is contained in:
parent
b170071bf7
commit
fbba01d0c4
@ -30725,6 +30725,8 @@
|
|||||||
<Compile Include="Resources\FontManager.vb" />
|
<Compile Include="Resources\FontManager.vb" />
|
||||||
<Compile Include="Resources\GameModeManager.vb" />
|
<Compile Include="Resources\GameModeManager.vb" />
|
||||||
<Compile Include="Resources\ModelManager.vb" />
|
<Compile Include="Resources\ModelManager.vb" />
|
||||||
|
<Compile Include="Resources\Models\2D\CeilingModel.vb" />
|
||||||
|
<Compile Include="Resources\Models\2D\WallModel.vb" />
|
||||||
<Compile Include="Resources\Models\2D\BillModel.vb" />
|
<Compile Include="Resources\Models\2D\BillModel.vb" />
|
||||||
<Compile Include="Resources\Models\2D\CrossModel.vb" />
|
<Compile Include="Resources\Models\2D\CrossModel.vb" />
|
||||||
<Compile Include="Resources\Models\2D\DoubleFloorModel.vb" />
|
<Compile Include="Resources\Models\2D\DoubleFloorModel.vb" />
|
||||||
|
20
P3D/Resources/Models/2D/CeilingModel.vb
Normal file
20
P3D/Resources/Models/2D/CeilingModel.vb
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
Public Class CeilingModel
|
||||||
|
|
||||||
|
Inherits BaseModel
|
||||||
|
|
||||||
|
Public Sub New()
|
||||||
|
Me.ID = 21
|
||||||
|
|
||||||
|
Dim vertexData = New VertexPositionNormalTexture() {
|
||||||
|
New VertexPositionNormalTexture(New Vector3(-0.5, 0.5, 0.5), Vector3.Up, New Vector2(0, 1)),
|
||||||
|
New VertexPositionNormalTexture(New Vector3(-0.5, 0.5, -0.5), Vector3.Up, New Vector2(0, 0)),
|
||||||
|
New VertexPositionNormalTexture(New Vector3(0.5, 0.5, -0.5), Vector3.Up, New Vector2(1, 0)),
|
||||||
|
New VertexPositionNormalTexture(New Vector3(0.5, 0.5, -0.5), Vector3.Up, New Vector2(1, 0)),
|
||||||
|
New VertexPositionNormalTexture(New Vector3(0.5, 0.5, 0.5), Vector3.Up, New Vector2(1, 1)),
|
||||||
|
New VertexPositionNormalTexture(New Vector3(-0.5, 0.5, 0.5), Vector3.Up, New Vector2(0, 1))
|
||||||
|
}
|
||||||
|
|
||||||
|
Setup(vertexData)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
20
P3D/Resources/Models/2D/WallModel.vb
Normal file
20
P3D/Resources/Models/2D/WallModel.vb
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
Public Class BillModel
|
||||||
|
|
||||||
|
Inherits BaseModel
|
||||||
|
|
||||||
|
Public Sub New()
|
||||||
|
Me.ID = 3
|
||||||
|
|
||||||
|
Dim vertexData = New VertexPositionNormalTexture() {
|
||||||
|
New VertexPositionNormalTexture(New Vector3(-0.5, -0.5, 0), Vector3.Backward, New Vector2(0, 1)),
|
||||||
|
New VertexPositionNormalTexture(New Vector3(-0.5, 0.5, 0), Vector3.Backward, New Vector2(0, 0)),
|
||||||
|
New VertexPositionNormalTexture(New Vector3(0.5, 0.5, 0), Vector3.Backward, New Vector2(1, 0)),
|
||||||
|
New VertexPositionNormalTexture(New Vector3(0.5, 0.5, 0), Vector3.Backward, New Vector2(1, 0)),
|
||||||
|
New VertexPositionNormalTexture(New Vector3(0.5, -0.5, 0), Vector3.Backward, New Vector2(1, 1)),
|
||||||
|
New VertexPositionNormalTexture(New Vector3(-0.5, -0.5, 0), Vector3.Backward, New Vector2(0, 1))
|
||||||
|
}
|
||||||
|
|
||||||
|
Setup(vertexData)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
@ -98,6 +98,8 @@
|
|||||||
Public Shared DiagonalWallModel As DiagonalWallModel = New DiagonalWallModel()
|
Public Shared DiagonalWallModel As DiagonalWallModel = New DiagonalWallModel()
|
||||||
Public Shared HalfDiagonalWallModel As HalfDiagonalWallModel = New HalfDiagonalWallModel()
|
Public Shared HalfDiagonalWallModel As HalfDiagonalWallModel = New HalfDiagonalWallModel()
|
||||||
Public Shared OutsideStepModel As OutsideStepModel = New OutsideStepModel()
|
Public Shared OutsideStepModel As OutsideStepModel = New OutsideStepModel()
|
||||||
|
Public Shared WallModel As WallModel = New WallModel()
|
||||||
|
Public Shared CeilingModel As CeilingModel = New CeilingModel()
|
||||||
|
|
||||||
Public Shared Function getModelbyID(ByVal ID As Integer) As BaseModel
|
Public Shared Function getModelbyID(ByVal ID As Integer) As BaseModel
|
||||||
Select Case ID
|
Select Case ID
|
||||||
@ -141,6 +143,10 @@
|
|||||||
Return HalfDiagonalWallModel
|
Return HalfDiagonalWallModel
|
||||||
Case 19
|
Case 19
|
||||||
Return OutsideStepModel
|
Return OutsideStepModel
|
||||||
|
Case 20
|
||||||
|
Return WallModel
|
||||||
|
Case 21
|
||||||
|
Return CeilingModel
|
||||||
Case Else
|
Case Else
|
||||||
Return BlockModel
|
Return BlockModel
|
||||||
End Select
|
End Select
|
||||||
|
@ -829,6 +829,15 @@
|
|||||||
|
|
||||||
Dim Rotation As Vector3 = Entity.GetRotationFromInteger(CInt(GetTag(Tags, "Rotation")))
|
Dim Rotation As Vector3 = Entity.GetRotationFromInteger(CInt(GetTag(Tags, "Rotation")))
|
||||||
|
|
||||||
|
If TagExists(Tags, "RotationXYZ") = True Then
|
||||||
|
Dim rotationList As List(Of Single) = CType(GetTag(Tags, "RotationXYZ"), List(Of Single))
|
||||||
|
Rotation = New Vector3(rotationList(0), rotationList(1), rotationList(2))
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ModelID = 21 Then
|
||||||
|
Rotation.Z += MathHelper.Pi
|
||||||
|
End If
|
||||||
|
|
||||||
Dim Visible As Boolean = True
|
Dim Visible As Boolean = True
|
||||||
If TagExists(Tags, "Visible") = True Then
|
If TagExists(Tags, "Visible") = True Then
|
||||||
Visible = CBool(GetTag(Tags, "Visible"))
|
Visible = CBool(GetTag(Tags, "Visible"))
|
||||||
@ -840,11 +849,7 @@
|
|||||||
Shader = New Vector3(ShaderList(0), ShaderList(1), ShaderList(2))
|
Shader = New Vector3(ShaderList(0), ShaderList(1), ShaderList(2))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim RotationXYZ As Vector3 = Nothing
|
|
||||||
If TagExists(Tags, "RotationXYZ") = True Then
|
|
||||||
Dim rotationList As List(Of Single) = CType(GetTag(Tags, "RotationXYZ"), List(Of Single))
|
|
||||||
Rotation = New Vector3(rotationList(0), rotationList(1), rotationList(2))
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim SeasonTexture As String = ""
|
Dim SeasonTexture As String = ""
|
||||||
If TagExists(Tags, "SeasonTexture") = True Then
|
If TagExists(Tags, "SeasonTexture") = True Then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user