This commit is contained in:
dingo
2025-11-29 16:11:06 -05:00
parent 447c6f2e23
commit 7faa7f3ae8
2 changed files with 1 additions and 38 deletions
+1 -1
View File
@@ -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 }
});
}
}
-37
View File
@@ -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
}