mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-27 06:12:19 +00:00
- Do not double-scale player classes that use non-1.0 default scales.
SVN r4011 (trunk)
This commit is contained in:
parent
002aa807c5
commit
60fb004a78
1 changed files with 7 additions and 10 deletions
|
@ -1491,14 +1491,15 @@ DEFINE_ACTION_FUNCTION(AActor, A_CheckPlayerDone)
|
|||
void P_CheckPlayerSprite(AActor *actor, unsigned &spritenum, fixed_t &scalex, fixed_t &scaley)
|
||||
{
|
||||
player_t *player = actor->player;
|
||||
fixed_t defscaleY = actor->GetDefault()->scaleY;
|
||||
fixed_t defscaleX = actor->GetDefault()->scaleX;
|
||||
int crouchspriteno;
|
||||
|
||||
if (player->userinfo.skin != 0 && !(actor->flags4 & MF4_NOSKIN))
|
||||
{
|
||||
defscaleY = skins[player->userinfo.skin].ScaleY;
|
||||
defscaleX = skins[player->userinfo.skin].ScaleX;
|
||||
// Convert from default scale to skin scale.
|
||||
fixed_t defscaleY = actor->GetDefault()->scaleY;
|
||||
fixed_t defscaleX = actor->GetDefault()->scaleX;
|
||||
scaley = Scale(scaley, skins[player->userinfo.skin].ScaleY, defscaleY);
|
||||
scalex = Scale(scalex, skins[player->userinfo.skin].ScaleX, defscaleX);
|
||||
}
|
||||
|
||||
// Set the crouch sprite?
|
||||
|
@ -1523,15 +1524,11 @@ void P_CheckPlayerSprite(AActor *actor, unsigned &spritenum, fixed_t &scalex, fi
|
|||
{
|
||||
spritenum = crouchspriteno;
|
||||
}
|
||||
else if (player->playerstate != PST_DEAD)
|
||||
else if (player->playerstate != PST_DEAD && player->crouchfactor < FRACUNIT*3/4)
|
||||
{
|
||||
if (player->crouchfactor < FRACUNIT*3/4)
|
||||
defscaleY /= 2;
|
||||
scaley /= 2;
|
||||
}
|
||||
}
|
||||
// Scale the sprite by the actor, skin, and crouch values
|
||||
scalex = FixedMul(scalex, defscaleX);
|
||||
scaley = FixedMul(scaley, defscaleY);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue