- team_data.gd: Team enum (SPECTATOR/CT/Terrorist), constants for names,
colors, starting money, and spawn groups; TeamData resource class
- team_manager.gd: Player-to-team assignment, auto-balancing, score
tracking; round-independent (persists across rounds)
- spawn_manager.gd: Scans scene for Marker3D nodes in spawn_points_ct
and spawn_points_t groups; selects valid spawns (farthest from enemies
with proximity check, fallback to first available)
- buy_zone.gd: Area3D-based trigger zone with team filtering, player
enter/exit tracking and signals
- test_range.tscn: Added 2 CT spawn markers and 2 T spawn markers with
appropriate groups
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