mirror of
https://github.com/ZDoom/Raze.git
synced 2025-02-01 12:50:56 +00:00
- Exhumed: Return early in movesprite()
if the actor's sector is null.
* This is what PowerSlaveGDX does. * Fixes #1010.
This commit is contained in:
parent
6c70211238
commit
3496d5cac5
1 changed files with 8 additions and 4 deletions
|
@ -421,17 +421,21 @@ Collision movesprite(DExhumedActor* pActor, DVector2 vect, double dz, double flo
|
|||
auto spos = pActor->spr.pos;
|
||||
double nSpriteHeight = GetActorHeight(pActor);
|
||||
auto pSector = pActor->sector();
|
||||
assert(pSector);
|
||||
Collision nRet{};
|
||||
|
||||
double floorZ = pSector->floorz;
|
||||
if (!pSector)
|
||||
{
|
||||
assert(pSector);
|
||||
return nRet;
|
||||
}
|
||||
|
||||
if ((pSector->Flag & kSectUnderwater) || (floorZ < spos.Z))
|
||||
if ((pSector->Flag & kSectUnderwater) || (pSector->floorz < spos.Z))
|
||||
{
|
||||
vect *= 0.5;
|
||||
}
|
||||
|
||||
sectortype* overridesect;
|
||||
Collision nRet = movespritez(pActor, dz, nSpriteHeight, pActor->clipdist, &overridesect);
|
||||
nRet = movespritez(pActor, dz, nSpriteHeight, pActor->clipdist, &overridesect);
|
||||
|
||||
pSector = pActor->sector(); // modified in movespritez so re-grab this variable
|
||||
|
||||
|
|
Loading…
Reference in a new issue