MCPcopy Create free account
hub / github.com/assaultcube/AC / newteam

Function newteam

source/src/clientgame.cpp:180–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

178}
179
180void newteam(char *name)
181{
182 if(*name)
183 {
184 int nt = teamatoi(name);
185 if(nt == player1->team) return; // same team
186 if(!team_isvalid(nt)) { conoutf("\f3\"%s\" is not a valid team name or number", name); return; }
187 if(player1->state == CS_EDITING) conoutf("you can't change team while editing");
188 else addmsg(SV_SWITCHTEAM, "ri", nt);
189 }
190 else conoutf("your team is: %s", team_string(player1->team));
191}
192COMMANDN(team, newteam, "s");
193
194void benchme()

Callers

nothing calls this directly

Calls 4

teamatoiFunction · 0.85
addmsgFunction · 0.85
team_stringFunction · 0.85
conoutfFunction · 0.70

Tested by

no test coverage detected