From: terencehill Date: Thu, 26 Jul 2018 12:14:22 +0000 (+0200) Subject: Rename .old_solid to .solid_prev as the former is persistent in sandbox code X-Git-Tag: xonotic-v0.8.5~1930^2~2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ffdfacf539f951ec0ad8bac7fd1a9832ca6603ef;p=xonotic%2Fxonotic-data.pk3dir.git Rename .old_solid to .solid_prev as the former is persistent in sandbox code --- 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;