- implemented "hazardcolor" and "hazardflash" properties. This affects strife's sector damage type that passively builds up over time. setting "hazardcolor" changes the gradual blend that is used when palette flash is disabled. setting "hazardflash" changes the flashing blend that is used when palette flash is turned on.
This commit is contained in:
parent
2b5fea4ea8
commit
b4079b9915
5 changed files with 32 additions and 2 deletions
|
|
@ -51,6 +51,7 @@
|
|||
#include "colormatcher.h"
|
||||
#include "v_palette.h"
|
||||
#include "d_player.h"
|
||||
#include "g_levellocals.h"
|
||||
|
||||
CVAR( Float, blood_fade_scalar, 1.0f, CVAR_ARCHIVE ) // [SP] Pulled from Skulltag - changed default from 0.5 to 1.0
|
||||
CVAR( Float, pickup_fade_scalar, 1.0f, CVAR_ARCHIVE ) // [SP] Uses same logic as blood_fade_scalar except for pickups
|
||||
|
|
@ -168,13 +169,19 @@ void V_AddPlayerBlend (player_t *CPlayer, float blend[4], float maxinvalpha, int
|
|||
{
|
||||
if (CPlayer->hazardcount > 16*TICRATE || (CPlayer->hazardcount & 8))
|
||||
{
|
||||
V_AddBlend (0.f, 1.f, 0.f, 0.125f, blend);
|
||||
float r = ((level.hazardflash & 0xff0000) >> 16) / 255.f;
|
||||
float g = ((level.hazardflash & 0xff00) >> 8) / 255.f;
|
||||
float b = ((level.hazardflash & 0xff)) / 255.f;
|
||||
V_AddBlend (r, g, b, 0.125f, blend);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
cnt= MIN(CPlayer->hazardcount/8, 64);
|
||||
V_AddBlend (0.f, 0.2571f, 0.f, cnt/93.2571428571f, blend);
|
||||
float r = ((level.hazardcolor & 0xff0000) >> 16) / 255.f;
|
||||
float g = ((level.hazardcolor & 0xff00) >> 8) / 255.f;
|
||||
float b = ((level.hazardcolor & 0xff)) / 255.f;
|
||||
V_AddBlend (r, g, b, cnt/93.2571428571f, blend);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue