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

Function gmode_possible

source/src/protocol.cpp:519–522  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

517int defaultgamelimit(int gamemode) { return m_teammode ? 15 : 10; }
518
519int gmode_possible(bool hasffaspawns, bool hasteamspawns, bool hasflags) // return bitmask of playable modes, according to existing spawn and flag entities
520{
521 return GMMASK_COOPEDIT | (((hasffaspawns ? GMMASK__FFASPAWN : 0) | (hasteamspawns ? GMMASK__TEAMSPAWN : 0)) & ~(hasflags ? 0 : GMMASK__FLAGENTS));
522}
523
524int gmode_parse(const char *list) // convert a list of mode acronyms to a bitmask
525{

Callers 1

calcentitystatsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected