mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-07-23 22:05:36 +02:00
Fix walkthrough objects overriding collision...
...of solid objects when it comes to the movement of the player.
This commit is contained in:
parent
15dd897e9a
commit
66de1ce8c9
@ -868,17 +868,25 @@ Public Class OverworldCamera
|
||||
If Entity.EntityID.ToLower = "npc" Then
|
||||
If Entity.ViewBox.Contains(PlayerBoundingBox) = ContainmentType.Intersects Then
|
||||
If Entity.Collision = True Then
|
||||
cannotWalk = Entity.WalkAgainstFunction()
|
||||
If Entity.WalkAgainstFunction() = True Then
|
||||
cannotWalk = True
|
||||
End If
|
||||
Else
|
||||
cannotWalk = Entity.WalkIntoFunction()
|
||||
If Entity.WalkIntoFunction() = True Then
|
||||
cannotWalk = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
If Entity.boundingBox.Contains(Position2D) = ContainmentType.Contains Then
|
||||
If Entity.Collision = True Then
|
||||
cannotWalk = Entity.WalkAgainstFunction()
|
||||
If Entity.WalkAgainstFunction() = True Then
|
||||
cannotWalk = True
|
||||
End If
|
||||
Else
|
||||
cannotWalk = Entity.WalkIntoFunction()
|
||||
If Entity.WalkIntoFunction() = True Then
|
||||
cannotWalk = True
|
||||
End If
|
||||
End If
|
||||
ElseIf Entity.boundingBox.Contains(New Vector3(Position2D.X, Position2D.Y - 1, Position2D.Z)) = ContainmentType.Contains Then
|
||||
Entity.WalkOntoFunction()
|
||||
|
Loading…
x
Reference in New Issue
Block a user