mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Add 2 seconds instead of 5 upon Invincibility hit, in Battle
This commit is contained in:
parent
4fb0dfa9c0
commit
eac2aea082
1 changed files with 8 additions and 4 deletions
|
|
@ -1833,7 +1833,6 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
|||
boolean force = false;
|
||||
|
||||
INT32 laglength = 6;
|
||||
INT32 kinvextend = 0;
|
||||
|
||||
if (objectplacing)
|
||||
return false;
|
||||
|
|
@ -2006,9 +2005,14 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
|||
// Extend the invincibility if the hit was a direct hit.
|
||||
if (inflictor == source && source->player->invincibilitytimer)
|
||||
{
|
||||
kinvextend = (source->player->invincibilitytimer)+5*TICRATE;
|
||||
//CONS_Printf("extend k_invincibilitytimer for %s - old value %d new value %d\n", player_names[source->player - players], source->player->invincibilitytimer/TICRATE, kinvextend/TICRATE);
|
||||
source->player->invincibilitytimer = kinvextend;
|
||||
tic_t kinvextend;
|
||||
|
||||
if (gametype == GT_BATTLE)
|
||||
kinvextend = 2*TICRATE;
|
||||
else
|
||||
kinvextend = 5*TICRATE;
|
||||
|
||||
source->player->invincibilitytimer += kinvextend;
|
||||
}
|
||||
|
||||
K_PlayHitEmSound(source, target);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue