mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-13 13:21:31 +00:00
gotta break a few eggboxes to fix a crash
This commit is contained in:
parent
06b3e265f5
commit
068ee93422
1 changed files with 6 additions and 7 deletions
13
src/k_kart.c
13
src/k_kart.c
|
@ -3021,7 +3021,7 @@ static mobj_t *K_ThrowKartItem(player_t *player, boolean missile, mobjtype_t map
|
|||
newz = player->mo->z;
|
||||
}
|
||||
|
||||
mo = P_SpawnMobj(newx, newy, newz, mapthing);
|
||||
mo = P_SpawnMobj(newx, newy, newz, mapthing); // this will never return null because collision isn't processed here
|
||||
|
||||
if (P_MobjFlip(player->mo) < 0)
|
||||
mo->z = player->mo->z + player->mo->height - mo->height;
|
||||
|
@ -3033,7 +3033,9 @@ static mobj_t *K_ThrowKartItem(player_t *player, boolean missile, mobjtype_t map
|
|||
{
|
||||
// floorz and ceilingz aren't properly set to account for FOFs and Polyobjects on spawn
|
||||
// This should set it for FOFs
|
||||
P_TeleportMove(mo, mo->x, mo->y, mo->z);
|
||||
P_TeleportMove(mo, mo->x, mo->y, mo->z); // however, THIS can fuck up your day. just absolutely ruin you.
|
||||
if (P_MobjWasRemoved(mo))
|
||||
return NULL;
|
||||
|
||||
if (P_MobjFlip(mo) > 0)
|
||||
{
|
||||
|
@ -3051,11 +3053,8 @@ static mobj_t *K_ThrowKartItem(player_t *player, boolean missile, mobjtype_t map
|
|||
}
|
||||
}
|
||||
|
||||
if (mo)
|
||||
{
|
||||
if (player->mo->eflags & MFE_VERTICALFLIP)
|
||||
mo->eflags |= MFE_VERTICALFLIP;
|
||||
}
|
||||
if (player->mo->eflags & MFE_VERTICALFLIP)
|
||||
mo->eflags |= MFE_VERTICALFLIP;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue