mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-28 12:30:46 +00:00
- Exhumed: changed MoveSectorSprites so it only moves sprites that actually stand on the sector's floor.
Since this had no check for z it even moved things floating above a lift or players hanging over a dropoff with the lift below.
This commit is contained in:
parent
fc11f537f7
commit
91f8df48c6
1 changed files with 8 additions and 2 deletions
|
@ -683,12 +683,18 @@ int CheckSectorSprites(short nSector, int nVal)
|
|||
// done
|
||||
void MoveSectorSprites(int nSector, int z)
|
||||
{
|
||||
int newz = sector[nSector].floorz;
|
||||
int oldz = newz - z;
|
||||
int minz = std::min(newz, oldz);
|
||||
int maxz = std::max(newz, oldz);
|
||||
int nSprite;
|
||||
SectIterator it(nSector);
|
||||
while ((nSprite = it.NextIndex()) >= 0)
|
||||
{
|
||||
if (sprite[nSprite].statnum != 200) {
|
||||
sprite[nSprite].z += z;
|
||||
int z = sprite[nSprite].z;
|
||||
if (sprite[nSprite].statnum != 200 && z >= minz && z <= maxz)
|
||||
{
|
||||
sprite[nSprite].z = newz;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue