mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-11 23:32:04 +00:00
This commit is contained in:
commit
a89ec61dc1
4 changed files with 27 additions and 18 deletions
|
@ -70,24 +70,24 @@
|
||||||
// CVARs
|
// CVARs
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
CVAR(Bool, gl_bloom, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG);
|
CVAR(Bool, gl_bloom, false, CVAR_ARCHIVE);
|
||||||
CUSTOM_CVAR(Float, gl_bloom_amount, 1.4f, 0)
|
CUSTOM_CVAR(Float, gl_bloom_amount, 1.4f, CVAR_ARCHIVE)
|
||||||
{
|
{
|
||||||
if (self < 0.1f) self = 0.1f;
|
if (self < 0.1f) self = 0.1f;
|
||||||
}
|
}
|
||||||
|
|
||||||
CVAR(Float, gl_exposure_scale, 1.3f, 0)
|
CVAR(Float, gl_exposure_scale, 1.3f, CVAR_ARCHIVE)
|
||||||
CVAR(Float, gl_exposure_min, 0.35f, 0)
|
CVAR(Float, gl_exposure_min, 0.35f, CVAR_ARCHIVE)
|
||||||
CVAR(Float, gl_exposure_base, 0.35f, 0)
|
CVAR(Float, gl_exposure_base, 0.35f, CVAR_ARCHIVE)
|
||||||
CVAR(Float, gl_exposure_speed, 0.05f, 0)
|
CVAR(Float, gl_exposure_speed, 0.05f, CVAR_ARCHIVE)
|
||||||
|
|
||||||
CUSTOM_CVAR(Int, gl_tonemap, 0, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
CUSTOM_CVAR(Int, gl_tonemap, 0, CVAR_ARCHIVE)
|
||||||
{
|
{
|
||||||
if (self < 0 || self > 5)
|
if (self < 0 || self > 5)
|
||||||
self = 0;
|
self = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
CUSTOM_CVAR(Int, gl_bloom_kernel_size, 7, 0)
|
CUSTOM_CVAR(Int, gl_bloom_kernel_size, 7, CVAR_ARCHIVE)
|
||||||
{
|
{
|
||||||
if (self < 3 || self > 15 || self % 2 == 0)
|
if (self < 3 || self > 15 || self % 2 == 0)
|
||||||
self = 7;
|
self = 7;
|
||||||
|
@ -95,9 +95,9 @@ CUSTOM_CVAR(Int, gl_bloom_kernel_size, 7, 0)
|
||||||
|
|
||||||
CVAR(Bool, gl_lens, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
CVAR(Bool, gl_lens, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||||
|
|
||||||
CVAR(Float, gl_lens_k, -0.12f, 0)
|
CVAR(Float, gl_lens_k, -0.12f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||||
CVAR(Float, gl_lens_kcube, 0.1f, 0)
|
CVAR(Float, gl_lens_kcube, 0.1f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||||
CVAR(Float, gl_lens_chromatic, 1.12f, 0)
|
CVAR(Float, gl_lens_chromatic, 1.12f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||||
|
|
||||||
CVAR(Bool, gl_ssao, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
CVAR(Bool, gl_ssao, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||||
CVAR(Float, gl_ssao_strength, 0.7, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
CVAR(Float, gl_ssao_strength, 0.7, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||||
|
|
|
@ -1323,6 +1323,9 @@ bool AActor::Massacre ()
|
||||||
|
|
||||||
if (health > 0)
|
if (health > 0)
|
||||||
{
|
{
|
||||||
|
auto f = flags;
|
||||||
|
auto f2 = flags2;
|
||||||
|
|
||||||
flags |= MF_SHOOTABLE;
|
flags |= MF_SHOOTABLE;
|
||||||
flags2 &= ~(MF2_DORMANT|MF2_INVULNERABLE);
|
flags2 &= ~(MF2_DORMANT|MF2_INVULNERABLE);
|
||||||
do
|
do
|
||||||
|
@ -1331,6 +1334,12 @@ bool AActor::Massacre ()
|
||||||
P_DamageMobj (this, NULL, NULL, TELEFRAG_DAMAGE, NAME_Massacre);
|
P_DamageMobj (this, NULL, NULL, TELEFRAG_DAMAGE, NAME_Massacre);
|
||||||
}
|
}
|
||||||
while (health != prevhealth && health > 0); //abort if the actor wasn't hurt.
|
while (health != prevhealth && health > 0); //abort if the actor wasn't hurt.
|
||||||
|
if (health > 0)
|
||||||
|
{
|
||||||
|
// restore flags if this did not kill the monster.
|
||||||
|
flags = f;
|
||||||
|
flags2 = f2;
|
||||||
|
}
|
||||||
return health <= 0;
|
return health <= 0;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -361,11 +361,11 @@ static bool S_CheckSound(sfxinfo_t *startsfx, sfxinfo_t *sfx, TArray<sfxinfo_t *
|
||||||
auto rsfx = &S_sfx[list->Sounds[i]];
|
auto rsfx = &S_sfx[list->Sounds[i]];
|
||||||
if (rsfx == startsfx)
|
if (rsfx == startsfx)
|
||||||
{
|
{
|
||||||
Printf(TEXTCOLOR_RED "recursive sound $random found for %s:\n", startsfx->name);
|
Printf(TEXTCOLOR_RED "recursive sound $random found for %s:\n", startsfx->name.GetChars());
|
||||||
success = false;
|
success = false;
|
||||||
for (unsigned i = 1; i<chain.Size(); i++)
|
for (unsigned i = 1; i<chain.Size(); i++)
|
||||||
{
|
{
|
||||||
Printf(TEXTCOLOR_ORANGE " -> %s\n", chain[i]->name);
|
Printf(TEXTCOLOR_ORANGE " -> %s\n", chain[i]->name.GetChars());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -379,11 +379,11 @@ static bool S_CheckSound(sfxinfo_t *startsfx, sfxinfo_t *sfx, TArray<sfxinfo_t *
|
||||||
me = &S_sfx[me->link];
|
me = &S_sfx[me->link];
|
||||||
if (me == startsfx)
|
if (me == startsfx)
|
||||||
{
|
{
|
||||||
Printf(TEXTCOLOR_RED "recursive sound $alias found for %s:\n", startsfx->name);
|
Printf(TEXTCOLOR_RED "recursive sound $alias found for %s:\n", startsfx->name.GetChars());
|
||||||
success = false;
|
success = false;
|
||||||
for (unsigned i = 1; i<chain.Size(); i++)
|
for (unsigned i = 1; i<chain.Size(); i++)
|
||||||
{
|
{
|
||||||
Printf(TEXTCOLOR_ORANGE " -> %s\n", chain[i]->name);
|
Printf(TEXTCOLOR_ORANGE " -> %s\n", chain[i]->name.GetChars());
|
||||||
}
|
}
|
||||||
chain.Resize(siz);
|
chain.Resize(siz);
|
||||||
}
|
}
|
||||||
|
@ -413,7 +413,7 @@ void S_CheckIntegrity()
|
||||||
if (broken[i])
|
if (broken[i])
|
||||||
{
|
{
|
||||||
auto &sfx = S_sfx[i];
|
auto &sfx = S_sfx[i];
|
||||||
Printf(TEXTCOLOR_RED "Sound %s has been disabled\n", sfx.name);
|
Printf(TEXTCOLOR_RED "Sound %s has been disabled\n", sfx.name.GetChars());
|
||||||
sfx.bRandomHeader = false;
|
sfx.bRandomHeader = false;
|
||||||
sfx.link = 0; // link to the empty sound.
|
sfx.link = 0; // link to the empty sound.
|
||||||
}
|
}
|
||||||
|
|
|
@ -211,11 +211,11 @@ bool MUSSong2::CheckDone()
|
||||||
|
|
||||||
void MUSSong2::Precache()
|
void MUSSong2::Precache()
|
||||||
{
|
{
|
||||||
TArray<WORD> work(MusHeader->NumInstruments);
|
TArray<WORD> work(LittleShort(MusHeader->NumInstruments));
|
||||||
const BYTE *used = (BYTE *)MusHeader + sizeof(MUSHeader) / sizeof(BYTE);
|
const BYTE *used = (BYTE *)MusHeader + sizeof(MUSHeader) / sizeof(BYTE);
|
||||||
int i, k;
|
int i, k;
|
||||||
|
|
||||||
for (i = k = 0; i < MusHeader->NumInstruments; ++i)
|
for (i = k = 0; i < LittleShort(MusHeader->NumInstruments); ++i)
|
||||||
{
|
{
|
||||||
BYTE instr = used[k++];
|
BYTE instr = used[k++];
|
||||||
WORD val;
|
WORD val;
|
||||||
|
|
Loading…
Reference in a new issue