Skip to content

Commit bb79247

Browse files
committed
Add "jump_count"
Signed-off-by: Mikhail Agapov <mikhail.agapov@decentraland.org>
1 parent 3a35992 commit bb79247

File tree

5 files changed

+141
-43
lines changed

5 files changed

+141
-43
lines changed

src/DCLPulse/Messaging/PlayerStateInputHandler.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public void Handle(Dictionary<PeerIndex, PeerState> peers, PeerIndex from, Clien
4040
globalPeerPosition,
4141
state.Velocity,
4242
state.RotationY,
43+
state.JumpCount,
4344
state.MovementBlend,
4445
state.SlideBlend,
4546
state.GetHeadYaw(),

src/DCLPulse/Peers/Diff/PeerViewDiff.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,12 @@ public static class PeerViewDiff
8181
hasChanges = true;
8282
}
8383

84+
if (!Equals(from.JumpCount, to.JumpCount))
85+
{
86+
delta.JumpCount = to.JumpCount;
87+
hasChanges = true;
88+
}
89+
8490
// TIER_2: spatial state flags only
8591
if (tier.Equals(PeerViewSimulationTier.TIER_0) || tier.Equals(PeerViewSimulationTier.TIER_1))
8692
{

src/DCLPulse/Peers/PeerSnapshot.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ public record struct PeerSnapshot(
2020
float RotationY,
2121

2222
// Animation-related
23+
int JumpCount,
2324
float MovementBlend,
2425
float SlideBlend,
2526
float? HeadYaw,

src/Protocol/Generated/PulseComms.Bitwise.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ public float RotationYQuantized
6666
}
6767

6868
private float? _movementBlend;
69-
/// <summary>Float accessor for <see cref="MovementBlend"/>. Range [0.0f, 3.0f], 4 bits, step ≈ 0.2.</summary>
69+
/// <summary>Float accessor for <see cref="MovementBlend"/>. Range [0.0f, 3.0f], 5 bits, step ≈ 0.0967742.</summary>
7070
public float MovementBlendQuantized
7171
{
72-
get => _movementBlend ??= Quantize.Decode(MovementBlend, 0.0f, 3.0f, 4);
73-
set { _movementBlend = value; MovementBlend = Quantize.Encode(value, 0.0f, 3.0f, 4); }
72+
get => _movementBlend ??= Quantize.Decode(MovementBlend, 0.0f, 3.0f, 5);
73+
set { _movementBlend = value; MovementBlend = Quantize.Encode(value, 0.0f, 3.0f, 5); }
7474
}
7575

7676
private float? _slideBlend;

0 commit comments

Comments
 (0)