#include "nil.qh"
#include "static.qh"
-.vector origin;
-
+// pure entities: not linked to the area grid
+// see: sv_areagrid_link_SOLID_NOT and cl_areagrid_link_SOLID_NOT
.bool pure_data;
-#define is_pure(e) ((e).pure_data)
-/** @deprecated use new_pure or NEW(class) */
-#define make_pure(e) MACRO_BEGIN \
- (e).pure_data = true; \
-MACRO_END
-#define make_impure(e) MACRO_BEGIN \
- (e).pure_data = false; \
-MACRO_END
+
+#ifdef GAMEQC
+ /** direct use is @deprecated use new_pure or NEW(class) */
+ #define make_pure(e) \
+ (e).pure_data = true; \
+ (e).solid = SOLID_NOT;
+ #define is_pure(e) ((e).pure_data && (e).solid == SOLID_NOT)
+#else
+ #define make_pure(e) \
+ (e).pure_data = true;
+ #define is_pure(e) ((e).pure_data)
+#endif // GAMEQC
+#define make_impure(e) \
+ (e).pure_data = false;
.string classname;
/** Location entity was spawned from in source */
#define SPAWN_PURE 0
#endif
-// pure entities: need no .origin
#if SPAWN_PURE
entity spawn_pure() = #600;
#else
#define classfield(name) [[class(name)]]
#define _new(class, pure) ((class) __spawn(#class, __FILE__ ":" STR(__LINE__), pure))
#endif
-/** entities you care about seeing (.origin works) */
+/** entities you care about collisions with */
#define new(class) _new(class, false)
-/** purely logical entities (.origin doesn't work) */
+/** purely logical entities (not linked to the area grid) */
#define new_pure(class) _new(class, true)
#define spawn() __spawn("entity", __FILE__ ":" STR(__LINE__), false)
// Interpreted in post-config.cfg.
seta menu_forced_saved_cvars "" "These cvars will always be saved, despite engine/Xonotic cvar saving status"
set menu_reverted_nonsaved_cvars "" "These cvars are currently marked as saved in the flags, but have been reverted and won't stay saved. INTERNAL USE ONLY."
+
+// Avoid perf problems near '0 0 0'; `set` without a description is because only current DP has this engine cvar
+set cl_areagrid_link_SOLID_NOT 0