C4 Engine
C4 Engine API Documentation


Defined in:  C4Controller.h
Called to send messages containing the controller's state to a new player.

virtual void SendInitialStateMessages(Player *player) const;

player The player to which initial state messages should be sent.
The SendInitialStateMessages function is called for every controller in a world when a new client machine joins a multiplayer game. This function should send any messages necessary to synchronize the initial state of the controller on the new client by calling the Player::SendMessage for the player specified by the player parameter.

This function is called on the server machine after the kPlayerInitialized event has been sent to the Application::HandlePlayerEvent function and before the message journal is transmitted to a new client machine.
See Also