NPCs can get on and off chairs

The Y Position of an NPC when moving is now a Single (instead of an integer), allowing for NPCs to climb on and off chairs without their Y Position being rounded down.
This commit is contained in:
Jasper "JappaWakka" Speelman 2021-09-25 13:32:09 +02:00
parent 425a336401
commit 073ed91356
2 changed files with 2 additions and 2 deletions

View File

@ -657,8 +657,8 @@
Moved = 0.0F
MoveY = 0.0F
AnimationX = 1
Me.Position = New Vector3(CInt(Me.Position.X), CInt(Me.Position.Y), CInt(Me.Position.Z))
AnimationDelay = AnimationDelayLength
Me.Position = New Vector3(CInt(Me.Position.X), CSng(Me.Position.Y), CInt(Me.Position.Z))
ChangeTexture()
ApplyShaders()
Speed = NPC.STANDARD_SPEED

View File

@ -100,7 +100,7 @@
End If
Case "setmovey"
Dim targetNPC As NPC = Screen.Level.GetNPC(int(argument.GetSplit(0)))
Dim steps As Integer = int(argument.GetSplit(1))
Dim steps As Single = sng(argument.GetSplit(1))
targetNPC.MoveY = steps