mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-23 20:43:15 +00:00
- fixed case of damage type variables.
- fixed loading of BMF fonts' palettes. Index 0 is always transparent and the stored palette data starts at index 1. SVN r3240 (trunk)
This commit is contained in:
parent
817368abc2
commit
9fc5539ae7
2 changed files with 7 additions and 6 deletions
|
@ -643,12 +643,12 @@ void AActor::Die (AActor *source, AActor *inflictor)
|
|||
FState *diestate = NULL;
|
||||
FName damagetype = (inflictor && inflictor->DeathType != NAME_None) ? inflictor->DeathType : DamageType;
|
||||
|
||||
if (DamageType != NAME_None)
|
||||
if (damagetype != NAME_None)
|
||||
{
|
||||
diestate = FindState (NAME_Death, DamageType, true);
|
||||
diestate = FindState (NAME_Death, damagetype, true);
|
||||
if (diestate == NULL)
|
||||
{
|
||||
if (DamageType == NAME_Ice)
|
||||
if (damagetype == NAME_Ice)
|
||||
{ // If an actor doesn't have an ice death, we can still give them a generic one.
|
||||
|
||||
if (!deh.NoAutofreeze && !(flags4 & MF4_NOICEDEATH) && (player || (flags3 & MF3_ISMONSTER)))
|
||||
|
@ -667,9 +667,9 @@ void AActor::Die (AActor *source, AActor *inflictor)
|
|||
// Don't pass on a damage type this actor cannot handle.
|
||||
// (most importantly, prevent barrels from passing on ice damage.)
|
||||
// Massacre must be preserved though.
|
||||
if (DamageType != NAME_Massacre)
|
||||
if (damagetype != NAME_Massacre)
|
||||
{
|
||||
DamageType = NAME_None;
|
||||
damagetype = NAME_None;
|
||||
}
|
||||
|
||||
if ((health < gibhealth || flags4 & MF4_EXTREMEDEATH) && !(flags4 & MF4_NOEXTREMEDEATH))
|
||||
|
|
|
@ -1132,8 +1132,9 @@ void FSingleLumpFont::LoadBMF(int lump, const BYTE *data)
|
|||
// BMF palettes are only six bits per component. Fix that.
|
||||
for (i = 0; i < ActiveColors*3; ++i)
|
||||
{
|
||||
raw_palette[i] = (data[17 + i] << 2) | (data[17 + i] >> 4);
|
||||
raw_palette[i+3] = (data[17 + i] << 2) | (data[17 + i] >> 4);
|
||||
}
|
||||
ActiveColors++;
|
||||
|
||||
// Sort the palette by increasing brightness
|
||||
for (i = 0; i < ActiveColors; ++i)
|
||||
|
|
Loading…
Reference in a new issue