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

Function PlayerGetTeam

Descent3/player.h:580–587  ·  view source on GitHub ↗

Returns the team (0 to 3) of the given player

Source from the content-addressed store, hash-verified

578
579// Returns the team (0 to 3) of the given player
580static inline int PlayerGetTeam(int pnum) {
581 if (Players[pnum].team == -1) {
582 // special "no-team" for Dedicated server
583 return 0; // fake a red team
584 }
585
586 return Players[pnum].team;
587}
588
589// Add the player's score
590void PlayerScoreAdd(int playernum, int points);

Callers 4

AIGetTeamFunction · 0.85
GetGoalRoomForPlayerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected