mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Darken player sprite every other frame of instawhip cooldown
This commit is contained in:
parent
018f6f3410
commit
e6e8bf8c96
1 changed files with 13 additions and 0 deletions
|
|
@ -8,11 +8,24 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
/// \brief Special effects for sprite rendering
|
||||
|
||||
#include "d_player.h"
|
||||
#include "p_tick.h"
|
||||
#include "r_things.h"
|
||||
|
||||
INT32 R_ThingLightLevel(mobj_t* thing)
|
||||
{
|
||||
INT32 lightlevel = thing->lightlevel;
|
||||
|
||||
player_t* player = thing->player;
|
||||
|
||||
if (player)
|
||||
{
|
||||
if (player->instaShieldCooldown && leveltime & 1)
|
||||
{
|
||||
// Darken on every other frame of instawhip cooldown
|
||||
lightlevel -= 128;
|
||||
}
|
||||
}
|
||||
|
||||
return lightlevel;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue