peerPlayerFlagsChangedCallback
Callback when a player's flags have changed in the room.
- typedef void (*peerPlayerFlagsChangedCallback)(
- PEER peer,
- RoomType roomType,
- const gsi_char * nick,
- int oldFlags,
- int newFlags,
- void * param );
Routine | Required Header | Distribution |
---|---|---|
peerPlayerFlagsChangedCallback | <peer.h> | SDKZIP |
Parameters
- peer
- [in] Initialized peer object
- roomType
- [in] Can be either TitleRoom, GroupRoom or StagingRoom.
- nick
- [in] The player's nickname
- oldFlags
- [in] Old flags value
- newFlags
- [in] New flags value
- param
- [in] Pointer to user data. This is optional and will be passed unmodified to the callback function.
Remarks
The peerPlayerFlagsChangedCallback is called when a player's flags change in the specified room. The flags each represent one bit in the "flags" integer. The new flags can also trigger a change in the chat, where a player can become an operator, leave a room, enter a room, stage in a room.
The flags are:
PEER_FLAG_STAGING: the player is in a staging room.
PEER_FLAG_READY: the player is readied up for a game.
PEER_FLAG_PLAYING: the player is playing a game.
PEER_FLAG_AWAY: the player is away.
PEER_FLAG_HOST: the player is the host of the room.
PEER_FLAG_OP: the player is an op (+o) in this room.
PEER_FLAG_VOICE: the player has voice (+v) in this room.
This function will fail if no title is set.
Unicode Mappings
Routine | GSI_UNICODE Not Defined | GSI_UNICODE Defined |
---|---|---|
peerPlayerFlagsChangedCallback | peerPlayerFlagsChangedCallbackA | peerPlayerFlagsChangedCallbackW |
peerPlayerFlagsChangedCallbackW and peerPlayerFlagsChangedCallbackA are UNICODE and ANSI mapped versions of peerPlayerFlagsChangedCallback. The arguments of peerPlayerFlagsChangedCallbackA are ANSI strings; those of peerPlayerFlagsChangedCallbackW are wide-character strings.
Section Reference: Gamespy Peer SDK