Share online membership and game setup with the server
Profile, member join/leave and building a fresh game move into the sim library, and the packet reader and writer into protocol.h, so the server can run lobbies exactly as clients do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
465f75f6d7
commit
9613e85706
7 files changed
+181
-105
No files matched your search
@@ -18,22 +18,6 @@ constexpr int SNAPSHOT_RING = 64;
|
||||
// A member's connection has no ping to show (it's this screen's own, hosting).
|
||||
constexpr float PING_NONE = -2;
|
||||
|
||||
// A player's setup as they join online: their name, the colour they'd like (-1 for any), and their sandbox slots,
|
||||
// loadouts, levels and stacking, which their fighter starts with. Plain data, sent as it sits in memory.
|
||||
struct Profile
|
||||
{
|
||||
char name[PLAYER_NAME_MAX + 1] = {};
|
||||
int color = -1;
|
||||
int weaponSlots = SLOTS_DEFAULT;
|
||||
int trinketSlots = SLOTS_DEFAULT;
|
||||
int weaponLoadout[SLOT_MAX] = {};
|
||||
int trinketLoadout[SLOT_MAX] = {};
|
||||
int weaponSlotLevels[SLOT_MAX] = {};
|
||||
int trinketSlotLevels[SLOT_MAX] = {};
|
||||
int weaponItemLevels[WEAPON_COUNT] = {};
|
||||
int trinketItemLevels[TRINKET_COUNT] = {};
|
||||
};
|
||||
|
||||
enum SessionEventType
|
||||
{
|
||||
EVENT_JOIN,
|
||||
|
||||
Reference in new issue
Block a user