
Public Member Functions | |
| void | sendPacket (const Packet &p) |
| Send a packet to the other side. | |
| int | getViewerState () const |
| Get the viewer state. | |
| void | setViewerState (int value) |
| Set the viewer state. | |
| virtual void | serverStartup () |
| Called when the game is about to start, and all clients have joined (server-side only). | |
| virtual void | serverProcess () |
| Periodically called when the game is launched. | |
| virtual void | addPlayer (int client_id, int league_id) |
| Called before the game is started. | |
| virtual bool | coachKilled (int coach_id, CoachErrorCustom *&cec) |
| Called when a coach is disconnected. | |
| virtual void | outputStat (int coach_id, ClientStatistic &client_stat) |
| Called after the game is finished, to output some game statistics. | |
| void BaseSRules::addPlayer | ( | int | client_id, | |
| int | league_id | |||
| ) | [inline, virtual] |
Called before the game is started.
For each client, correspondance between client_id and league_id (ext_id) is given.
| bool BaseSRules::coachKilled | ( | int | coach_id, | |
| CoachErrorCustom *& | cec | |||
| ) | [virtual] |
| void BaseSRules::outputStat | ( | int | coach_id, | |
| ClientStatistic & | client_stat | |||
| ) | [virtual] |
Called after the game is finished, to output some game statistics.
Called for each coach.
| void BaseSRules::sendPacket | ( | const Packet & | p | ) |
Send a packet to the other side.
| p | A packet to send. |
References PacketHistory::addCopy(), BASE_TOKEN_START, and Packet::token.
Referenced by SMatch::checkForCurrentOpponentChoice(), SRules::coachKilled(), SPlayer::considerBlockFollow(), SMatch::nextTurn(), OpStack::process(), SBall::sendCoordinates(), SRules::sendIllegal(), SRules::serverStartup(), SBall::setOwner(), SPlayer::tryMove(), SMatch::turnover(), and SMatch::waitForCurrentOpponentChoice().
| virtual void BaseSRules::serverStartup | ( | ) | [inline, virtual] |
Called when the game is about to start, and all clients have joined (server-side only).
Reimplemented in SRules.
1.6.3