MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / CheckPlayerNum

Method CheckPlayerNum

netgames/dmfc/dmfcbase.cpp:1800–1807  ·  view source on GitHub ↗

DMFCBase::CheckPlayerNum Returns true if the player number passed in is a valid player number (the player is connected)

Source from the content-addressed store, hash-verified

1798//
1799// Returns true if the player number passed in is a valid player number (the player is connected)
1800bool DMFCBase::CheckPlayerNum(int player_num) {
1801 if ((player_num < 0) || (player_num >= DLLMAX_PLAYERS))
1802 return false;
1803 if ((NetPlayers[player_num].flags & NPF_CONNECTED) && (NetPlayers[player_num].sequence >= NETSEQ_PLAYING))
1804 return true;
1805 else
1806 return false;
1807}
1808
1809// DMFCBase::PacketCheckPlayerNum
1810//

Callers 15

DisplayHUDScoresFunction · 0.80
GetGameStartPacketFunction · 0.80
ReceiveHoardInvFunction · 0.80
SendHoardInvFunction · 0.80
ExecuteMethod · 0.80
DrawMethod · 0.80
KickPlayerFunction · 0.80
BanPlayerFunction · 0.80
BalanceTeamsFunction · 0.80
SwitchPlayerInfoFunction · 0.80
SwitchPiggyBackFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected