#include <PlayerList.h>
Inherits SubsystemInterface, and Snapshot.
Protected Member Functions | |
| virtual void | crc (Xfer *xfer) |
| virtual void | xfer (Xfer *xfer) |
| virtual void | loadPostProcess (void) |
Additional Inherited Members | |
Protected Attributes inherited from SubsystemInterface | |
| AsciiString | m_name |
This is a singleton class that maintains the list of Players.
Definition at line 76 of file PlayerList.h.
| PlayerList::PlayerList | ( | ) |
Definition at line 73 of file PlayerList.cpp.
| PlayerList::~PlayerList | ( | ) |
Definition at line 84 of file PlayerList.cpp.
|
protectedvirtual |
| Player * PlayerList::findPlayerWithNameKey | ( | NameKeyType | key | ) |
return the Player with the given internal name, or null if none found.
Definition at line 109 of file PlayerList.cpp.
| Player * PlayerList::getEachPlayerFromMask | ( | PlayerMaskType & | maskToAdjust | ) |
Get each player in numerical order that this mask represents. Note that maskToAdjust will be adjusted by removing the associated player's mask from it.
Definition at line 374 of file PlayerList.cpp.
|
inline |
Return the "local" player (ie, the human playing the game). This will never return null.
Definition at line 123 of file PlayerList.h.
|
inline |
return the "neutral" Player. there is always a player that is "neutral" wrt all other players (this is so that everything can be associated with a nonnull Player, to simplify the universe). This will never return null.
Definition at line 112 of file PlayerList.h.
return the nth player. Note that players are in an arbitrary order. you should generally only use this if you want to iterate thru all players, NOT to get a specific player!
Definition at line 98 of file PlayerList.cpp.
|
inline |
return the total number of players (including the neutral player).
Definition at line 98 of file PlayerList.h.
| Player * PlayerList::getPlayerFromMask | ( | PlayerMaskType | mask | ) |
Return the player matching the player mask
Definition at line 354 of file PlayerList.cpp.
| PlayerMaskType PlayerList::getPlayersWithRelationship | ( | Int | srcPlayerIndex, |
| UnsignedInt | allowedRelationships ) |
a convenience routine to return the players who srcPlayer considers to have one of the relationships specified in allowedRelationships. Note that allowedRelationships should be a bitwise OR of AllowPlayerRelationship flags.
Definition at line 397 of file PlayerList.cpp.
|
virtual |
Implements SubsystemInterface.
Definition at line 239 of file PlayerList.cpp.
|
protectedvirtual |
|
virtual |
Definition at line 129 of file PlayerList.cpp.
|
virtual |
Definition at line 264 of file PlayerList.cpp.
|
virtual |
Implements SubsystemInterface.
Definition at line 122 of file PlayerList.cpp.
| void PlayerList::setLocalPlayer | ( | Player * | player | ) |
Set the local player. You cannot set it to null; if you pass null, you'll end up setting the local player to be the neutral player.
Definition at line 311 of file PlayerList.cpp.
| void PlayerList::teamAboutToBeDeleted | ( | Team * | team | ) |
Definition at line 275 of file PlayerList.cpp.
|
virtual |
Implements SubsystemInterface.
Definition at line 253 of file PlayerList.cpp.
| void PlayerList::updateTeamStates | ( | void | ) |
a convenience routine to quickly clear the entered/exited flags on all teams.
Definition at line 284 of file PlayerList.cpp.
| Team * PlayerList::validateTeam | ( | AsciiString | owner | ) |
Definition at line 294 of file PlayerList.cpp.
|
protectedvirtual |
Xfer Method Version Info: 1: Initial version
Implements Snapshot.
Definition at line 456 of file PlayerList.cpp.