mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Reduce stunned tics for damage caused by non-players
This commit is contained in:
parent
fceb325bd4
commit
546bb52e3b
1 changed files with 16 additions and 0 deletions
16
src/k_kart.c
16
src/k_kart.c
|
|
@ -16334,6 +16334,22 @@ void K_ApplyStun(player_t *player, mobj_t *inflictor, mobj_t *source, INT32 dama
|
|||
stunTics /= 3;
|
||||
}
|
||||
|
||||
if (source && source->player)
|
||||
{
|
||||
// hits scored by players apply full stun
|
||||
;
|
||||
}
|
||||
else if (inflictor && (P_IsKartItem(inflictor->type) || P_IsKartFieldItem(inflictor->type)))
|
||||
{
|
||||
// items not thrown by a player apply half stun
|
||||
stunTics /= 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
// all other hazards apply 1/4 stun
|
||||
stunTics /= 4;
|
||||
}
|
||||
|
||||
player->stunned = max(stunTics, 0);
|
||||
|
||||
#undef BASE_STUN_TICS_MIN
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue