]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Rename .old_solid to .solid_prev as the former is persistent in sandbox code
authorterencehill <piuntn@gmail.com>
Thu, 26 Jul 2018 12:14:22 +0000 (14:14 +0200)
committerterencehill <piuntn@gmail.com>
Thu, 26 Jul 2018 12:14:22 +0000 (14:14 +0200)
qcsrc/common/debug.qh
qcsrc/server/miscfunctions.qc

index 41c5d3017eada07992e8ba6ae102827da85525d4..b1dea6dcc431a84c1063d36f567047222c3d530c 100644 (file)
@@ -292,7 +292,7 @@ MUTATOR_HOOKFUNCTION(trace, SV_StartFrame)
                it.debug_trace_button = btn;
                if (!btn || skip) continue;
                FOREACH_ENTITY(true, {
-                   it.solid_prev = it.solid;
+                       it.solid_prev = it.solid;
                        it.solid = SOLID_BBOX;
                });
                vector forward = '0 0 0'; vector right = '0 0 0'; vector up = '0 0 0';
@@ -300,8 +300,8 @@ MUTATOR_HOOKFUNCTION(trace, SV_StartFrame)
                vector pos = it.origin + it.view_ofs;
                traceline(pos, pos + forward * max_shot_distance, MOVE_NORMAL, it);
                FOREACH_ENTITY(true, {
-                   it.solid = it.solid_prev;
-            it.solid_prev = 0;
+                       it.solid = it.solid_prev;
+                       it.solid_prev = 0;
                });
                entity e = trace_ent;
                int i = etof(e);
index a9d50e7ba9b51c7be0f5b90a10a23f45cd79a7fb..26a9982b080477219014f5cb2072790aeec60b64 100644 (file)
@@ -219,7 +219,7 @@ string AmmoNameFromWeaponentity(Weapon wep)
        return ammoitems;
 }
 
-.float old_solid;
+.int solid_prev;
 string formatmessage(entity this, string msg)
 {
        float p, p1, p2;
@@ -253,18 +253,19 @@ string formatmessage(entity this, string msg)
 
                if (p < 0)
                        break;
-               
+
                if(!traced)
                {
                        IL_EACH(g_items, true,
                        {
-                               it.old_solid = it.solid;
+                               it.solid_prev = it.solid;
                                it.solid = SOLID_BSP;
                        });
                        WarpZone_crosshair_trace(this);
                        IL_EACH(g_items, true,
                        {
-                               it.solid = it.old_solid;
+                               it.solid = it.solid_prev;
+                               it.solid_prev = 0;
                        });
                        cursor = trace_endpos;
                        cursor_ent = trace_ent;