* Added support for sprite2s to MD2s!

- Name each frame either SPR2_**** or SUPER**** (where **** is the 4-character name)
    - If the name is 3 characters, '.' is accepted as a substitute for the '_', but a space/absent isn't (for tool-related reasons).
    - Adds a big sprite2 index array to all models, even non-player ones. Sorry!
* Made MD2 frame interpoleration only work across the same spriteset (and sprite2set).
* Made MD2 frame interpoleration happen when there's less than a quarter of a second between frames, as opposed to the hardcoded specific animation disabling.
* Fixed sprite2-related typo in dehacked.c.
This commit is contained in:
toasterbabe 2017-08-26 18:56:23 +01:00
parent 4da6169892
commit 76300026f8
5 changed files with 133 additions and 43 deletions

View file

@ -2431,7 +2431,7 @@ CV_PossibleValue_t skin_cons_t[MAXSKINS+1];
UINT8 P_GetSkinSprite2(skin_t *skin, UINT8 spr2, player_t *player)
{
UINT8 super = (spr2 & FF_SPR2SUPER), i = 0;
UINT8 super = 0, i = 0;
if (!skin)
return 0;
@ -2442,6 +2442,7 @@ UINT8 P_GetSkinSprite2(skin_t *skin, UINT8 spr2, player_t *player)
{
if (spr2 & FF_SPR2SUPER)
{
super = FF_SPR2SUPER;
spr2 &= ~FF_SPR2SUPER;
continue;
}
@ -2460,24 +2461,6 @@ UINT8 P_GetSkinSprite2(skin_t *skin, UINT8 spr2, player_t *player)
spr2 = (player && player->charability == CA_SWIM) ? SPR2_SWIM : SPR2_FLY;
break;
// NiGHTS sprites.
case SPR2_NSTD:
spr2 = SPR2_STND;
super = FF_SPR2SUPER;
break;
case SPR2_NFLT:
spr2 = SPR2_FLT ;
super = FF_SPR2SUPER;
break;
case SPR2_NSTN:
spr2 = SPR2_STUN;
super = FF_SPR2SUPER;
break;
case SPR2_NATK:
spr2 = SPR2_ROLL;
super = FF_SPR2SUPER;
break;
// Use the handy list, that's what it's there for!
default:
spr2 = spr2defaults[spr2];