mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'spb-attack-polish' into 'master'
SPB Attack polish Closes #1202 and #1203 See merge request KartKrew/Kart!2157
This commit is contained in:
commit
1a61239d7f
2 changed files with 18 additions and 0 deletions
11
src/k_kart.c
11
src/k_kart.c
|
|
@ -9342,6 +9342,14 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
|||
if (player->breathTimer < UINT16_MAX)
|
||||
player->breathTimer++;
|
||||
}
|
||||
|
||||
if (spbplace == -1 && modeattacking & ATTACKING_SPB && !player->mo->hitlag && player->mo->health && !P_PlayerInPain(player) && player->laps > 0 && !player->exiting && !(player->pflags & PF_NOCONTEST))
|
||||
{
|
||||
// I'd like this to play a sound to make the situation clearer, but this codepath seems
|
||||
// to run even when you make standard contact with the SPB. Not sure why. Oh well!
|
||||
// S_StartSound(NULL, sfx_s26d);
|
||||
P_DamageMobj(player->mo, NULL, NULL, 1, DMG_INSTAKILL);
|
||||
}
|
||||
}
|
||||
|
||||
void K_KartResetPlayerColor(player_t *player)
|
||||
|
|
@ -13016,7 +13024,10 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
|||
}
|
||||
|
||||
if (spbplace == -1 || player->position != spbplace)
|
||||
{
|
||||
player->pflags &= ~PF_RINGLOCK; // reset ring lock
|
||||
}
|
||||
|
||||
|
||||
if (K_ItemSingularity(player->itemtype) == true)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2619,6 +2619,13 @@ static boolean P_KillPlayer(player_t *player, mobj_t *inflictor, mobj_t *source,
|
|||
{
|
||||
player->mo->health--;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (modeattacking & ATTACKING_SPB)
|
||||
{
|
||||
P_DamageMobj(player->mo, NULL, NULL, 1, DMG_INSTAKILL);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (player->mo->health <= 0)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue