GetSpriteTexture returns a valid, non-null texture if the actor's sprite doesn't exist

Is there something that doesn't work right in the latest GZDoom? Post about it here.

Moderator: GZDoom Developers

Forum rules
Please construct and post a simple demo whenever possible for all bug reports. Please provide links to everything.

If you can include a wad demonstrating the problem, please do so. Bug reports that include fully-constructed demos have a much better chance of being investigated in a timely manner than those that don't.

Please make a new topic for every bug. Don't combine multiple bugs into a single topic. Thanks!
User avatar
Jekyll Grim Payne
 
 
Posts: 1061
Joined: Mon Jul 21, 2008 4:08 am
Preferred Pronouns: He/Him
Graphics Processor: nVidia (Modern GZDoom)

GetSpriteTexture returns a valid, non-null texture if the actor's sprite doesn't exist

Post by Jekyll Grim Payne »

If an actor whose sprites don't exist is spawned dynamically at runtime, its sprites seem to be remapped to TNT1A0 so it's allowed to exist but not render. Calling GetSpriteTexture() on its current sprite OR on its defaults.spawnstate.sprite returns a texture that is considered valid and non-null.

Test with the attached archive:
1. Run with doom2.wad
2. Open console and execute netevent spawntest command
3. Observe the debug prints in the console

Expected behavior: the texture must be considered null and not valid
Observed behavior: IsNull() returns false, IsValid() returns true on both textures.

ValidateSpriteFrame works as expected. However, by all accounts the texture should be null as well.
You do not have the required permissions to view the files attached to this post.

Return to “Bugs [GZDoom]”