mirror of
https://github.com/genxium/DelayNoMore
synced 2024-12-25 11:18:55 +00:00
Fixed inertia on jumping.
This commit is contained in:
parent
00816fb636
commit
d06cb18a08
File diff suppressed because one or more lines are too long
@ -362,7 +362,7 @@
|
||||
"array": [
|
||||
0,
|
||||
0,
|
||||
216.50635094610968,
|
||||
210.43934936178934,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
|
@ -537,7 +537,7 @@
|
||||
"array": [
|
||||
0,
|
||||
0,
|
||||
216.50635094610968,
|
||||
210.43934936178934,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
|
@ -38,7 +38,7 @@
|
||||
"orientation": "portrait"
|
||||
},
|
||||
"startScene": "2ff474d9-0c9e-4fe3-87ec-fbff7cae85b4",
|
||||
"title": "TreasureHunterX",
|
||||
"title": "DelayNoMore",
|
||||
"webOrientation": "portrait",
|
||||
"wechatgame": {
|
||||
"REMOTE_SERVER_ROOT": "https://bgmoba.lokcol.com/static/",
|
||||
|
@ -478,12 +478,16 @@ func deriveOpPattern(currPlayerDownsync, thatPlayerInNextFrame *PlayerDownsync,
|
||||
prevBtnBLevel = prevDecodedInput.BtnBLevel
|
||||
}
|
||||
|
||||
patternId := PATTERN_ID_NO_OP
|
||||
if 0 == currPlayerDownsync.FramesToRecover || currPlayerDownsync.CapturedByInertia {
|
||||
// Jumping is allowed within "CapturedByInertia", but moving is only allowed when "0 == FramesToRecover" (constrained later in "ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame")
|
||||
// Jumping is partially allowed within "CapturedByInertia", but moving is only allowed when "0 == FramesToRecover" (constrained later in "ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame")
|
||||
if 0 == currPlayerDownsync.FramesToRecover {
|
||||
effDx, effDy = decodedInput.Dx, decodedInput.Dy
|
||||
}
|
||||
|
||||
patternId := PATTERN_ID_NO_OP
|
||||
canJumpWithinInertia := currPlayerDownsync.CapturedByInertia && ((chConfig.InertiaFramesToRecover >> 1) > currPlayerDownsync.FramesToRecover)
|
||||
if 0 == currPlayerDownsync.FramesToRecover || canJumpWithinInertia {
|
||||
if decodedInput.BtnBLevel > prevBtnBLevel {
|
||||
if chConfig.DashingEnabled && 0 > effDy {
|
||||
if chConfig.DashingEnabled && 0 > decodedInput.Dy {
|
||||
// Checking "DashingEnabled" here to allow jumping when dashing-disabled players pressed "DOWN + BtnB"
|
||||
patternId = 5
|
||||
} else if _, existent := inAirSet[currPlayerDownsync.CharacterState]; !existent {
|
||||
@ -497,9 +501,9 @@ func deriveOpPattern(currPlayerDownsync, thatPlayerInNextFrame *PlayerDownsync,
|
||||
if PATTERN_ID_NO_OP == patternId {
|
||||
if 0 < decodedInput.BtnALevel {
|
||||
if decodedInput.BtnALevel > prevBtnALevel {
|
||||
if 0 > effDy {
|
||||
if 0 > decodedInput.Dy {
|
||||
patternId = 3
|
||||
} else if 0 < effDy {
|
||||
} else if 0 < decodedInput.Dy {
|
||||
patternId = 2
|
||||
} else {
|
||||
patternId = 1
|
||||
|
@ -511,7 +511,7 @@ var skills = map[int]*Skill{
|
||||
PushbackVelX: int32(float64(2) * WORLD_TO_VIRTUAL_GRID_RATIO),
|
||||
PushbackVelY: int32(0),
|
||||
HitboxOffsetX: int32(float64(24) * WORLD_TO_VIRTUAL_GRID_RATIO),
|
||||
HitboxOffsetY: int32(float64(5) * WORLD_TO_VIRTUAL_GRID_RATIO),
|
||||
HitboxOffsetY: int32(float64(8) * WORLD_TO_VIRTUAL_GRID_RATIO),
|
||||
HitboxSizeX: int32(float64(48) * WORLD_TO_VIRTUAL_GRID_RATIO),
|
||||
HitboxSizeY: int32(float64(32) * WORLD_TO_VIRTUAL_GRID_RATIO),
|
||||
BlowUp: false,
|
||||
|
Loading…
Reference in New Issue
Block a user