17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-03 04:56:35 +01:00

multiplayer: the session imposes the settings that decide the physics

server_hello.config had been a TODO carrying a zero, and every peer ran with
whatever its own eu07.ini happened to say - including a vehicle physics thread
count, which makes the order vehicles are stepped in depend on how threads get
scheduled.

- the handshake now carries a bitfield of the settings that change how the
  physics comes out (full physics, realistic control) and a joining peer takes
  them on, saying in the log what changed
- a multiplayer session runs the vehicle physics on one thread on every peer,
  host included

Settings that only affect what a player sees or how comfortable the controls
feel stay with the player; only what alters the outcome belongs in here.
This commit is contained in:
2026-09-06 19:58:28 +00:00
parent 30fa68cfd8
commit 65159b9546
5 changed files with 58 additions and 2 deletions

View File

@@ -69,6 +69,7 @@ struct server_hello : public message
uint32_t seed;
int64_t timestamp;
// settings the server imposes on the whole session, see network/session.h
int64_t config;
std::string scenario;
// build identification of the server, informational only