C4 Engine
C4 Engine API Documentation

MessageMgr::GetServerFlag

Defined in:  C4Messages.h
Returns a boolean value indicating whether the local machine is the server.
Prototype

bool GetServerFlag(voidconst;

Description
The GetServerFlag function returns true if the Message Manager has been configured as the server in a multiplayer game or if the Message Manager is in single player mode.

Upon initial construction, the Message Manager is in single player mode. The Message Manager can be configured as the server for a multiplayer game by calling MessageMgr::BeginMultiplayerGame with the host parameter set to true.

The only case in which the GetServerFlag function returns false is when the Message Manager has been configured as a client in a multiplayer game. This is done by calling MessageMgr::BeginMultiplayerGame with the host parameter set to false.
See Also

MessageMgr::BeginSinglePlayerGame

MessageMgr::BeginMultiplayerGame

MessageMgr::GetMultiplayerFlag