mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-01-04 06:02:54 +00:00
Guard against out-of-range pitblame, reset pitblame when triggered
This commit is contained in:
parent
c0598610e9
commit
11f7eb4b26
1 changed files with 3 additions and 1 deletions
|
|
@ -2502,10 +2502,12 @@ static boolean P_KillPlayer(player_t *player, mobj_t *inflictor, mobj_t *source,
|
|||
|
||||
if (gametyperules & (GTR_BUMPERS|GTR_CHECKPOINTS))
|
||||
{
|
||||
if ((player->pitblame != -1) && (playeringame[player->pitblame]) && (!players[player->pitblame].spectator)
|
||||
if ((player->pitblame > -1) && (player->pitblame < MAXPLAYERS)
|
||||
&& (playeringame[player->pitblame]) && (!players[player->pitblame].spectator)
|
||||
&& (players[player->pitblame].mo) && (!P_MobjWasRemoved(players[player->pitblame].mo)))
|
||||
{
|
||||
P_DamageMobj(player->mo, players[player->pitblame].mo, players[player->pitblame].mo, 1, DMG_KARMA);
|
||||
player->pitblame = -1;
|
||||
}
|
||||
else if (player->mo->health > 1 || battleprisons)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue