Skip to content

Re-delete netcode

LJ Sonic requested to merge netcode-rerefactor into next

I am opening a new merge request since the original one got accidentally merged and immediately reverted.

This is a fairly massive refactoring of the high-level networking code:

  • Netcode-related files are now grouped inside a new netcode folder
  • d_clisrv.c is now split into multiple files
  • The NONET define has been completely deleted
  • Almost every packet is now handled in a dedicated function with a name matching the packet type it handles (e.g. PT_ServerTics for PT_SERVERTICS)
  • The nodeXXX[MAXNETNODES] arrays have been merged into a single netnode_t nodes[MAXNETNODES] array
  • The PT_NODETIMEOUT packet has been removed, along with the reboundstore hack used to handle timeouts
  • The joinnextround console variable has been removed, as its implementation has never been finished anyway
  • Various bits of legacy code have been removed
  • Various functions have been split into smaller chunks
  • Some obsolete or misleading comments have been updated, rewritten or removed
  • Special stage blue spheres redistribution after a player leaves has been fixed to be more fair and never waste any sphere

Note to anyone willing to carry these changes over to another branch or repository: you are probably better off reapplying the commits one by one instead of doing everything at once. Almost every commit focuses on one very specific task in order to keep the individual diffs readable.

Merge request reports