A_PlayerSkinCheck
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
- Cutmanmike
- Posts: 11354
- Joined: Mon Oct 06, 2003 3:41 pm
- Operating System Version (Optional): Windows 10
- Location: United Kingdom
- Contact:
A_PlayerSkinCheck
For wiki purposes, what does this do exactly?
Re: A_PlayerSkinCheck
From what I've seen, I recall seeing somewhere that it's a check to see if the skin is for Heretic or something, and so it goes to different death states that properly display the different number of sprites. But when you really think about it, this doesn't seem to be the case...
Re: A_PlayerSkinCheck
This is just an educated guess, but judging from the [wiki=Classes:HereticPlayer]Heretic player's DECORATE[/wiki], it checks to see if the player is using a skin, and if so jumps to a different death/xdeath animation for the skin they're using. This is likely because the Heretic player's death doesn't have the same amount of frames as the skin's death (which is based on the Doom player).
[edit]Upon closer inspection, the [wiki=Classes:DoomPlayer]DoomPlayer[/wiki] class uses it too, so that must not be entirely correct. However, in both cases you'll notice that the AltSkinDeath and AltSkinXDeath states have a different amount of frames from the player's normal death states. It makes sense that you'd need separate states to account for this difference. What doesn't make sense (to me at least) is why the skins from Heretic to Doom would have different frame counts, and why neither base class apparently matches the number specified by the skin.

[edit]Upon closer inspection, the [wiki=Classes:DoomPlayer]DoomPlayer[/wiki] class uses it too, so that must not be entirely correct. However, in both cases you'll notice that the AltSkinDeath and AltSkinXDeath states have a different amount of frames from the player's normal death states. It makes sense that you'd need separate states to account for this difference. What doesn't make sense (to me at least) is why the skins from Heretic to Doom would have different frame counts, and why neither base class apparently matches the number specified by the skin.
Last edited by HotWax on Tue Jun 17, 2008 8:54 am, edited 1 time in total.
- Cutmanmike
- Posts: 11354
- Joined: Mon Oct 06, 2003 3:41 pm
- Operating System Version (Optional): Windows 10
- Location: United Kingdom
- Contact:
Re: A_PlayerSkinCheck
Makes sense... But if that's the case, why does DoomPlayer have it too?
Re: A_PlayerSkinCheck
You beat me to it.Cutmanmike wrote:Makes sense... But if that's the case, why does DoomPlayer have it too?
- Graf Zahl
- Lead GZDoom+Raze Developer

- Posts: 49252
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: A_PlayerSkinCheck
The function is to account for the difference between Doom and Heretic skins so that they can be used in the other game. It is only exported so that I could define the base player classes in DECORATE.
Unless you insist of having skin support in user defined player classes that can't inherit their death states from the base players there is no need to use it - ever!
Unless you insist of having skin support in user defined player classes that can't inherit their death states from the base players there is no need to use it - ever!
- Cutmanmike
- Posts: 11354
- Joined: Mon Oct 06, 2003 3:41 pm
- Operating System Version (Optional): Windows 10
- Location: United Kingdom
- Contact:
Re: A_PlayerSkinCheck
I may be off the mark here, but the description on the wiki page doesn't seem to match what Graf is saying. The function doesn't simply check if the player is using a skin. Rather, it checks to see if the player is using the Heretic player, but using a Doom skin, or vice-versa. That's why the amount of frames don't add up in either class definition. (In fact, if you bring up the [wiki=Classes:HereticPlayer]HereticPlayer[/wiki] and [wiki=Classes:DoomPlayer]DoomPlayer[/wiki] classes side-by-side, you can see how the Heretic class' default death state has the same number of frames as the Doom class' AltSkinDeath state, and vice-versa)
That's why this should never be needed for custom classes -- you'd be making the assumption that your custom class is designed for one game, but the player is insisting on using a skin from the other.
That's why this should never be needed for custom classes -- you'd be making the assumption that your custom class is designed for one game, but the player is insisting on using a skin from the other.