wavelength 1.0.0
Loading...
Searching...
No Matches
NetArbiter Class Reference

Referee of an online session that settles which track each player is on. More...

#include <netarbiter.h>

Public Member Functions

 NetArbiter (GameTrackSelector *pGameTrackSelector)
 Take over the assignment of a game's track selector.
void Start ()
 Send the first assignment.
void RequestTrack (int nPlayer, int nTrack)
 Schedule the settling of a player's request to move to a track.
void UpdatePlayer (int nPlayer, int nTrack, int nVersion)
 Settle a player's move to a track.
void Broadcast ()
 Send the assignment to every console and schedule the next send.
void RemovePlayer (int nPlayer)
 Take a player off every track.
int GetTrack (int nPlayer)
 Report the track the arbiter assigns a player.

Static Public Attributes

static int sVersion
 Sequence number of the last ArbiterPacket sent.

Detailed Description

Referee of an online session that settles which track each player is on.

The RTTI records the commands the class schedules. The class is not polymorphic. The hosting console builds one. Every request of a player to change track is settled after a delay, a player that the change displaces is bumped to a random free track, and the assignment is sent to every console in an ArbiterPacket every 200 milliseconds and after every change.

Constructor & Destructor Documentation

◆ NetArbiter()

NetArbiter::NetArbiter ( GameTrackSelector * pGameTrackSelector)
explicit

Take over the assignment of a game's track selector.

Parameters
pGameTrackSelectorThe track selector of the game.
Ghidra address:
NTSC-U/C: 0x00127aa0
Ghidra address:
PAL: 0x00129298

Member Function Documentation

◆ Start()

void NetArbiter::Start ( )

Send the first assignment.

Ghidra address:
NTSC-U/C: 0x00127c60
Ghidra address:
PAL: 0x00129458

◆ RequestTrack()

void NetArbiter::RequestTrack ( int nPlayer,
int nTrack )

Schedule the settling of a player's request to move to a track.

Parameters
nPlayerThe player.
nTrackThe track.
Ghidra address:
NTSC-U/C: 0x00127c80
Ghidra address:
PAL: 0x00129478

◆ UpdatePlayer()

void NetArbiter::UpdatePlayer ( int nPlayer,
int nTrack,
int nVersion )

Settle a player's move to a track.

Parameters
nPlayerThe player.
nTrackThe track.
nVersionThe sequence number of the player's update, or -1.
Ghidra address:
NTSC-U/C: 0x00127d00
Ghidra address:
PAL: 0x001294f8

◆ Broadcast()

void NetArbiter::Broadcast ( )

Send the assignment to every console and schedule the next send.

Ghidra address:
NTSC-U/C: 0x00127f30
Ghidra address:
PAL: 0x00129728

◆ RemovePlayer()

void NetArbiter::RemovePlayer ( int nPlayer)

Take a player off every track.

Parameters
nPlayerThe player.
Ghidra address:
NTSC-U/C: 0x00128310
Ghidra address:
PAL: 0x00129b08

◆ GetTrack()

int NetArbiter::GetTrack ( int nPlayer)

Report the track the arbiter assigns a player.

Parameters
nPlayerThe player.
Returns
The track, or -1 for none.
Ghidra address:
NTSC-U/C: 0x00128330
Ghidra address:
PAL: 0x00129b28

Member Data Documentation

◆ sVersion

int NetArbiter::sVersion
static

Sequence number of the last ArbiterPacket sent.

Ghidra address:
NTSC-U/C: 0x003af840
Ghidra address:
PAL: 0x0042e6d8

The documentation for this class was generated from the following file: