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

Function autospawncheck

source/src/server.cpp:2043–2057  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2041}
2042
2043void autospawncheck()
2044{
2045 if(sg->mastermode != MM_MATCH || !m_autospawn || sg->interm) return;
2046
2047 loopv(clients) if(clients[i]->type!=ST_EMPTY && clients[i]->isauthed && team_isactive(clients[i]->team))
2048 {
2049 client *cl = clients[i];
2050 if((cl->state.state == CS_DEAD || cl->state.state == CS_SPECTATE)
2051 && canspawn(cl) == SP_OK && !cl->autospawn)
2052 {
2053 sendspawn(cl);
2054 cl->autospawn = true;
2055 }
2056 }
2057}
2058
2059bool updateclientteam(int cln, int newteam, int ftr)
2060{

Callers 1

serversliceFunction · 0.85

Calls 3

canspawnFunction · 0.85
sendspawnFunction · 0.85
loopvFunction · 0.70

Tested by

no test coverage detected