mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
More PWR exchange, sounds
This commit is contained in:
parent
4b00703856
commit
2a03651e21
2 changed files with 26 additions and 2 deletions
24
src/k_kart.c
24
src/k_kart.c
|
|
@ -4307,6 +4307,30 @@ void K_CheckpointCrossAward(player_t *player)
|
|||
}
|
||||
|
||||
player_t *opp = K_DuelOpponent(player);
|
||||
boolean clutch = (player->duelscore - opp->duelscore == (DUELWINNINGSCORE-1));
|
||||
boolean win = (player->duelscore - opp->duelscore == DUELWINNINGSCORE);
|
||||
|
||||
if (!win)
|
||||
{
|
||||
for (UINT8 i = 0; i < MAXSPLITSCREENPLAYERS; i++)
|
||||
{
|
||||
player_t *check = &players[displayplayers[i]];
|
||||
if (check == player)
|
||||
{
|
||||
S_StartSound(NULL, sfx_mbs45);
|
||||
if (clutch)
|
||||
S_StartSoundAtVolume(NULL, sfx_s3k9c, 170);
|
||||
}
|
||||
|
||||
else if (check == opp)
|
||||
{
|
||||
S_StartSound(NULL, sfx_s3k96);
|
||||
if (clutch)
|
||||
S_StartSound(NULL, sfx_s3kbes);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (player->duelscore - opp->duelscore == DUELWINNINGSCORE)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -304,10 +304,10 @@ void K_UpdatePowerLevels(player_t *player, UINT8 lap, boolean forfeit)
|
|||
|
||||
// Long duels mean players were closer. Less PWR changes hands when there's a lot of back-and-forth.
|
||||
INT32 winnerscore = (yourScore > theirScore) ? player->duelscore : players[i].duelscore;
|
||||
INT32 divisor = DUELWINNINGSCORE;
|
||||
INT32 divisor = 1;
|
||||
|
||||
if (winnerscore > DUELWINNINGSCORE) // Opponent scored at least one point.
|
||||
divisor += 2*(winnerscore - DUELWINNINGSCORE);
|
||||
divisor += (winnerscore - DUELWINNINGSCORE);
|
||||
|
||||
inc /= divisor;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue