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

Function addsleep

source/src/clientgame.cpp:633–642  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

631sl_semaphore *sleepssemaphore = new sl_semaphore(1, NULL); // guard the sleeps-vector with a semaphore, so we can add sleeps from other threads
632
633void addsleep(int msec, const char *cmd, bool persist)
634{
635 sleepssemaphore->wait();
636 scriptsleep &s = sleeps.add();
637 s.wait = max(msec, 1);
638 s.millis = lastmillis;
639 s.cmd = newstring(cmd);
640 s.persist = persist;
641 sleepssemaphore->post();
642}
643
644void addsleep_(int *msec, char *cmd, int *persist)
645{

Callers 6

authsetupFunction · 0.85
hitFunction · 0.85
addsleep_Function · 0.85
startmapFunction · 0.85
connectprotocolFunction · 0.85
main.cppFile · 0.85

Calls 5

maxFunction · 0.85
newstringFunction · 0.85
waitMethod · 0.80
postMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected