mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 04:51:19 +00:00
- Fixed: DDoomStatusBar::UpdateState() needed the same fix as DSBarInfo::updateState(), since it
received a code infusion from there. SVN r1007 (trunk)
This commit is contained in:
parent
ded428230d
commit
6a264daa04
3 changed files with 23 additions and 26 deletions
|
@ -5,8 +5,8 @@ May 30, 2008
|
|||
playing while the sound is paused.
|
||||
- Fixed: S_StartNamedSound() looked for SECF_SILENT in MoreFlags instead of
|
||||
Flags.
|
||||
- Fixed: DSBarInfo::updateState() sprung leaks and didn't allocate enough
|
||||
space for the fullStateName string.
|
||||
- Fixed: DSBarInfo::updateState() and DDoomStatusBar::UpdateState() sprung
|
||||
leaks and didn't allocate enough space for the fullStateName string.
|
||||
- Disabled DUMB's mono destination mixers. It's not like I'm ever going to
|
||||
target an original SoundBlaster, so they're a waste of space to have around.
|
||||
This trims resample.obj down to ~60k now.
|
||||
|
|
|
@ -801,16 +801,16 @@ private:
|
|||
}
|
||||
}
|
||||
bool useOuch = false;
|
||||
const char* stateName = new char[5];
|
||||
const char *stateName;
|
||||
if ((FaceHealth != -1 && CPlayer->health - FaceHealth > 20) || bOuchActive)
|
||||
{
|
||||
useOuch = true;
|
||||
stateName = "ouch";
|
||||
stateName = "ouch.";
|
||||
}
|
||||
else
|
||||
stateName = "pain";
|
||||
char* fullStateName = new char[sizeof(stateName)+sizeof((const char*) CPlayer->LastDamageType) + 1];
|
||||
sprintf(fullStateName, "%s.%s", stateName, (const char*) CPlayer->LastDamageType);
|
||||
stateName = "pain.";
|
||||
FString fullStateName;
|
||||
fullStateName << stateName << CPlayer->LastDamageType;
|
||||
if(FindMugShotState(fullStateName) != NULL)
|
||||
SetMugShotState(fullStateName);
|
||||
else
|
||||
|
@ -827,16 +827,16 @@ private:
|
|||
else
|
||||
{
|
||||
bool useOuch = false;
|
||||
const char* stateName = new char[5];
|
||||
const char *stateName;
|
||||
if ((FaceHealth != -1 && CPlayer->health - FaceHealth > 20) || bOuchActive)
|
||||
{
|
||||
useOuch = true;
|
||||
stateName = "ouch";
|
||||
stateName = "ouch.";
|
||||
}
|
||||
else
|
||||
stateName = "pain";
|
||||
char* fullStateName = new char[sizeof(stateName)+sizeof((const char*) CPlayer->LastDamageType) + 1];
|
||||
sprintf(fullStateName, "%s.%s", stateName, (const char*) CPlayer->LastDamageType);
|
||||
stateName = "pain.";
|
||||
FString fullStateName;
|
||||
fullStateName << stateName << CPlayer->LastDamageType;
|
||||
if(FindMugShotState(fullStateName) != NULL)
|
||||
SetMugShotState(fullStateName);
|
||||
else
|
||||
|
@ -863,11 +863,8 @@ private:
|
|||
}
|
||||
else
|
||||
{
|
||||
const char* stateName = new char[7];
|
||||
stateName = "death";
|
||||
//new string the size of stateName and the damage type put together
|
||||
char* fullStateName = new char[sizeof(stateName)+sizeof((const char*) CPlayer->LastDamageType) + 1];
|
||||
sprintf(fullStateName, "%s.%s", stateName, (const char*) CPlayer->LastDamageType);
|
||||
FString fullStateName;
|
||||
fullStateName << "death." << CPlayer->LastDamageType;
|
||||
if(FindMugShotState(fullStateName) != NULL)
|
||||
SetMugShotState(fullStateName);
|
||||
else
|
||||
|
|
|
@ -1427,12 +1427,12 @@ int DSBarInfo::updateState(bool xdth, bool animatedgodmode)
|
|||
if ((mugshotHealth != -1 && CPlayer->health - mugshotHealth > 20) || ouchActive)
|
||||
{
|
||||
setOuch = true;
|
||||
stateName = "ouch";
|
||||
stateName = "ouch.";
|
||||
}
|
||||
else
|
||||
stateName = "pain";
|
||||
stateName = "pain.";
|
||||
FString fullStateName;
|
||||
fullStateName << stateName << '.' << CPlayer->LastDamageType;
|
||||
fullStateName << stateName << CPlayer->LastDamageType;
|
||||
if(FindMugShotState(fullStateName) != NULL)
|
||||
SetMugShotState(fullStateName);
|
||||
else
|
||||
|
@ -1453,12 +1453,12 @@ int DSBarInfo::updateState(bool xdth, bool animatedgodmode)
|
|||
if ((mugshotHealth != -1 && CPlayer->health - mugshotHealth > 20) || ouchActive)
|
||||
{
|
||||
setOuch = true;
|
||||
stateName = "ouch";
|
||||
stateName = "ouch.";
|
||||
}
|
||||
else
|
||||
stateName = "pain";
|
||||
stateName = "pain.";
|
||||
FString fullStateName;
|
||||
fullStateName << stateName << '.' << CPlayer->LastDamageType;
|
||||
fullStateName << stateName << CPlayer->LastDamageType;
|
||||
if(FindMugShotState(fullStateName) != NULL)
|
||||
SetMugShotState(fullStateName);
|
||||
else
|
||||
|
@ -1492,11 +1492,11 @@ int DSBarInfo::updateState(bool xdth, bool animatedgodmode)
|
|||
{
|
||||
const char *stateName;
|
||||
if(!xdth || !(CPlayer->cheats & CF_EXTREMELYDEAD))
|
||||
stateName = "death";
|
||||
stateName = "death.";
|
||||
else
|
||||
stateName = "xdeath";
|
||||
stateName = "xdeath.";
|
||||
FString fullStateName;
|
||||
fullStateName << stateName << '.' << CPlayer->LastDamageType;
|
||||
fullStateName << stateName << CPlayer->LastDamageType;
|
||||
if(FindMugShotState(fullStateName) != NULL)
|
||||
SetMugShotState(fullStateName);
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue