mirror of
https://github.com/ZDoom/Raze.git
synced 2025-03-25 18:21:47 +00:00
- make RR's ingame thunder effect not depend on having seen one specific texture.
This really should check if the player has seen one sector where the effect is active.
This commit is contained in:
parent
8208c7fc0b
commit
6248c8813b
3 changed files with 14 additions and 2 deletions
|
@ -100,6 +100,7 @@ enum ESectorExBits
|
|||
SECTOREX_CLOUDSCROLL = 1,
|
||||
SECTOREX_DRAGGED = 2,
|
||||
SECTOREX_DONTCLIP = 4,
|
||||
SECTOREX_SEEN = 8,
|
||||
};
|
||||
|
||||
// Flags for retriangulation
|
||||
|
|
|
@ -319,6 +319,7 @@ void HWFlat::ProcessSector(HWDrawInfo *di, sectortype * frontsector, int section
|
|||
PlanesAtPoint(frontsector, vp.Pos.X, -vp.Pos.Y, &ceilz, &florz);
|
||||
|
||||
visibility = sectorVisibility(frontsector);
|
||||
frontsector->exflags |= SECTOREX_SEEN;
|
||||
sec = frontsector;
|
||||
section = section_;
|
||||
Sprite = nullptr;
|
||||
|
|
|
@ -479,8 +479,18 @@ void thunder(void)
|
|||
}
|
||||
if (!winderflash && isRR())
|
||||
{
|
||||
auto tex = tileGetTexture(RTILE_CURTAINS); // this cannot be easily generalized. :(
|
||||
if (tex->isSeen(true))
|
||||
bool seen = false;
|
||||
for (i = 0; i < lightnincnt; i++)
|
||||
{
|
||||
auto sectp = lightninsector[i];
|
||||
if (sectp->exflags & SECTOREX_SEEN)
|
||||
{
|
||||
seen = true;
|
||||
sectp->exflags &= ~SECTOREX_SEEN;
|
||||
}
|
||||
}
|
||||
|
||||
if (seen)
|
||||
{
|
||||
if (krand() > 65000)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue