From: terencehill Date: Mon, 6 Aug 2018 06:38:17 +0000 (+0200) Subject: Remove redundant use of .ctrace_solidchanged field from crosshair_trace_plusvisibletr... X-Git-Tag: xonotic-v0.8.5~1930^2~1 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=af72d0b3442c3168d1a537afc015ef92b448c503;p=xonotic%2Fxonotic-data.pk3dir.git Remove redundant use of .ctrace_solidchanged field from crosshair_trace_plusvisibletriggers --- diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index 26a9982b0..11d7a8b5c 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -40,7 +40,7 @@ void crosshair_trace(entity pl) { traceline_antilag(pl, CS(pl).cursor_trace_start, CS(pl).cursor_trace_start + normalize(CS(pl).cursor_trace_endpos - CS(pl).cursor_trace_start) * max_shot_distance, MOVE_NORMAL, pl, ANTILAG_LATENCY(pl)); } -.bool ctrace_solidchanged; + void crosshair_trace_plusvisibletriggers(entity pl) { FOREACH_ENTITY_FLOAT(solid, SOLID_TRIGGER, @@ -48,21 +48,17 @@ void crosshair_trace_plusvisibletriggers(entity pl) if(it.model != "") { it.solid = SOLID_BSP; - it.ctrace_solidchanged = true; IL_PUSH(g_ctrace_changed, it); } }); crosshair_trace(pl); - IL_EACH(g_ctrace_changed, it.ctrace_solidchanged, - { - it.solid = SOLID_TRIGGER; - it.ctrace_solidchanged = false; - }); + IL_EACH(g_ctrace_changed, true, { it.solid = SOLID_TRIGGER; }); IL_CLEAR(g_ctrace_changed); } + void WarpZone_crosshair_trace(entity pl) { WarpZone_traceline_antilag(pl, CS(pl).cursor_trace_start, CS(pl).cursor_trace_start + normalize(CS(pl).cursor_trace_endpos - CS(pl).cursor_trace_start) * max_shot_distance, MOVE_NORMAL, pl, ANTILAG_LATENCY(pl));