#define bool float
#endif
+#ifndef QCC_SUPPORT_ERASEABLE
+ #define ERASEABLE
+#else
+ #define ERASEABLE [[eraseable]]
+#endif
+
#include <dpdefs/pre.qh>
#if defined(CSQC)
MACRO_END
#endif
-#define is_float(this) (true || ftoe(this))
-#define isnt_float(this)
-#define is_vector(this) (true || vtos(this))
-#define isnt_vector(this)
-#define is_string(this) (true || stof(this))
-#define isnt_string(this)
-#define is_entity(this) (true || etof(this))
-#define isnt_entity(this)
-bool is_int(float this) { return this == floor(this); }
-void isnt_int(float this) { print(ftos(this)); }
-bool is_bool(float this) { return this == true || this == false; }
-void isnt_bool(float this) { print(ftos(this)); }
+#if !(NDEBUG)
+ #define is_float(this) (true || ftoe(this))
+ #define isnt_float(this)
+ #define is_vector(this) (true || vtos(this))
+ #define isnt_vector(this)
+ #define is_string(this) (true || stof(this))
+ #define isnt_string(this)
+ #define is_entity(this) (true || etof(this))
+ #define isnt_entity(this)
+ bool is_int(float this) { return this == floor(this); }
+ void isnt_int(float this) { print(ftos(this)); }
+ bool is_bool(float this) { return this == true || this == false; }
+ void isnt_bool(float this) { print(ftos(this)); }
+#endif
#include "warpzone/mathlib.qc"
#define SV_Shutdown _SV_Shutdown
void _StartFrame();
- void StartFrame() { if (_StartFrame) _StartFrame(); }
+ bool _StartFrame_init;
+ void spawnfunc_worldspawn(entity);
+ void StartFrame() {
+ if (!_StartFrame_init) {
+ _StartFrame_init = true;
+ float oldtime = time; time = 1;
+ __spawnfunc_expecting = 2; NULL.__spawnfunc_constructor(NULL);
+ time = oldtime;
+ }
+ if (_StartFrame) _StartFrame();
+ }
#define StartFrame _StartFrame
void _SetNewParms();
void SV_OnEntityPreSpawnFunction()
{
ENGINE_EVENT();
- if (_SV_OnEntityPreSpawnFunction) _SV_OnEntityPreSpawnFunction(this);
+ __spawnfunc_expecting = true;
+ __spawnfunc_expect = this;
}
#define SV_OnEntityPreSpawnFunction _SV_OnEntityPreSpawnFunction