4 Commits

Author SHA1 Message Date
shawn fc2c0236cb Fix dedicated server: delay netfox tick loop until first client connects, keep full scene tree for identity sync 2026-07-03 14:47:00 -04:00
shawn 70105d8b68 Fix property-pool rollback errors in headless server
The dedicated server was spawning a host avatar (peer 1) via
player-spawner._handle_host() and _handle_new_peer(1) on startup,
which registered RollbackSynchronizer subjects with the netfox
rollback system. Since no client input exists for peer 1, the
rollback system tried to record state for freed/recycled objects,
flooding the log with property-pool.gd errors.

Fix:
- Add spawn_host_avatar @export flag to player-spawner.gd
- Set it false in headless_server.gd before starting the ENet server
- PlayerSpawner._handle_host() skips avatar spawn when flag is false
- PlayerSpawner._handle_new_peer(1) skips avatar spawn when flag is false

Server startup is now clean: no property-pool errors, no RPC path errors.
2026-07-02 22:34:32 -04:00
shawn 4a834a1d55 Fix RPC path mismatch in headless server
The headless server added the multiplayer-fps game scene as a child node
(/root/HeadlessServer/multiplayer-fps/...), causing RPC node paths to
include the HeadlessServer/ prefix. Clients expected paths relative to
root (/root/multiplayer-fps/...), so every RPC would fail with
'Node not found'.

Fix: add the game scene directly to /root/ via call_deferred, making it
a sibling of the HeadlessServer node rather than a child. RPC paths now
match between server and client.
2026-07-02 22:30:34 -04:00
shawn 5b93c514c7 Phase 8: Headless dedicated server + RCON admin + netfox bootstrap
## Headless Server
- New entry point: scenes/headless_server.tscn + scripts/headless_server.gd
- Loads multiplayer-fps game, strips UI/rendering, auto-hosts ENet server
- Port config via --port arg, SERVER_PORT env, or default 34197
- RCON admin console on port 28960 (configurable via --rcon-port)

## Netfox Headless Bootstrap
- scripts/netfox_headless_bootstrap.gd — preloads all netfox dependency
  scripts in headless mode so class_names register before autoloads parse
- Registered as first autoload in project.godot
- Fixes 'Could not find type' errors for NetfoxLogger, NorayProtocolHandler,
  NetworkClocks, etc.

## RCON Admin
- Ported from old project: scripts/rcon/rcon_server.gd (TCP auth layer)
- scripts/rcon/rcon_command_handler.gd (command dispatch)
- Password via config/rcon_password.cfg, --rcon-password, or RCON_PASSWORD env

## Other Changes
- Added GameEvents stub (lan-bootstrapper dependency)
- Updated project.godot features to 4.7
- Added config/server_config.cfg for operator editing
- Updated RCON paths to new project structure
2026-07-02 21:49:49 -04:00