mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'CR_BRUH' into 'next'
Allow non-player objects to apply the CR_PLAYER carry type without crashing the game See merge request STJr/SRB2!1274
This commit is contained in:
commit
79df0c5366
1 changed files with 6 additions and 3 deletions
|
|
@ -12580,13 +12580,16 @@ void P_PlayerAfterThink(player_t *player)
|
||||||
player->powers[pw_carry] = CR_NONE;
|
player->powers[pw_carry] = CR_NONE;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
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);
|
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);
|
||||||
|
else
|
||||||
|
P_TryMove(player->mo, tails->x + P_ReturnThrustX(tails, tails->angle, 4*FRACUNIT), tails->y + P_ReturnThrustY(tails, tails->angle, 4*FRACUNIT), 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (G_CoopGametype() && (!tails->player || tails->player->bot != 1))
|
if (G_CoopGametype() && tails->player && tails->player->bot != 1)
|
||||||
{
|
{
|
||||||
player->mo->angle = tails->angle;
|
player->mo->angle = tails->angle;
|
||||||
|
|
||||||
|
|
@ -12601,7 +12604,7 @@ void P_PlayerAfterThink(player_t *player)
|
||||||
{
|
{
|
||||||
if (player->mo->state-states != S_PLAY_RIDE)
|
if (player->mo->state-states != S_PLAY_RIDE)
|
||||||
P_SetPlayerMobjState(player->mo, S_PLAY_RIDE);
|
P_SetPlayerMobjState(player->mo, S_PLAY_RIDE);
|
||||||
if ((tails->skin && ((skin_t *)(tails->skin))->sprites[SPR2_SWIM].numframes) && (tails->eflags & MFE_UNDERWATER))
|
if (tails->player && (tails->skin && ((skin_t *)(tails->skin))->sprites[SPR2_SWIM].numframes) && (tails->eflags & MFE_UNDERWATER))
|
||||||
tails->player->powers[pw_tailsfly] = 0;
|
tails->player->powers[pw_tailsfly] = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue