2 #define COMPAT_NO_MOD_IS_XONOTIC 19 #ifndef QCC_SUPPORT_INT 23 #ifndef QCC_SUPPORT_BOOL 27 #ifndef QCC_SUPPORT_ACCUMULATE 28 #warning "QCC does not support accumulate, may not compile correctly" 31 #define ACCUMULATE [[accumulate]] 34 #ifndef QCC_SUPPORT_ERASEABLE 37 #define ERASEABLE [[eraseable]] 40 #ifndef QCC_SUPPORT_ALIAS 41 #warning "QCC does not support alias, may not compile correctly" 44 #define ALIAS(var) [[alias(var)]] 64 #ifndef QCC_SUPPORT_POW 65 #define pow(a, b) pow(a, b) 67 #define pow(a, b) ((a) ** (b)) 72 #define USING(name, T) typedef T name 80 #define TC(T, sym) MACRO_BEGIN MACRO_END 82 #define TC(T, sym) MACRO_BEGIN \ 84 LOG_WARNF("Type check failed: " #sym " :: " #T); \ 91 #define is_float(this) (true || ftoe(this)) 92 #define isnt_float(this) 93 #define is_vector(this) (true || vtos(this)) 94 #define isnt_vector(this) 95 #define is_string(this) (true || stof(this)) 96 #define isnt_string(this) 97 #define is_entity(this) (true || etof(this)) 98 #define isnt_entity(this) 101 bool is_bool(
float this) {
return this ==
true ||
this ==
false; }
163 #define objerror_safe(e) 166 #define objerror_safe(e) make_safe_for_remove(e) 169 #define objerror(this, msg) MACRO_BEGIN \ 170 LOG_WARN("======OBJECT ERROR======"); \ 171 entity _e = (this); \ 175 LOG_WARNF("%s OBJECT ERROR in %s:\n%s\nTip: read above for entity information", PROGNAME, __FUNC__, msg); \ 180 void m_init() {
if (_m_init) _m_init(); }
181 #define m_init _m_init 184 void m_shutdown() {
if (_m_shutdown) _m_shutdown(); }
185 #define m_shutdown _m_shutdown 187 void _m_draw(
float width,
float height);
188 void m_draw(
float width,
float height) {
if (_m_draw) _m_draw(width, height); }
189 #define m_draw _m_draw 191 void _m_keydown(
int keynr,
int ascii);
192 void m_keydown(
int keynr,
int ascii) {
if (_m_keydown) _m_keydown(keynr, ascii); }
193 #define m_keydown _m_keydown 195 void _m_toggle(
int mode);
196 void m_toggle(
int mode) {
if (_m_toggle) _m_toggle(mode); }
197 #define m_toggle _m_toggle 202 void main() {
if (_main) _main(); }
206 void SV_Shutdown() {
if (_SV_Shutdown) _SV_Shutdown(); }
207 #define SV_Shutdown _SV_Shutdown 210 bool _StartFrame_init;
211 void spawnfunc_worldspawn(
entity);
213 if (!_StartFrame_init) {
214 _StartFrame_init =
true;
216 __spawnfunc_expecting = 2;
NULL.__spawnfunc_constructor(
NULL);
219 if (_StartFrame) _StartFrame();
221 #define StartFrame _StartFrame 224 void SetNewParms() {
if (_SetNewParms) _SetNewParms(); }
225 #define SetNewParms _SetNewParms 227 void _SetChangeParms(
entity this);
229 #define SetChangeParms _SetChangeParms 231 #ifdef DP_EXT_PRECONNECT 232 void _ClientPreConnect(
entity this);
233 void ClientPreConnect() {
ENGINE_EVENT();
if (_ClientPreConnect) _ClientPreConnect(
this); }
234 #define ClientPreConnect _ClientPreConnect 237 void _ClientConnect(
entity this);
239 #define ClientConnect _ClientConnect 241 void _ClientDisconnect(
entity this);
243 #define ClientDisconnect _ClientDisconnect 245 void _PutClientInServer(
entity this);
247 #define PutClientInServer _PutClientInServer 249 void _ClientKill(
entity this);
251 #define ClientKill _ClientKill 253 void _PlayerPreThink(
entity this);
255 #define PlayerPreThink _PlayerPreThink 257 void _PlayerPostThink(
entity this);
259 #define PlayerPostThink _PlayerPostThink 261 void _SV_PlayerPhysics(
entity this);
262 void SV_PlayerPhysics() {
ENGINE_EVENT();
if (_SV_PlayerPhysics) _SV_PlayerPhysics(
this); }
263 #define SV_PlayerPhysics _SV_PlayerPhysics 265 void _SV_OnEntityPreSpawnFunction(
entity this);
269 __spawnfunc_expecting =
true;
270 __spawnfunc_expect =
this;
272 #define SV_OnEntityPreSpawnFunction _SV_OnEntityPreSpawnFunction 274 void _SV_ChangeTeam(
entity this,
int _color);
276 #define SV_ChangeTeam _SV_ChangeTeam 278 void _SV_ParseClientCommand(
entity this,
string command);
282 if (_SV_ParseClientCommand) _SV_ParseClientCommand(
this, command);
284 #define SV_ParseClientCommand _SV_ParseClientCommand 289 void CSQC_Init() {
if (_CSQC_Init) _CSQC_Init(); }
290 #define CSQC_Init _CSQC_Init 292 void _CSQC_Shutdown();
293 void CSQC_Shutdown() {
if (_CSQC_Shutdown) _CSQC_Shutdown(); }
294 #define CSQC_Shutdown _CSQC_Shutdown 296 void _CSQC_UpdateView(
entity this,
float w,
float h);
298 #define CSQC_UpdateView _CSQC_UpdateView 300 bool _CSQC_InputEvent(
int inputType,
float nPrimary,
float nSecondary);
303 return _CSQC_InputEvent ? _CSQC_InputEvent(inputType, nPrimary, nSecondary) :
false;
305 #define CSQC_InputEvent _CSQC_InputEvent 307 bool _CSQC_ConsoleCommand(
string s);
309 #define CSQC_ConsoleCommand _CSQC_ConsoleCommand 311 void _CSQC_Ent_Update(
entity this,
bool isNew);
313 #define CSQC_Ent_Update _CSQC_Ent_Update 315 void _CSQC_Ent_Remove(
entity this);
317 #define CSQC_Ent_Remove _CSQC_Ent_Remove
void ClientConnect(entity this)
ClientConnect
void ClientKill(entity this)
void SetChangeParms(entity this)
void PlayerPostThink(entity this)
void PlayerPreThink(entity this)
void isnt_int(float this)
void SV_OnEntityPreSpawnFunction(entity this)
void SV_ParseClientCommand(entity this, string command)
void SV_ChangeTeam(entity player, int new_color)
Called when the player changes color with the "color" command.
void CSQC_Ent_Remove(entity this)
void CSQC_Ent_Update(entity this, bool isnew)
void CSQC_UpdateView(entity this, float w, float h)
void make_safe_for_remove(entity e)
bool CSQC_ConsoleCommand(string command)
float CSQC_InputEvent(int bInputType, float nPrimary, float nSecondary)
void isnt_bool(float this)