mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 15:21:51 +00:00
Merge branch 'master' of https://github.com/raa-eruanna/qzdoom into qzdoom
This commit is contained in:
commit
5a0f67308f
6 changed files with 46 additions and 8 deletions
|
@ -214,6 +214,12 @@ DCeiling::DCeiling (sector_t *sec, double speed1, double speed2, int silent)
|
||||||
m_Speed = m_Speed1 = speed1;
|
m_Speed = m_Speed1 = speed1;
|
||||||
m_Speed2 = speed2;
|
m_Speed2 = speed2;
|
||||||
m_Silent = silent;
|
m_Silent = silent;
|
||||||
|
m_BottomHeight = 0;
|
||||||
|
m_TopHeight = 0;
|
||||||
|
m_Direction = 0;
|
||||||
|
m_Texture = FNullTextureID();
|
||||||
|
m_Tag = 0;
|
||||||
|
m_OldDirection = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
|
@ -685,11 +685,30 @@ bool AActor::TakeInventory(PClassActor *itemclass, int amount, bool fromdecorate
|
||||||
|
|
||||||
void AActor::DestroyAllInventory ()
|
void AActor::DestroyAllInventory ()
|
||||||
{
|
{
|
||||||
while (Inventory != NULL)
|
AInventory *inv = Inventory;
|
||||||
|
if (inv != nullptr)
|
||||||
{
|
{
|
||||||
AInventory *item = Inventory;
|
TArray<AInventory *> toDelete;
|
||||||
item->Destroy ();
|
|
||||||
assert (item != Inventory);
|
// Delete the list in a two stage approach.
|
||||||
|
// This is necessary because an item may destroy another item (e.g. sister weapons)
|
||||||
|
// which would break the list and leave parts of it undestroyed, maybe doing bad things later.
|
||||||
|
while (inv != nullptr)
|
||||||
|
{
|
||||||
|
toDelete.Push(inv);
|
||||||
|
AInventory *item = inv->Inventory;
|
||||||
|
inv->Inventory = nullptr;
|
||||||
|
inv->Owner = nullptr;
|
||||||
|
inv = item;
|
||||||
|
}
|
||||||
|
for (auto p : toDelete)
|
||||||
|
{
|
||||||
|
// the item may already have been deleted by another one, so check this here to avoid problems.
|
||||||
|
if (!(p->ObjectFlags & OF_EuthanizeMe))
|
||||||
|
{
|
||||||
|
p->Destroy();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,8 @@
|
||||||
#include "v_palette.h"
|
#include "v_palette.h"
|
||||||
#include "d_player.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
|
// [RH] Amount of red flash for up to 114 damage points. Calculated by hand
|
||||||
// using a logarithmic scale and my trusty HP48G.
|
// using a logarithmic scale and my trusty HP48G.
|
||||||
|
@ -113,6 +114,9 @@ void V_AddPlayerBlend (player_t *CPlayer, float blend[4], float maxinvalpha, int
|
||||||
if (CPlayer->bonuscount)
|
if (CPlayer->bonuscount)
|
||||||
{
|
{
|
||||||
cnt = CPlayer->bonuscount << 3;
|
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,
|
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);
|
BPART(gameinfo.pickupcolor)/255.f, cnt > 128 ? 0.5f : cnt / 255.f, blend);
|
||||||
|
@ -124,7 +128,10 @@ void V_AddPlayerBlend (player_t *CPlayer, float blend[4], float maxinvalpha, int
|
||||||
if (painFlash.a != 0)
|
if (painFlash.a != 0)
|
||||||
{
|
{
|
||||||
cnt = DamageToAlpha[MIN (113, CPlayer->damagecount * painFlash.a / 255)];
|
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)
|
||||||
{
|
{
|
||||||
if (cnt > maxpainblend)
|
if (cnt > maxpainblend)
|
||||||
|
|
|
@ -162,11 +162,11 @@ ZCC_OpProto *ZCC_OpInfoType::FindBestProto(
|
||||||
// [[float32 (op) int]] will choose the integer version instead of the floating point
|
// [[float32 (op) int]] will choose the integer version instead of the floating point
|
||||||
// version, which we do not want.
|
// version, which we do not want.
|
||||||
int test_dist1 = dist1, test_dist2 = dist2;
|
int test_dist1 = dist1, test_dist2 = dist2;
|
||||||
if (routes[0][cur_route1][0]->ConvertConstant == FtoD)
|
if (test_dist1 > 0 && routes[0][cur_route1][0]->ConvertConstant == FtoD)
|
||||||
{
|
{
|
||||||
test_dist1--;
|
test_dist1--;
|
||||||
}
|
}
|
||||||
if (routes[1][cur_route2][0]->ConvertConstant == FtoD)
|
if (test_dist2 > 0 && routes[1][cur_route2][0]->ConvertConstant == FtoD)
|
||||||
{
|
{
|
||||||
test_dist2--;
|
test_dist2--;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1786,6 +1786,8 @@ DSPLYMNU_MAGFILTER = "Linear filter when upscaling";
|
||||||
DSPLYMNU_MIPMAP = "Use mipmapped textures";
|
DSPLYMNU_MIPMAP = "Use mipmapped textures";
|
||||||
DSPLYMNU_WIPETYPE = "Screen wipe style";
|
DSPLYMNU_WIPETYPE = "Screen wipe style";
|
||||||
DSPLYMNU_SHOWENDOOM = "Show ENDOOM screen";
|
DSPLYMNU_SHOWENDOOM = "Show ENDOOM screen";
|
||||||
|
DSPLYMNU_BLOODFADE = "Blood Flash Intensity";
|
||||||
|
DSPLYMNU_PICKUPFADE = "Pickup Flash Intensity";
|
||||||
DSPLYMNU_PALLETEHACK = "DirectDraw palette hack"; // Not used
|
DSPLYMNU_PALLETEHACK = "DirectDraw palette hack"; // Not used
|
||||||
DSPLYMNU_ATTACHEDSURFACES = "Use attached surfaces"; // Not used
|
DSPLYMNU_ATTACHEDSURFACES = "Use attached surfaces"; // Not used
|
||||||
DSPLYMNU_STRETCHSKY = "Stretch short skies";
|
DSPLYMNU_STRETCHSKY = "Stretch short skies";
|
||||||
|
|
|
@ -674,6 +674,9 @@ OptionMenu "VideoOptions"
|
||||||
|
|
||||||
Option "$DSPLYMNU_VSYNC", "vid_vsync", "OnOff"
|
Option "$DSPLYMNU_VSYNC", "vid_vsync", "OnOff"
|
||||||
Option "$DSPLYMNU_CAPFPS", "cl_capfps", "OffOn"
|
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_TRUECOLOR", "swtruecolor", "OnOff"
|
||||||
Option "$DSPLYMNU_MINFILTER", "r_minfilter", "OnOff"
|
Option "$DSPLYMNU_MINFILTER", "r_minfilter", "OnOff"
|
||||||
Option "$DSPLYMNU_MAGFILTER", "r_magfilter", "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_MOVEBOB", "movebob", 0, 1.0, 0.05, 2
|
||||||
Slider "$DSPLYMNU_STILLBOB", "stillbob", 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
|
Slider "$DSPLYMNU_BOBSPEED", "wbobspeed", 0, 2.0, 0.1, 2
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in a new issue