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

Method GetTeamFromString

netgames/dmfc/dmfcbase.cpp:1776–1784  ·  view source on GitHub ↗

DMFCBase::GetTeamFromString Returns the int value of a team based on a string, -1 if not a team

Source from the content-addressed store, hash-verified

1774//
1775// Returns the int value of a team based on a string, -1 if not a team
1776int DMFCBase::GetTeamFromString(char *str) {
1777 if (!str)
1778 return -1;
1779 for (int i = 0; i < DLLMAX_TEAMS; i++) {
1780 if (!stricmp(str, DMFC_team_names[i]))
1781 return i;
1782 }
1783 return -1;
1784}
1785
1786// DMFCBase::GetPlayerNum
1787//

Callers 3

DMFCInputCommand_TeamFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected