mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 20:41:46 +00:00
Streamlined the minecart death handling
This commit is contained in:
parent
efc1b7ef2b
commit
bfe3deb5d6
2 changed files with 3 additions and 3 deletions
|
|
@ -2607,6 +2607,8 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget
|
||||||
case MT_MINECART:
|
case MT_MINECART:
|
||||||
A_Scream(target);
|
A_Scream(target);
|
||||||
target->momx = target->momy = target->momz = 0;
|
target->momx = target->momy = target->momz = 0;
|
||||||
|
if (target->target && target->target->health)
|
||||||
|
P_KillMobj(target->target, target, source, 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MT_PLAYER:
|
case MT_PLAYER:
|
||||||
|
|
|
||||||
|
|
@ -10004,7 +10004,6 @@ static void P_MinecartThink(player_t *player)
|
||||||
fa = (minecart->angle >> ANGLETOFINESHIFT) & FINEMASK;
|
fa = (minecart->angle >> ANGLETOFINESHIFT) & FINEMASK;
|
||||||
if (!P_TryMove(minecart, minecart->x + FINECOSINE(fa), minecart->y + FINESINE(fa), true))
|
if (!P_TryMove(minecart, minecart->x + FINECOSINE(fa), minecart->y + FINESINE(fa), true))
|
||||||
{
|
{
|
||||||
P_KillMobj(player->mo, NULL, NULL, 0);
|
|
||||||
P_KillMobj(minecart, NULL, NULL, 0);
|
P_KillMobj(minecart, NULL, NULL, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -10041,7 +10040,7 @@ static void P_MinecartThink(player_t *player)
|
||||||
|
|
||||||
if (!axis)
|
if (!axis)
|
||||||
{
|
{
|
||||||
P_KillMobj(player->mo, NULL, NULL, 0);
|
P_KillMobj(minecart, NULL, NULL, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -10152,7 +10151,6 @@ static void P_MinecartThink(player_t *player)
|
||||||
if ((P_IsObjectOnGround(minecart) && minecart->movefactor >= 5) // off rail
|
if ((P_IsObjectOnGround(minecart) && minecart->movefactor >= 5) // off rail
|
||||||
|| (abs(minecart->momx) < minecart->scale/2 && abs(minecart->momy) < minecart->scale/2)) // hit a wall
|
|| (abs(minecart->momx) < minecart->scale/2 && abs(minecart->momy) < minecart->scale/2)) // hit a wall
|
||||||
{
|
{
|
||||||
P_KillMobj(player->mo, NULL, NULL, 0);
|
|
||||||
P_KillMobj(minecart, NULL, NULL, 0);
|
P_KillMobj(minecart, NULL, NULL, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue