]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/lib/oo.qh
Merge branch 'master' into Lyberta/WaypointIcons
[xonotic/xonotic-data.pk3dir.git] / qcsrc / lib / oo.qh
index e482d7d9ac9b1afab49ae9279ced927e0aa5ce4e..a2cef664bad3b72f9936ab371b12087c1e362027 100644 (file)
@@ -39,12 +39,6 @@ entity __spawn(string _classname, string _sourceLoc, bool pure)
        this.sourceLoc = _sourceLoc;
        if (pure) {
                make_pure(this);
-               #ifdef CSQC
-               setorigin(this, (world.mins + world.maxs) * 0.5);
-               #endif
-               #ifdef SVQC
-        setorigin(this, (world.mins + world.maxs) * 0.5);
-        #endif
        }
        return this;
 }
@@ -56,11 +50,11 @@ entity __spawn(string _classname, string _sourceLoc, bool pure)
 #ifndef QCC_SUPPORT_ENTITYCLASS
        #define entityclass_2(name, base) USING(name, entity)
        #define classfield(name)
-       #define _new(class, pure) __spawn( #class, __FILE__ ":" STR(__LINE__), pure)
+       #define _new(class, pure) __spawn(#class, __FILE__ ":" STR(__LINE__), pure)
 #else
        #define entityclass_2(name, base) entityclass name : base {}
        #define classfield(name) [[class(name)]]
-       #define _new(class, pure) ((class) __spawn( #class, __FILE__ ":" STR(__LINE__), pure))
+       #define _new(class, pure) ((class) __spawn(#class, __FILE__ ":" STR(__LINE__), pure))
 #endif
 /** entities you care about seeing (.origin works) */
 #define new(class) _new(class, false)
@@ -75,13 +69,13 @@ ACCUMULATE void ONREMOVE(entity this) {}
 #endif
 
 .void(entity this) dtor;
-#define delete(this) MACRO_BEGIN \
+#define delete(this) MACRO_BEGIN \
     entity _this = (this); \
     void(entity) _dtor = _this.dtor; \
     ONREMOVE(this); \
     if (_dtor) _dtor(_this); else delete_fn(_this); \
     /* this = NULL; */  \
-MACRO_END
+MACRO_END
 
 entity _clearentity_ent;
 STATIC_INIT(clearentity)
@@ -328,7 +322,7 @@ CLASS(Object)
        {
                TC(Object, this);
                string s = _("No description");
-               if (cvar("developer"))
+               if (cvar("developer") > 0)
                {
                        for (int i = 0, n = numentityfields(); i < n; ++i)
                        {