mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-22 19:02:45 +00:00
FuriousFox discovered a crash, realised I wasn't careful here.
This commit is contained in:
parent
6c923b26e7
commit
89f518a8a3
1 changed files with 4 additions and 13 deletions
17
src/p_user.c
17
src/p_user.c
|
@ -9829,10 +9829,7 @@ void P_PlayerAfterThink(player_t *player)
|
|||
player->mo->height = FixedDiv(P_GetPlayerHeight(player), FixedDiv(14*FRACUNIT,10*FRACUNIT));
|
||||
|
||||
if (player->mo->tracer->player && !(player->mo->tracer->player->pflags & PF_CANCARRY))
|
||||
{
|
||||
player->powers[pw_carry] = CR_NONE;
|
||||
P_SetTarget(&player->mo->tracer, NULL);
|
||||
}
|
||||
|
||||
if (player->mo->eflags & MFE_VERTICALFLIP)
|
||||
{
|
||||
|
@ -9840,10 +9837,7 @@ void P_PlayerAfterThink(player_t *player)
|
|||
&& (player->mo->tracer->eflags & MFE_VERTICALFLIP)) // Reverse gravity check for the carrier - Flame
|
||||
player->mo->z = player->mo->tracer->z + player->mo->tracer->height + FixedMul(FRACUNIT, player->mo->scale);
|
||||
else
|
||||
{
|
||||
player->powers[pw_carry] = CR_NONE;
|
||||
P_SetTarget(&player->mo->tracer, NULL);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -9851,10 +9845,7 @@ void P_PlayerAfterThink(player_t *player)
|
|||
&& !(player->mo->tracer->eflags & MFE_VERTICALFLIP)) // Correct gravity check for the carrier - Flame
|
||||
player->mo->z = player->mo->tracer->z - player->mo->height - FixedMul(FRACUNIT, player->mo->scale);
|
||||
else
|
||||
{
|
||||
player->powers[pw_carry] = CR_NONE;
|
||||
P_SetTarget(&player->mo->tracer, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
if (player->mo->tracer->health <= 0)
|
||||
|
@ -9881,12 +9872,12 @@ void P_PlayerAfterThink(player_t *player)
|
|||
}
|
||||
|
||||
if (P_AproxDistance(player->mo->x - player->mo->tracer->x, player->mo->y - player->mo->tracer->y) > player->mo->radius)
|
||||
{
|
||||
player->powers[pw_carry] = CR_NONE;
|
||||
P_SetTarget(&player->mo->tracer, NULL);
|
||||
}
|
||||
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_RIDE);
|
||||
if (player->powers[pw_carry] != CR_NONE)
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_RIDE);
|
||||
else
|
||||
P_SetTarget(&player->mo->tracer, NULL);
|
||||
|
||||
if (player-players == consoleplayer && botingame)
|
||||
CV_SetValue(&cv_analog2, (player->powers[pw_carry] != CR_PLAYER));
|
||||
|
|
Loading…
Reference in a new issue