A_PlayerSkinCheck

Archive of the old editing forum
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.
Locked
User avatar
Cutmanmike
Posts: 11354
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom
Contact:

A_PlayerSkinCheck

Post by Cutmanmike »

For wiki purposes, what does this do exactly?
User avatar
MG_Man
Posts: 1401
Joined: Sat Jul 28, 2007 1:24 pm
Contact:

Re: A_PlayerSkinCheck

Post by MG_Man »

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...
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Re: A_PlayerSkinCheck

Post by HotWax »

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.

:shrug:
Last edited by HotWax on Tue Jun 17, 2008 8:54 am, edited 1 time in total.
User avatar
Cutmanmike
Posts: 11354
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom
Contact:

Re: A_PlayerSkinCheck

Post by Cutmanmike »

Makes sense... But if that's the case, why does DoomPlayer have it too?
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Re: A_PlayerSkinCheck

Post by HotWax »

Cutmanmike wrote:Makes sense... But if that's the case, why does DoomPlayer have it too?
You beat me to it. ;) See edit in my previous post.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: A_PlayerSkinCheck

Post by Graf Zahl »

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!
User avatar
Cutmanmike
Posts: 11354
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom
Contact:

Re: A_PlayerSkinCheck

Post by Cutmanmike »

That explains it. Thanks!

Edit: http://zdoom.org/wiki/A_PlayerSkinCheck
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Re: A_PlayerSkinCheck

Post by HotWax »

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.
Locked

Return to “Editing (Archive)”