feat(movement): send jump packet to server (opcode 0xF61B)
Build and send GameAction(Jump) with extent + world-space launch velocity + sequence counters. Wire format from holtburger JumpActionData::pack. Server can now validate and replicate jumps to nearby clients. Also compute RunRate locally via PlayerWeenie.InqRunRate when running (server doesn't echo UpdateMotion ForwardSpeed to sender). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
bb7eced168
commit
5634e7114b
3 changed files with 74 additions and 6 deletions
|
|
@ -1936,11 +1936,18 @@ public sealed class GameWindow : IDisposable
|
|||
_liveSession.SendGameAction(body);
|
||||
}
|
||||
|
||||
if (result.JumpExtent.HasValue)
|
||||
if (result.JumpExtent.HasValue && result.JumpVelocity.HasValue)
|
||||
{
|
||||
// TODO: send jump packet to server (format needs research from holtburger).
|
||||
// Local jump physics work without server acknowledgment for now.
|
||||
Console.WriteLine($"jump: extent={result.JumpExtent.Value:F2}");
|
||||
var seq = _liveSession.NextGameActionSequence();
|
||||
var jumpBody = AcDream.Core.Net.Messages.JumpAction.Build(
|
||||
gameActionSequence: seq,
|
||||
extent: result.JumpExtent.Value,
|
||||
velocity: result.JumpVelocity.Value,
|
||||
instanceSequence: _liveSession.InstanceSequence,
|
||||
serverControlSequence: _liveSession.ServerControlSequence,
|
||||
teleportSequence: _liveSession.TeleportSequence,
|
||||
forcePositionSequence: _liveSession.ForcePositionSequence);
|
||||
_liveSession.SendGameAction(jumpBody);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue