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

Function setfvar

source/src/command.cpp:216–221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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);
219 *id->storage.f = clamp(f, id->minvalf, id->maxvalf);
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);

Callers 4

empty_worldFunction · 0.85
load_worldFunction · 0.85
restoreMethod · 0.85
movemapFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected