- Fixed: P_CheckPlayerSprites() ignored the MF4_NOSKIN flag. It now also sets

the X scale, so switching skins while morphed does not produce weird
  stretching upon unmorphing.


SVN r2042 (trunk)
This commit is contained in:
Randy Heit 2009-12-25 01:02:19 +00:00
parent 6beaf818e3
commit f667e68c94
2 changed files with 10 additions and 3 deletions

View file

@ -1,4 +1,7 @@
December 24, 2009 December 24, 2009
- Fixed: P_CheckPlayerSprites() ignored the MF4_NOSKIN flag. It now also sets
the X scale, so switching skins while morphed does not produce weird
stretching upon unmorphing.
- Fixed: Calling S_ChangeMusic() with the same song but a different looping - Fixed: Calling S_ChangeMusic() with the same song but a different looping
flag now restarts the song so that the new looping setting can be applied. flag now restarts the song so that the new looping setting can be applied.
(This was easier than modifying every music handler to support modifying (This was easier than modifying every music handler to support modifying

View file

@ -1399,10 +1399,12 @@ void P_CheckPlayerSprites()
{ {
int crouchspriteno; int crouchspriteno;
fixed_t defscaleY = mo->GetDefault()->scaleY; fixed_t defscaleY = mo->GetDefault()->scaleY;
fixed_t defscaleX = mo->GetDefault()->scaleX;
if (player->userinfo.skin != 0) if (player->userinfo.skin != 0 && !(player->mo->flags4 & MF4_NOSKIN))
{ {
defscaleY = skins[player->userinfo.skin].ScaleY; defscaleY = skins[player->userinfo.skin].ScaleY;
defscaleX = skins[player->userinfo.skin].ScaleX;
} }
// Set the crouch sprite // Set the crouch sprite
@ -1413,8 +1415,9 @@ void P_CheckPlayerSprites()
{ {
crouchspriteno = mo->crouchsprite; crouchspriteno = mo->crouchsprite;
} }
else if (mo->sprite == skins[player->userinfo.skin].sprite || else if (!(player->mo->flags4 & MF4_NOSKIN) &&
mo->sprite == skins[player->userinfo.skin].crouchsprite) (mo->sprite == skins[player->userinfo.skin].sprite ||
mo->sprite == skins[player->userinfo.skin].crouchsprite))
{ {
crouchspriteno = skins[player->userinfo.skin].crouchsprite; crouchspriteno = skins[player->userinfo.skin].crouchsprite;
} }
@ -1446,6 +1449,7 @@ void P_CheckPlayerSprites()
} }
mo->scaleY = defscaleY; mo->scaleY = defscaleY;
} }
mo->scaleX = defscaleX;
} }
} }
} }