GetSpriteTexture cannot obtain the current sprite of MapMarker

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
Global Moderator
Posts: 1117
Joined: Mon Jul 21, 2008 4:08 am
Preferred Pronouns: He/Him
Graphics Processor: nVidia (Modern GZDoom)

GetSpriteTexture cannot obtain the current sprite of MapMarker

Post by Jekyll Grim Payne »

Attaching a minimal example. I'm not sure if this is a function issue or a state issue, but <mapmarker>.curstate.GetSpriteTexture(0) always returns AMRKA0, even if the marker's sprite and frame were modified correctly. The modification *is* supported, because the correct graphic shows up on the automap.

Note that using ""..<mapmarker>.sprite prints the correct sprite name.

EDIT: This has nothing to do with map markers; the issue is that GetSpriteTexture can only obtain the sprite off a state, but at the same time it'll ignore the sprite field of the actor if that was modified directly. Not a bug, probably needs a feature request.
You do not have the required permissions to view the files attached to this post.
User avatar
Jekyll Grim Payne
Global Moderator
Posts: 1117
Joined: Mon Jul 21, 2008 4:08 am
Preferred Pronouns: He/Him
Graphics Processor: nVidia (Modern GZDoom)

Re: GetSpriteTexture cannot obtain the current sprite of MapMarker

Post by Jekyll Grim Payne »

I'm now realizing that this probably has nothing to do with map markers, I just happened to come across this in this specific concept. The issue, I'm assuming now, is that GetSpriteTexture can't obtain sprite (the actor field), only state.sprite. Which is probably not a bug then, but a big oversight.
User avatar
Rachael
Posts: 13914
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her

Re: GetSpriteTexture cannot obtain the current sprite of MapMarker

Post by Rachael »

The original bug as reported is that you're not able to get the correct texture from the state table. I would mostly guess that you wouldn't want to get the texture from the state table anyhow - because that is where the definitions are stored, and if you modify the state table it would affect all actors that use the state table. Unless somehow each actor gets their own copy of the state table? - but I doubt that. I haven't looked at the code though, this is only my guess.

Return to “Bugs [GZDoom]”