forked from Mirrors/openclonk
Render objects in front of landscape only once
The plane limits in C4ObjectList::Draw were not properly checked, leading to objects in front of the landscape being drawn twice (once before the landscape was rendered, and once after).liquid_container
parent
bfd9989fc6
commit
48ccc5f983
|
@ -384,7 +384,7 @@ void C4ObjectList::Draw(C4TargetFacet &cgo, int iPlayer, int MinPlane, int MaxPl
|
|||
// Draw objects (base)
|
||||
for (clnk=first; clnk; clnk=clnk->Prev)
|
||||
{
|
||||
if (first->Obj->GetPlane() > MaxPlane)
|
||||
if (clnk->Obj->GetPlane() > MaxPlane)
|
||||
break;
|
||||
if (clnk->Obj->Category & C4D_Foreground)
|
||||
continue;
|
||||
|
@ -393,7 +393,7 @@ void C4ObjectList::Draw(C4TargetFacet &cgo, int iPlayer, int MinPlane, int MaxPl
|
|||
// Draw objects (top face)
|
||||
for (clnk=first; clnk; clnk=clnk->Prev)
|
||||
{
|
||||
if (first->Obj->GetPlane() > MaxPlane)
|
||||
if (clnk->Obj->GetPlane() > MaxPlane)
|
||||
break;
|
||||
if (clnk->Obj->Category & C4D_Foreground)
|
||||
continue;
|
||||
|
|
Loading…
Reference in New Issue