Adds:
- bomb_objective.gd: server-authoritative bomb state machine (IDLE→PLANTED→EXPLODED/DEFUSED)
- plant_bomb(player_id, pos) - T-side only, LIVE phase, inside bombsite
- defuse_bomb(player_id) - CT-side only, near bomb, 5s timer
- cancel_defuse(player_id) - if defuser moves or is killed
- bomb_explode() - configurable radius damage (10m lethal, 15m half)
- 40s bomb timer (configurable)
- Full query API: is_bomb_planted(), get_bomb_position(), get_bomb_timer()
- Signals: bomb_planted, bomb_defused, bomb_exploded, defuse_started, defuse_cancelled
- Connected to RoundManager via GameServer for round-end outcomes
- bomb_carrier.gd: client-side bomb carrier UI
- Bomb status/defuse progress UI updates
- Direction indicator to planted bomb
- "Hold E to defuse" prompt for CT near bomb
- "Hold E to plant" prompt for T with bomb in bombsite
- test_range.tscn: BombsiteA (south-west, -20,0,-5) and BombsiteB (north-east, 15,0,20)
- 8x4m Area3D zones with BoxShape3D collision
- PlantPosition Marker3D children
- Group 'bomb_sites' for server discovery
- game_server.gd: BombObjective integration in _ready()
- Creates and wires BombObjective to RoundManager, TeamManager, DamageProcessor
- Registers bomb sites from scene tree
- Connects bomb_exploded/bomb_defused → RoundManager.end_round()
- Connects round_ended → bomb.reset()
Creates the full buy/economy subsystem for a tactical FPS:
- EconomyManager (server/scripts/economy/economy_manager.gd): per-player
money tracking with starting 00, kill/round/objective rewards, spending
validation, escalating loss bonuses, and money_changed signal.
- BuyMenuHandler (server/scripts/economy/buy_menu_handler.gd): server-side
RPC validation of purchase requests — checks weapon validity, buy-zone
membership (scans BuyZone nodes in scene tree), affordability, then
deducts money and grants weapon via WeaponServer.give_weapon().
- BuyMenu (client/characters/weapon/buy_menu.gd): client-side Control UI
with styled panel, money display, weapon grid (name/cost/stats), numeric
key (1-4) and mouse-click purchase, server-driven affordability, and
auto-close after purchase.
- GameServer integration: creates EconomyManager + BuyMenuHandler in
_ready(), registers players for economy on spawn, awards kill rewards
via DamageProcessor.player_killed signal, and unregisters on despawn.
Economy rules: win=+,250, loss=,900 (+00/streak, cap ,900),
kill=+00, bomb_plant/defuse=+00. Weapon costs: pistol=00,
smg=,200, rifle=,700, shotgun=,900.
Add client-side prediction (t_p1_pred) with:
- scripts/network/snapshot.gd — lightweight snapshot resource with
to_dict/from_dict serialization for RPC. Stores position (Vector3),
rotation (Quaternion), velocity (Vector3), grounded (bool).
- scripts/network/client_prediction.gd — prediction/reconciliation
controller. 64-entry ring buffer of local snapshots, sends inputs to
server each physics tick (128Hz, ENet channel 0), detects misprediction
on server state arrival, rewinds and re-applies unconfirmed inputs.
Also supports remote player interpolation.
- scripts/network/network_manager.gd — new RPC endpoints for client
prediction: send_client_input (client->server, ch 0) and
send_server_state (server->client, ch 1). New signals for routing.
- client/characters/character/fps_character_controller.gd — prediction
hooks in _physics_process: on_before_tick() captures pre-input
snapshot, on_after_tick() sends input to server. Client prediction
path uses local movement (instant feedback) instead of reading from
SimulationServer entity.
Architecture:
Each tick: client applies input → predicts new state locally
→ sends input to server → server returns authoritative state
→ client compares and reconciles if mismatch.
- WeaponData resource class with configurable weapon properties and
pre-configured constants for rifle, pistol, shotgun, and SMG
- WeaponDefinitions singleton/static registry with WEAPONS dictionary
- WeaponServer node for server-authoritative weapon logic including
fire rate cooldowns, ammo tracking, reload state machine, and
multi-pellet hit-scan raycasting
- Extended WeaponManager with weapon inventory array, weapon switching,
per-weapon state persistence, fire_animation_triggered signal