mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2025-01-31 10:40:33 +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)
|
void P_CheckPlayerSprite(AActor *actor, unsigned &spritenum, fixed_t &scalex, fixed_t &scaley)
|
||||||
{
|
{
|
||||||
player_t *player = actor->player;
|
player_t *player = actor->player;
|
||||||
fixed_t defscaleY = actor->GetDefault()->scaleY;
|
|
||||||
fixed_t defscaleX = actor->GetDefault()->scaleX;
|
|
||||||
int crouchspriteno;
|
int crouchspriteno;
|
||||||
|
|
||||||
if (player->userinfo.skin != 0 && !(actor->flags4 & MF4_NOSKIN))
|
if (player->userinfo.skin != 0 && !(actor->flags4 & MF4_NOSKIN))
|
||||||
{
|
{
|
||||||
defscaleY = skins[player->userinfo.skin].ScaleY;
|
// Convert from default scale to skin scale.
|
||||||
defscaleX = skins[player->userinfo.skin].ScaleX;
|
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?
|
// Set the crouch sprite?
|
||||||
|
@ -1523,15 +1524,11 @@ void P_CheckPlayerSprite(AActor *actor, unsigned &spritenum, fixed_t &scalex, fi
|
||||||
{
|
{
|
||||||
spritenum = crouchspriteno;
|
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)
|
scaley /= 2;
|
||||||
defscaleY /= 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