mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-24 21:31:46 +00:00
Fix CR_PLAYER/CR_PTERABYTE positioning
This commit is contained in:
parent
dfecbe87b8
commit
723b5662ef
1 changed files with 6 additions and 4 deletions
10
src/p_user.c
10
src/p_user.c
|
@ -8812,6 +8812,8 @@ void P_MovePlayer(player_t *player)
|
||||||
player->mo->height = P_GetPlayerSpinHeight(player);
|
player->mo->height = P_GetPlayerSpinHeight(player);
|
||||||
atspinheight = true;
|
atspinheight = true;
|
||||||
}
|
}
|
||||||
|
else if (player->powers[pw_carry] == CR_PLAYER || player->powers[pw_carry] == CR_PTERABYTE) // You're slightly shorter while being carried
|
||||||
|
player->mo->height = FixedDiv(P_GetPlayerHeight(player), FixedDiv(14*FRACUNIT,10*FRACUNIT));
|
||||||
else
|
else
|
||||||
player->mo->height = P_GetPlayerHeight(player);
|
player->mo->height = P_GetPlayerHeight(player);
|
||||||
|
|
||||||
|
@ -12829,9 +12831,9 @@ void P_PlayerAfterThink(player_t *player)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (tails->player)
|
if (tails->player)
|
||||||
P_TryMove(player->mo, tails->x + P_ReturnThrustX(tails, tails->player->drawangle, 4*FRACUNIT), tails->y + P_ReturnThrustY(tails, tails->player->drawangle, 4*FRACUNIT), true);
|
P_TryMove(player->mo, tails->x + P_ReturnThrustX(tails, tails->player->drawangle, 4*tails->scale), tails->y + P_ReturnThrustY(tails, tails->player->drawangle, 4*tails->scale), true);
|
||||||
else
|
else
|
||||||
P_TryMove(player->mo, tails->x + P_ReturnThrustX(tails, tails->angle, 4*FRACUNIT), tails->y + P_ReturnThrustY(tails, tails->angle, 4*FRACUNIT), true);
|
P_TryMove(player->mo, tails->x + P_ReturnThrustX(tails, tails->angle, 4*tails->scale), tails->y + P_ReturnThrustY(tails, tails->angle, 4*tails->scale), true);
|
||||||
player->mo->momx = tails->momx;
|
player->mo->momx = tails->momx;
|
||||||
player->mo->momy = tails->momy;
|
player->mo->momy = tails->momy;
|
||||||
player->mo->momz = tails->momz;
|
player->mo->momz = tails->momz;
|
||||||
|
@ -12845,7 +12847,7 @@ void P_PlayerAfterThink(player_t *player)
|
||||||
P_SetPlayerAngle(player, player->mo->angle);
|
P_SetPlayerAngle(player, player->mo->angle);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (P_AproxDistance(player->mo->x - tails->x, player->mo->y - tails->y) > player->mo->radius)
|
if (P_AproxDistance(player->mo->x - tails->x, player->mo->y - tails->y) > tails->radius)
|
||||||
player->powers[pw_carry] = CR_NONE;
|
player->powers[pw_carry] = CR_NONE;
|
||||||
|
|
||||||
if (player->powers[pw_carry] == CR_PLAYER)
|
if (player->powers[pw_carry] == CR_PLAYER)
|
||||||
|
@ -13066,7 +13068,7 @@ void P_PlayerAfterThink(player_t *player)
|
||||||
player->mo->momy = ptera->momy;
|
player->mo->momy = ptera->momy;
|
||||||
player->mo->momz = ptera->momz;
|
player->mo->momz = ptera->momz;
|
||||||
|
|
||||||
if (P_AproxDistance(player->mo->x - ptera->x - ptera->watertop, player->mo->y - ptera->y - ptera->waterbottom) > player->mo->radius)
|
if (P_AproxDistance(player->mo->x - ptera->x - ptera->watertop, player->mo->y - ptera->y - ptera->waterbottom) > ptera->radius)
|
||||||
goto dropoff;
|
goto dropoff;
|
||||||
|
|
||||||
ptera->watertop >>= 1;
|
ptera->watertop >>= 1;
|
||||||
|
|
Loading…
Reference in a new issue