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