mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-18 22:51:50 +00:00
- Miscellaneous fixes to commit to change sector checks over to validSectorIndex()
.
* Fix missed changeover in Blood's `actSpawnSprite()`. * Fix non-negated check on a `validSectorIndex()` call in Blood's `debrisMove()`. * Removed a superfluous terminator in Duke's `actor.cpp`. * Fixed bad call to `validSectorIndex()` in Exhumed's `AIAnim::Tick()`.
This commit is contained in:
parent
999ec3c95a
commit
c6f2aaf1b7
4 changed files with 4 additions and 10 deletions
|
@ -6402,7 +6402,7 @@ DBloodActor* actSpawnSprite(DBloodActor* source, int nStat)
|
|||
BloodStatIterator it(kStatPurge);
|
||||
actor = it.Next();
|
||||
assert(actor);
|
||||
assert(pSource->sectnum >= 0 && pSource->sectnum < kMaxSectors);
|
||||
assert(validSectorIndex(pSource->sectnum));
|
||||
ChangeActorSect(actor, pSource->sectnum);
|
||||
actPostSprite(actor, nStat);
|
||||
}
|
||||
|
|
|
@ -1692,17 +1692,11 @@ void debrisMove(int listIndex)
|
|||
spritetype* pSprite = &actor->s();
|
||||
int nSector = pSprite->sectnum;
|
||||
|
||||
if (!actor->hasX())
|
||||
if (!actor->hasX() || !validSectorIndex(pSprite->sectnum))
|
||||
{
|
||||
gPhysSpritesList[listIndex] = nullptr;
|
||||
return;
|
||||
}
|
||||
else if (validSectorIndex(pSprite->sectnum))
|
||||
{
|
||||
gPhysSpritesList[listIndex] = nullptr;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
int top, bottom, i;
|
||||
GetActorExtents(actor, &top, &bottom);
|
||||
|
|
|
@ -2255,7 +2255,7 @@ bool jibs(DDukeActor *actor, int JIBS6, bool timeout, bool callsetsprite, bool f
|
|||
if (callsetsprite) setsprite(actor, s->pos);
|
||||
|
||||
// this was after the slope calls, but we should avoid calling that for invalid sectors.
|
||||
if (!validSectorIndex(s->sectnum));
|
||||
if (!validSectorIndex(s->sectnum))
|
||||
{
|
||||
deletesprite(actor);
|
||||
return false;
|
||||
|
|
|
@ -149,7 +149,7 @@ void AIAnim::Tick(RunListEvent* ev)
|
|||
|
||||
if (pSpriteB->sectnum != pSprite->sectnum)
|
||||
{
|
||||
if (!validSectorIndex(pSpriteB))
|
||||
if (!validSectorIndex(pSpriteB->sectnum))
|
||||
{
|
||||
DestroyAnim(pActor);
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue