From fcd8a0ce9259f1bf22daca836067a525b786cdfc Mon Sep 17 00:00:00 2001 From: ZZYZX Date: Sun, 25 Dec 2016 13:35:03 +0200 Subject: [PATCH] Reverted STYLE_None change to P_LinkRenderSectors, implemented zero RenderRadius that effectively disables rendering of an actor entirely --- src/p_map.cpp | 4 ++-- wadsrc/static/zscript/actor.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/p_map.cpp b/src/p_map.cpp index a194f2de3..54aec251f 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -6651,10 +6651,10 @@ void P_CreateSecNodeList(AActor *thing) void P_LinkRenderSectors(AActor* thing) { // if this thing has RenderStyle None, don't link it anywhere. - if (thing->RenderStyle == LegacyRenderStyles[STYLE_None]) + if (thing->renderradius == 0) return; - FBoundingBox box(thing->X(), thing->Y(), std::max(thing->renderradius, thing->radius)); + FBoundingBox box(thing->X(), thing->Y(), thing->renderradius > 0 ? thing->renderradius : thing->renderradius); FBlockLinesIterator it(box); line_t *ld; diff --git a/wadsrc/static/zscript/actor.txt b/wadsrc/static/zscript/actor.txt index 2ced709ae..34bc9d359 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 0; + RenderRadius -1; Height 16; Mass 100; RenderStyle 'Normal';