diff --git a/docs/rh-log.txt b/docs/rh-log.txt index bd6e9ca3e..901dd172f 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,7 @@ 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 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 diff --git a/src/p_user.cpp b/src/p_user.cpp index 82914b1f6..6f951ad24 100644 --- a/src/p_user.cpp +++ b/src/p_user.cpp @@ -1399,10 +1399,12 @@ void P_CheckPlayerSprites() { int crouchspriteno; 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; + defscaleX = skins[player->userinfo.skin].ScaleX; } // Set the crouch sprite @@ -1413,8 +1415,9 @@ void P_CheckPlayerSprites() { crouchspriteno = mo->crouchsprite; } - else if (mo->sprite == skins[player->userinfo.skin].sprite || - mo->sprite == skins[player->userinfo.skin].crouchsprite) + else if (!(player->mo->flags4 & MF4_NOSKIN) && + (mo->sprite == skins[player->userinfo.skin].sprite || + mo->sprite == skins[player->userinfo.skin].crouchsprite)) { crouchspriteno = skins[player->userinfo.skin].crouchsprite; } @@ -1446,6 +1449,7 @@ void P_CheckPlayerSprites() } mo->scaleY = defscaleY; } + mo->scaleX = defscaleX; } } }