From e1e4e346c7db6f02e9808cb530e58bacec5d1583 Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Wed, 11 Feb 2026 21:44:20 +0100 Subject: [PATCH] feat(client): add EntityKind::Player fixture and update multi-entity fixture Server team added EntityKind::Player variant. Added snapshot_player fixture and updated snapshot_multi_entity to include all 4 entity kinds (Player, Npc, Object, Terrain) for complete D-030 Layer 1 coverage. Co-Authored-By: Claude Opus 4.6 --- .../msgpack/snapshot_multi_entity.msgpack | Bin 140 -> 181 bytes .../fixtures/msgpack/snapshot_player.msgpack | Bin 0 -> 58 bytes server/tests/gen_fixtures.rs | 27 ++++++++++++++++-- 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 client/tests/fixtures/msgpack/snapshot_player.msgpack diff --git a/client/tests/fixtures/msgpack/snapshot_multi_entity.msgpack b/client/tests/fixtures/msgpack/snapshot_multi_entity.msgpack index 2c0217a4547eadf70ccbe33d72e3023431b87d0d..658104fd896a3c3d2fb0bbf11fdf79d3201c6bac 100644 GIT binary patch delta 90 zcmeBS+{)z e^HP=t?3FZ delta 49 zcmdnW*uyB_w4@|6Ir}X0^A)LiC7C6esl}69SAv<9@tG-%6FpQJnI`6GFfvb^E(ZVs Cs1o%6 diff --git a/client/tests/fixtures/msgpack/snapshot_player.msgpack b/client/tests/fixtures/msgpack/snapshot_player.msgpack new file mode 100644 index 0000000000000000000000000000000000000000..b1d14171fdc09353b59a46baf35f948dc7e1d2ce GIT binary patch literal 58 zcmZo#Qj(dR&A1{puOzc1GqreP>q;=QGCngUWnslB#})>Lg_RJhieX81W?ss&fSkn2 G)FJ@pm>87+ literal 0 HcmV?d00001 diff --git a/server/tests/gen_fixtures.rs b/server/tests/gen_fixtures.rs index 0b6389135..3562393cd 100644 --- a/server/tests/gen_fixtures.rs +++ b/server/tests/gen_fixtures.rs @@ -60,26 +60,49 @@ fn generate_msgpack_fixtures() { &rmp_serde::to_vec_named(&input_perception).unwrap(), ); + // Snapshot with Player entity (EntityKind::Player added by server team) + let snapshot_player = ObserverSnapshot { + tick: 1, + entities: vec![VisibleEntity { + entity_id: 100, + x: 16.5, + y: 16.5, + z: 0, + kind: EntityKind::Player, + }], + }; + write_fixture( + "snapshot_player", + &rmp_serde::to_vec_named(&snapshot_player).unwrap(), + ); + // Snapshot with multiple entities and all EntityKind variants let snapshot_multi = ObserverSnapshot { tick: 999, entities: vec![ VisibleEntity { entity_id: 1, + x: 16.5, + y: 16.5, + z: 0, + kind: EntityKind::Player, + }, + VisibleEntity { + entity_id: 2, x: 5.0, y: 10.0, z: 0, kind: EntityKind::Npc, }, VisibleEntity { - entity_id: 2, + entity_id: 3, x: 15.5, y: 3.0, z: 1, kind: EntityKind::Object, }, VisibleEntity { - entity_id: 3, + entity_id: 4, x: 0.0, y: 0.0, z: -1,