mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-23 12:32:34 +00:00
Changed zero RenderRadius logic - thing should still link to own sector
This commit is contained in:
parent
fcd8a0ce92
commit
40a180c15f
1 changed files with 43 additions and 40 deletions
|
@ -6651,9 +6651,8 @@ void P_CreateSecNodeList(AActor *thing)
|
||||||
void P_LinkRenderSectors(AActor* thing)
|
void P_LinkRenderSectors(AActor* thing)
|
||||||
{
|
{
|
||||||
// if this thing has RenderStyle None, don't link it anywhere.
|
// if this thing has RenderStyle None, don't link it anywhere.
|
||||||
if (thing->renderradius == 0)
|
if (thing->renderradius != 0)
|
||||||
return;
|
{
|
||||||
|
|
||||||
FBoundingBox box(thing->X(), thing->Y(), thing->renderradius > 0 ? thing->renderradius : thing->renderradius);
|
FBoundingBox box(thing->X(), thing->Y(), thing->renderradius > 0 ? thing->renderradius : thing->renderradius);
|
||||||
FBlockLinesIterator it(box);
|
FBlockLinesIterator it(box);
|
||||||
line_t *ld;
|
line_t *ld;
|
||||||
|
@ -6685,6 +6684,7 @@ void P_LinkRenderSectors(AActor* thing)
|
||||||
ld->backsector->touching_render_things->push_front(thing);
|
ld->backsector->touching_render_things->push_front(thing);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// add to own sector
|
// add to own sector
|
||||||
if (!thing->Sector->touching_render_things) thing->Sector->touching_render_things = new std::forward_list<AActor*>();
|
if (!thing->Sector->touching_render_things) thing->Sector->touching_render_things = new std::forward_list<AActor*>();
|
||||||
|
@ -6702,6 +6702,8 @@ void P_LinkRenderSectors(AActor* thing)
|
||||||
|
|
||||||
void P_UnlinkRenderSectors(AActor* thing)
|
void P_UnlinkRenderSectors(AActor* thing)
|
||||||
{
|
{
|
||||||
|
if (thing->renderradius != 0)
|
||||||
|
{
|
||||||
if (thing->touching_render_sectors)
|
if (thing->touching_render_sectors)
|
||||||
{
|
{
|
||||||
for (std::forward_list<sector_t*>::iterator it = thing->touching_render_sectors->begin();
|
for (std::forward_list<sector_t*>::iterator it = thing->touching_render_sectors->begin();
|
||||||
|
@ -6722,6 +6724,7 @@ void P_UnlinkRenderSectors(AActor* thing)
|
||||||
delete thing->touching_render_sectors;
|
delete thing->touching_render_sectors;
|
||||||
thing->touching_render_sectors = NULL;
|
thing->touching_render_sectors = NULL;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (thing->Sector->touching_render_things)
|
if (thing->Sector->touching_render_things)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue