mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-28 06:32:29 +00:00
- seems I missed this part...
This commit is contained in:
parent
4eb5f10b02
commit
7ab7fc9a57
1 changed files with 10 additions and 0 deletions
|
@ -391,6 +391,16 @@ void ADynamicLight::UpdateLocation()
|
||||||
Prev = target->Pos();
|
Prev = target->Pos();
|
||||||
subsector = R_PointInSubsector(Prev);
|
subsector = R_PointInSubsector(Prev);
|
||||||
Sector = subsector->sector;
|
Sector = subsector->sector;
|
||||||
|
|
||||||
|
// Some z-coordinate fudging to prevent the light from getting too close to the floor or ceiling planes. With proper attenuation this would render them invisible.
|
||||||
|
// A distance of 5 is needed so that the light's effect doesn't become too small.
|
||||||
|
if (Z() < target->floorz + 5.) SetZ(target->floorz + 5.);
|
||||||
|
else if (Z() > target->ceilingz - 5.) SetZ(target->ceilingz - 5.);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (Z() < floorz + 5.) SetZ(floorz + 5.);
|
||||||
|
else if (Z() > ceilingz - 5.) SetZ(ceilingz - 5.);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue