I don’t know why the internal var JumpCurrentCount located in ACharacter is different between the client and the server.
On the client when the jump key is pressed:
[2020.03.15-16.32.34:584][471]LogKSGMDebug: AKPlayerCharacter::OnStartJump - before Jump() bPressedJump=0 bWasJumping=0 JumpCurrentCount=0 JumpForceTimeRemaining=0.000000 JumpKeyHoldTime=0.000000
[2020.03.15-16.32.34:584][471]LogKSGMDebug: AKPlayerCharacter::OnStartJump - after Jump() bPressedJump=1 bWasJumping=0 JumpCurrentCount=0 JumpForceTimeRemaining=0.000000 JumpKeyHoldTime=0.000000
[2020.03.15-16.32.35:469][610]LogKSGMDebug: AKPlayerCharacter::StopJumping - GetLocalRole()=ROLE_AutonomousProxy IsLocallyControlled=1 Actor=BP_PlayerCharacter_C_2147482098 JumpCurrentCount=1 bPressedJump=0 bWasJumping=0 PreviousBroadcastJumpState=0
The JumpCurrentCount is incremented correctly on the client.
On the server:
[2020.03.15-16.32.34:604][341]LogKSGMDebug: AKPlayerCharacter::CheckJumpInput - GetLocalRole()=ROLE_Authority IsLocallyControlled=0 Actor=BP_PlayerCharacter_C_2147482238 JumpCurrentCount=1
The JumpCurrentCount is incremented correctly on the server also.
Now a second jump.
On the client when the jump key is pressed:
[2020.03.15-16.32.35:579][626]LogKSGMDebug: AKPlayerCharacter::OnStartJump - before Jump() bPressedJump=0 bWasJumping=0 JumpCurrentCount=0 JumpForceTimeRemaining=0.000000 JumpKeyHoldTime=0.000000
[2020.03.15-16.32.35:579][626]LogKSGMDebug: AKPlayerCharacter::OnStartJump - after Jump() bPressedJump=1 bWasJumping=0 JumpCurrentCount=0 JumpForceTimeRemaining=0.000000 JumpKeyHoldTime=0.000000
[2020.03.15-16.32.36:659][788]LogKSGMDebug: AKPlayerCharacter::StopJumping - GetLocalRole()=ROLE_AutonomousProxy IsLocallyControlled=1 Actor=BP_PlayerCharacter_C_2147482098 JumpCurrentCount=1 bPressedJump=0 bWasJumping=0 PreviousBroadcastJumpState=0
The JumpCurrentCount is still 1. It should be 2.
On the server, the JumpCurrentCount is now 2, which is correct.
[2020.03.15-16.32.35:597][396]LogKSGMDebug: AKPlayerCharacter::CheckJumpInput - GetLocalRole()=ROLE_Authority IsLocallyControlled=0 Actor=BP_PlayerCharacter_C_2147482238 JumpCurrentCount=2
Same problem on the third jump.
On the client still 1 never incremented.
[2020.03.15-16.32.36:785][806]LogKSGMDebug: AKPlayerCharacter::OnStartJump - before Jump() bPressedJump=0 bWasJumping=0 JumpCurrentCount=1 JumpForceTimeRemaining=0.000000 JumpKeyHoldTime=0.000000
[2020.03.15-16.32.36:785][806]LogKSGMDebug: AKPlayerCharacter::OnStartJump - after Jump() bPressedJump=1 bWasJumping=0 JumpCurrentCount=1 JumpForceTimeRemaining=0.000000 JumpKeyHoldTime=0.000000
[2020.03.15-16.32.37:358][893]LogKSGMDebug: AKPlayerCharacter::StopJumping - GetLocalRole()=ROLE_AutonomousProxy IsLocallyControlled=1 Actor=BP_PlayerCharacter_C_2147482098 JumpCurrentCount=1 bPressedJump=0 bWasJumping=0 PreviousBroadcastJumpState=0
and on the server, incremented correctly.
[2020.03.15-16.32.36:808][464]LogKSGMDebug: AKPlayerCharacter::CheckJumpInput - GetLocalRole()=ROLE_Authority IsLocallyControlled=0 Actor=BP_PlayerCharacter_C_2147482238 JumpCurrentCount=3
Why the JumpCurrentCount on the client is always 1. In fact the var is never incremented on the client.
How can I have the JumpCurrentCount on the client ?