- Backported blood_fade_scalar from Skulltag

- Added new pickup_fade_scalar which works the same way for pickups
- Default for blood_fade_scalar is 1.0 instead of 0.5 from Skulltag.
This commit is contained in:
raa-eruanna 2016-10-06 20:01:20 -04:00
parent 2e78d34046
commit a80c67c2ca
2 changed files with 13 additions and 2 deletions

View file

@ -52,7 +52,8 @@
#include "v_palette.h"
#include "d_player.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
// [RH] Amount of red flash for up to 114 damage points. Calculated by hand
// using a logarithmic scale and my trusty HP48G.
@ -114,6 +115,9 @@ void V_AddPlayerBlend (player_t *CPlayer, float blend[4], float maxinvalpha, int
{
cnt = CPlayer->bonuscount << 3;
// [SP] Allow player to tone down intensity of pickup flash.
cnt = (int)( cnt * pickup_fade_scalar );
V_AddBlend (RPART(gameinfo.pickupcolor)/255.f, GPART(gameinfo.pickupcolor)/255.f,
BPART(gameinfo.pickupcolor)/255.f, cnt > 128 ? 0.5f : cnt / 255.f, blend);
}
@ -125,6 +129,9 @@ void V_AddPlayerBlend (player_t *CPlayer, float blend[4], float maxinvalpha, int
{
cnt = DamageToAlpha[MIN (113, CPlayer->damagecount * painFlash.a / 255)];
// [BC] Allow users to tone down the intensity of the blood on the screen.
cnt = (int)( cnt * blood_fade_scalar );
if (cnt)
{
if (cnt > maxpainblend)

View file

@ -674,6 +674,9 @@ OptionMenu "VideoOptions"
Option "$DSPLYMNU_VSYNC", "vid_vsync", "OnOff"
Option "$DSPLYMNU_CAPFPS", "cl_capfps", "OffOn"
Slider "$DSPLYMNU_BLOODFADE", "blood_fade_scalar", 0.0, 1.0, 0.05, 1
Slider "$DSPLYMNU_PICKUPFADE", "pickup_fade_scalar", 0.0, 1.0, 0.05, 1
Option "$DSPLYMNU_COLUMNMETHOD", "r_columnmethod", "ColumnMethods"
Option "$DSPLYMNU_TRUECOLOR", "swtruecolor", "OnOff"
Option "$DSPLYMNU_MINFILTER", "r_minfilter", "OnOff"
Option "$DSPLYMNU_MAGFILTER", "r_magfilter", "OnOff"
@ -710,6 +713,7 @@ OptionMenu "VideoOptions"
Slider "$DSPLYMNU_MOVEBOB", "movebob", 0, 1.0, 0.05, 2
Slider "$DSPLYMNU_STILLBOB", "stillbob", 0, 1.0, 0.05, 2
Slider "$DSPLYMNU_BOBSPEED", "wbobspeed", 0, 2.0, 0.1, 2
}
//-------------------------------------------------------------------------------------------