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

Function spawntime

source/src/server.cpp:1812–1829  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1810}
1811
1812int spawntime(int type)
1813{
1814 int np = numplayers();
1815 np = np<3 ? 4 : (np>4 ? 2 : 3); // Some spawn times are dependent on the number of players.
1816 int sec = 0;
1817 switch(type)
1818 {
1819 // Please update ./ac_website/htdocs/docs/introduction.html if these times change.
1820 case I_CLIPS:
1821 case I_AMMO: sec = np*2; break;
1822 case I_GRENADE: sec = np + 5; break;
1823 case I_HEALTH: sec = np*5; break;
1824 case I_HELMET:
1825 case I_ARMOUR: sec = 25; break;
1826 case I_AKIMBO: sec = 60; break;
1827 }
1828 return sec*1000;
1829}
1830
1831bool serverpickup(int i, int sender) // server side item pickup, acknowledge first client that gets it
1832{

Callers 1

serverpickupFunction · 0.85

Calls 1

numplayersFunction · 0.85

Tested by

no test coverage detected