- Exhumed: Move AISpider's null chunk texture check into the getter.

* It's needed for the rat as well...
This commit is contained in:
Mitchell Richters 2023-04-16 18:44:17 +10:00
parent 408c71513b
commit 1162954b03
2 changed files with 2 additions and 2 deletions

View file

@ -43,7 +43,7 @@ struct SeqFrame
const FTextureID getFirstTexID() const
{
return chunks[0].tex;
return chunks.Size() ? chunks[0].tex : FNullTextureID();
}
const void playSound(DExhumedActor* const pActor) const

View file

@ -122,7 +122,7 @@ void AISpider::Tick(RunListEvent* ev)
const auto& spiderSeq = getSequence(spp->nSeqFile, SpiderSeq[nAction].nSeqId);
const auto& seqFrame = spiderSeq.frames[spp->nFrame];
spp->spr.setspritetexture(spp->nFrame < 9 ? seqFrame.getFirstTexID() : FNullTextureID());
spp->spr.setspritetexture(seqFrame.getFirstTexID());
seqFrame.playSound(spp);