- fixed deletion of FAF_COPY actors.

This called the wrong function.
This commit is contained in:
Christoph Oelckers 2021-11-17 17:01:10 +01:00
parent 845cf124e1
commit f66dcd8d53
2 changed files with 4 additions and 10 deletions

View file

@ -1226,7 +1226,7 @@ PostDraw(void)
it.Reset(STAT_FAF_COPY);
while (auto actor = it.Next())
{
actor->u()->Clear();
actor->clearUser();
deletesprite(actor->GetSpriteIndex());
}
}

View file

@ -12,21 +12,15 @@ class DSWActor
public:
int cumulDamage;
DSWActor() :index(int(this - base())) { /*assert(index >= 0 && index < kMaxSprites);*/ }
DSWActor& operator=(const DSWActor& other) = default;
void Clear()
{
clearUser();
}
bool hasU() { return User[index].Data() != nullptr; }
/*
void addU()
{
if (s().extra == -1) dbInsertXSprite(s().index);
}
*/
spritetype& s() { return sprite[index]; }
USER* u() { return User[index].Data(); }
USER* allocUser()
@ -39,7 +33,7 @@ public:
void clearUser()
{
User[index].Clear();
if (hasU()) User[index].Clear();
}
int GetIndex()