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

Function setvar

source/src/command.cpp:210–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208 ASSERT(id && id->type == vartype); \
209 if(!id || id->type!=vartype) return;
210void setvar(const char *name, int i, bool dofunc)
211{
212 GETVAR(id, ID_VAR, name);
213 *id->storage.i = clamp(i, id->minval, id->maxval);
214 if(dofunc && id->fun) ((void (__cdecl *)())id->fun)(); // call trigger function if available
215}
216void setfvar(const char *name, float f, bool dofunc)
217{
218 GETVAR(id, ID_FVAR, name);

Callers 3

empty_worldFunction · 0.85
calclightFunction · 0.85
resetmapFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected