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

Function setsvar

source/src/command.cpp:222–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

220 if(dofunc && id->fun) ((void (__cdecl *)())id->fun)(); // call trigger function if available
221}
222void setsvar(const char *name, const char *str, bool dofunc)
223{
224 GETVAR(id, ID_SVAR, name);
225 *id->storage.s = exchangestr(*id->storage.s, str);
226 if(dofunc && id->fun) ((void (__cdecl *)())id->fun)(); // call trigger function if available
227}
228
229bool identexists(const char *name) { return idents->access(name)!=NULL; }
230

Callers

nothing calls this directly

Calls 1

exchangestrFunction · 0.85

Tested by

no test coverage detected