Changed zero RenderRadius logic - thing should still link to own sector

This commit is contained in:
ZZYZX 2016-12-25 13:37:45 +02:00
parent fcd8a0ce92
commit 40a180c15f

View file

@ -6651,9 +6651,8 @@ 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)
return;
if (thing->renderradius != 0)
{
FBoundingBox box(thing->X(), thing->Y(), thing->renderradius > 0 ? thing->renderradius : thing->renderradius);
FBlockLinesIterator it(box);
line_t *ld;
@ -6685,6 +6684,7 @@ void P_LinkRenderSectors(AActor* thing)
ld->backsector->touching_render_things->push_front(thing);
}
}
}
// add to own sector
if (!thing->Sector->touching_render_things) thing->Sector->touching_render_things = new std::forward_list<AActor*>();
@ -6701,6 +6701,8 @@ void P_LinkRenderSectors(AActor* thing)
//=============================================================================
void P_UnlinkRenderSectors(AActor* thing)
{
if (thing->renderradius != 0)
{
if (thing->touching_render_sectors)
{
@ -6722,6 +6724,7 @@ void P_UnlinkRenderSectors(AActor* thing)
delete thing->touching_render_sectors;
thing->touching_render_sectors = NULL;
}
}
if (thing->Sector->touching_render_things)
{