From 7faa7f3ae8ba8728ab2d8e265684cb7f145ee533 Mon Sep 17 00:00:00 2001 From: dingo Date: Sat, 29 Nov 2025 16:11:06 -0500 Subject: [PATCH] fixes --- Game/GameSimulation.cs | 2 +- Networking/Messages/OpCodes.cs | 37 ---------------------------------- 2 files changed, 1 insertion(+), 38 deletions(-) diff --git a/Game/GameSimulation.cs b/Game/GameSimulation.cs index 9d00fde..07c4161 100644 --- a/Game/GameSimulation.cs +++ b/Game/GameSimulation.cs @@ -474,7 +474,7 @@ public sealed class GameSimulation _pendingEvents.Add(new GameEvent { Type = EventType.Projectile, - Data = new { proj.Id, proj.OwnerId, proj.X, proj.Y, proj.VelX, proj.VelY, weapon.Id } + Data = new { proj.Id, proj.OwnerId, proj.X, proj.Y, proj.VelX, proj.VelY, WeaponId = weapon.Id } }); } } diff --git a/Networking/Messages/OpCodes.cs b/Networking/Messages/OpCodes.cs index 9b2d61b..9b82d40 100644 --- a/Networking/Messages/OpCodes.cs +++ b/Networking/Messages/OpCodes.cs @@ -31,42 +31,5 @@ public static class OpCodes public const int WORLD_INPUT = 310; // client -> server (per tick or at ~20 Hz) public const int WORLD_STATE = 311; // server -> client (snapshots, ~10–20 Hz) - // ===== Lobby/Matchmaking (400-419) ===== - public const int LOBBY_JOIN = 400; - public const int LOBBY_JOIN_RESULT = 401; - public const int LOBBY_STATE = 402; // Periodic update of lobby players - public const int LOBBY_READY = 403; - public const int LOBBY_COUNTDOWN = 404; // Game starting in X seconds - public const int LOBBY_LEAVE = 405; - - // ===== Game State (420-449) ===== - public const int GAME_START = 420; // Server -> Client: Round begins - public const int GAME_STATE = 421; // Server -> Client: Full world snapshot - public const int GAME_TICK = 422; // Server -> Client: Delta update - public const int GAME_END = 423; // Server -> Client: Round over - public const int GAME_STATS = 424; // Server -> Client: End-of-round stats - - // ===== Player Input (450-469) ===== - public const int INPUT_MOVE = 450; // Client -> Server: Movement input - public const int INPUT_ACTION = 451; // Client -> Server: Use/Interact/Pickup - public const int INPUT_SHOOT = 452; // Client -> Server: Fire weapon - public const int INPUT_DROP = 453; // Client -> Server: Drop item - public const int INPUT_CRAFT = 454; // Client -> Server: Craft request - - // ===== World Events (470-499) ===== - public const int EVENT_SPAWN = 470; // Entity spawned - public const int EVENT_DESPAWN = 471; // Entity removed - public const int EVENT_DAMAGE = 472; // Damage dealt - public const int EVENT_DEATH = 473; // Player/entity died - public const int EVENT_PICKUP = 474; // Item picked up - public const int EVENT_PROJECTILE = 475; // Projectile created - public const int EVENT_EXPLOSION = 476; // Area effect - public const int EVENT_CRAFT_COMPLETE = 477; // Crafting finished - public const int EVENT_EXTRACT = 478; // Player extracted with loot - - // ===== Chat/Social (500-509) ===== - public const int CHAT_SEND = 500; - public const int CHAT_RECEIVE = 501; - public const int CHAT_PROXIMITY = 502; // Location-based chat }