mirror of
https://github.com/genxium/DelayNoMore
synced 2024-12-25 11:18:55 +00:00
Enhanced inertia handling.
This commit is contained in:
parent
d38d4b4ec9
commit
d25bb5ff10
@ -539,7 +539,7 @@
|
||||
"array": [
|
||||
0,
|
||||
0,
|
||||
210.16474188040044,
|
||||
209.6693197428241,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
@ -2360,7 +2360,7 @@
|
||||
"mapNode": {
|
||||
"__id__": 3
|
||||
},
|
||||
"speed": 5000,
|
||||
"speed": 500,
|
||||
"_id": "76ImpM7XtPSbiLHDXdsJa+"
|
||||
},
|
||||
{
|
||||
|
@ -461,7 +461,7 @@
|
||||
"array": [
|
||||
0,
|
||||
0,
|
||||
209.73151519075364,
|
||||
209.6693197428241,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
|
@ -547,7 +547,7 @@
|
||||
"array": [
|
||||
0,
|
||||
0,
|
||||
210.27555739078596,
|
||||
209.6693197428241,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
|
File diff suppressed because one or more lines are too long
@ -652,10 +652,12 @@ func ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(inputsBuffer *RingBuffer
|
||||
*/
|
||||
alignedWithInertia := true
|
||||
exactTurningAround := false
|
||||
if 0 == effDx && 0 != thatPlayerInNextFrame.VelX {
|
||||
stoppingFromWalking := false
|
||||
if 0 != effDx && 0 == thatPlayerInNextFrame.VelX {
|
||||
alignedWithInertia = false
|
||||
} else if 0 != effDx && 0 == thatPlayerInNextFrame.VelX {
|
||||
} else if 0 == effDx && 0 != thatPlayerInNextFrame.VelX {
|
||||
alignedWithInertia = false
|
||||
stoppingFromWalking = true
|
||||
} else if 0 > effDx*thatPlayerInNextFrame.VelX {
|
||||
alignedWithInertia = false
|
||||
exactTurningAround = true
|
||||
@ -672,6 +674,8 @@ func ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(inputsBuffer *RingBuffer
|
||||
if exactTurningAround {
|
||||
thatPlayerInNextFrame.CharacterState = ATK_CHARACTER_STATE_TURNAROUND
|
||||
thatPlayerInNextFrame.FramesToRecover = chConfig.InertiaFramesToRecover
|
||||
} else if stoppingFromWalking {
|
||||
thatPlayerInNextFrame.FramesToRecover = chConfig.InertiaFramesToRecover
|
||||
} else {
|
||||
thatPlayerInNextFrame.FramesToRecover = (chConfig.InertiaFramesToRecover >> 1)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user