From ffdfacf539f951ec0ad8bac7fd1a9832ca6603ef Mon Sep 17 00:00:00 2001 From: terencehill Date: Thu, 26 Jul 2018 14:14:22 +0200 Subject: [PATCH] Rename .old_solid to .solid_prev as the former is persistent in sandbox code --- qcsrc/common/debug.qh | 6 +++--- qcsrc/server/miscfunctions.qc | 9 +++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/qcsrc/common/debug.qh b/qcsrc/common/debug.qh index 41c5d3017..b1dea6dcc 100644 --- a/qcsrc/common/debug.qh +++ b/qcsrc/common/debug.qh @@ -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); diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index a9d50e7ba..26a9982b0 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -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; -- 2.39.2