K_BattleAwardHit: evaluate win condition before adding points

This commit is contained in:
James R 2023-06-30 21:35:15 -07:00 committed by VelocitOni
parent 7fdfa56451
commit e94ae5bfef

View file

@ -3769,13 +3769,14 @@ void K_BattleAwardHit(player_t *player, player_t *victim, mobj_t *inflictor, UIN
} }
} }
P_AddPlayerScore(player, points); // Check this before adding to player score
K_SpawnBattlePoints(player, victim, points);
if ((gametyperules & GTR_BUMPERS) && finishOff && g_pointlimit <= player->roundscore) if ((gametyperules & GTR_BUMPERS) && finishOff && g_pointlimit <= player->roundscore)
{ {
P_DoAllPlayersExit(0, false); P_DoAllPlayersExit(0, false);
} }
P_AddPlayerScore(player, points);
K_SpawnBattlePoints(player, victim, points);
} }
void K_SpinPlayer(player_t *player, mobj_t *inflictor, mobj_t *source, INT32 type) void K_SpinPlayer(player_t *player, mobj_t *inflictor, mobj_t *source, INT32 type)