From 44c19b5ad9936902770f0bb0d348c5dfdfe90396 Mon Sep 17 00:00:00 2001 From: ZZYZX Date: Sun, 25 Dec 2016 13:40:21 +0200 Subject: [PATCH] Changed zero RenderRadius logic - negative values now used for 'no rendering', restored old logic with max(radius, renderradius) --- src/p_map.cpp | 6 +++--- wadsrc/static/zscript/actor.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/p_map.cpp b/src/p_map.cpp index 367e8d3c3e..ca83d342d8 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -6651,9 +6651,9 @@ void P_CreateSecNodeList(AActor *thing) void P_LinkRenderSectors(AActor* thing) { // if this thing has RenderStyle None, don't link it anywhere. - if (thing->renderradius != 0) + if (thing->renderradius >= 0) { - FBoundingBox box(thing->X(), thing->Y(), thing->renderradius > 0 ? thing->renderradius : thing->renderradius); + FBoundingBox box(thing->X(), thing->Y(), std::max(thing->radius, thing->renderradius)); FBlockLinesIterator it(box); line_t *ld; @@ -6702,7 +6702,7 @@ void P_LinkRenderSectors(AActor* thing) void P_UnlinkRenderSectors(AActor* thing) { - if (thing->renderradius != 0) + if (thing->renderradius >= 0) { if (thing->touching_render_sectors) { diff --git a/wadsrc/static/zscript/actor.txt b/wadsrc/static/zscript/actor.txt index 34bc9d3595..2ced709aee 100644 --- a/wadsrc/static/zscript/actor.txt +++ b/wadsrc/static/zscript/actor.txt @@ -202,7 +202,7 @@ class Actor : Thinker native Health DEFAULT_HEALTH; Reactiontime 8; Radius 20; - RenderRadius -1; + RenderRadius 0; Height 16; Mass 100; RenderStyle 'Normal';