Added ZSprites.

- Effectively similar to Actors, but without the excess.
- Can be created with either the `level` function or the static `Spawn` function in ZSprite.
- STAT_SPRITE belongs to ZSprites only; ZSprites cannot be moved out of, nor can anything else be moved in to, this statnum.

Misc:

- Fixed (Sprite)Offset taking roll into account.

Crediting phantombeta, RicardoLuis0 and RaveYard for assistance.
This commit is contained in:
Major Cooke 2023-09-23 21:48:00 -05:00 committed by Rachael Alexanderson
commit b6b1b25035
15 changed files with 600 additions and 135 deletions

View file

@ -926,6 +926,11 @@ static DObject *BuiltinNewDoom(PClass *cls, int outerside, int backwardscompatib
ThrowAbortException(X_OTHER, "Cannot create actors with 'new'");
return nullptr;
}
if (cls->IsDescendantOf(NAME_ZSprite)) // Same for ZSprites.
{
ThrowAbortException(X_OTHER, "Cannot create ZSprite or inheriting classes with 'new'. Use 'ZSprite.Spawn' instead.");
return nullptr;
}
if ((vm_warnthinkercreation || !backwardscompatible) && cls->IsDescendantOf(NAME_Thinker))
{
// This must output a diagnostic warning