fix: Prevent phantom strafe bug by clearing player velocity in ObjectCreateDetailedMessage (#1322)
Some checks failed
Publish Docs / docs (push) Has been cancelled
Publish Docker Image / docker (push) Has been cancelled
Test / test (push) Has been cancelled

Players would strafe without input after mode switches (gmtoggle) or zone transitions
when moving during the transition. The client was receiving stale velocity data in
PlacementData, causing it to restore phantom input state.

Fix: Always send None for velocity in player ObjectCreateDetailedMessage packets.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: 2revoemag <2revoemag@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
2revoemag 2025-11-30 21:48:50 -05:00 committed by GitHub
parent ba8a7caedf
commit 4d2639b54d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -16,7 +16,7 @@ class AvatarConverter extends ObjectCreateConverter[Player]() {
Success(
if (obj.VehicleSeated.isEmpty) {
PlayerData(
PlacementData(obj.Position, obj.Orientation, obj.Velocity),
PlacementData(obj.Position, obj.Orientation, None),
MakeAppearanceData(obj),
MakeCharacterData(obj),
MakeInventoryData(obj),
@ -38,7 +38,7 @@ class AvatarConverter extends ObjectCreateConverter[Player]() {
Success(
if (obj.VehicleSeated.isEmpty) {
DetailedPlayerData.apply(
PlacementData(obj.Position, obj.Orientation, obj.Velocity),
PlacementData(obj.Position, obj.Orientation, None),
MakeAppearanceData(obj),
MakeDetailedCharacterData(obj),
MakeDetailedInventoryData(obj),