mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-31 21:20:39 +00:00
- fixed deletion of FAF_COPY actors.
This called the wrong function.
This commit is contained in:
parent
845cf124e1
commit
f66dcd8d53
2 changed files with 4 additions and 10 deletions
|
@ -1226,7 +1226,7 @@ PostDraw(void)
|
|||
it.Reset(STAT_FAF_COPY);
|
||||
while (auto actor = it.Next())
|
||||
{
|
||||
actor->u()->Clear();
|
||||
actor->clearUser();
|
||||
deletesprite(actor->GetSpriteIndex());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue