]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/lib/spawnfunc.qh
Don't shake the hud when changing spectated player
[xonotic/xonotic-data.pk3dir.git] / qcsrc / lib / spawnfunc.qh
index 7938bacde4d75014b729019305f1afa25e9a63fd..22047bbc9daac0d285478015cbecbcf14ceb6303 100644 (file)
@@ -35,20 +35,19 @@ noref bool require_spawnfunc_prefix;
                void __spawnfunc_##id(entity this); \
                [[accumulate]] void spawnfunc_##id(entity this) \
                { \
-                       if (self == __spawnfunc_expect) \
+                       if (__self == __spawnfunc_expect) \
                        { \
                                /* engine call */ \
                                __spawnfunc_expect = NULL; \
-                               this = self; \
+                               this = __self; \
                        } \
                        else \
                        { \
                                assert(this); \
                        } \
-                       if (!this.sourceLocFile) \
+                       if (!this.sourceLoc) \
                        { \
-                               this.sourceLocFile = __FILE__; \
-                               this.sourceLocLine = __LINE__; \
+                               this.sourceLoc = __FILE__ ":" STR(__LINE__); \
                        } \
                        if (!this.spawnfunc_checked) \
                        { \
@@ -83,8 +82,7 @@ noref bool require_spawnfunc_prefix;
 
        #define FIELDS_COMMON(fld) \
                FIELD_SCALAR(fld, classname) \
-               FIELD_SCALAR(fld, sourceLocFile) \
-               FIELD_SCALAR(fld, sourceLocLine) \
+               FIELD_SCALAR(fld, sourceLoc) \
                FIELD_SCALAR(fld, spawnfunc_checked) \
                FIELD_VEC(fld, origin) \
                /**/
@@ -154,6 +152,7 @@ noref bool require_spawnfunc_prefix;
                FIELD_SCALAR(fld, platmovetype) \
                FIELD_SCALAR(fld, race_place) \
                FIELD_SCALAR(fld, radius) \
+               FIELD_SCALAR(fld, respawntimestart) \
                FIELD_SCALAR(fld, respawntimejitter) \
                FIELD_SCALAR(fld, respawntime) \
                FIELD_SCALAR(fld, restriction) \