- Added Gez's patch for removing MF4_FIRERESIST.

SVN r1177 (trunk)
This commit is contained in:
Christoph Oelckers 2008-08-19 19:38:39 +00:00
parent 371d4704b8
commit 30685c3a74
9 changed files with 20 additions and 23 deletions

View file

@ -1,3 +1,6 @@
August 19, 2008 (Changes by Graf Zahl)
- Added Gez's patch for removing MF4_FIRERESIST.
August 18, 2008 (SBARINFO patch) August 18, 2008 (SBARINFO patch)
- Fixed: DrawBar would not show. - Fixed: DrawBar would not show.
- Fixed: IsSelected took string constants instead of identifiers. - Fixed: IsSelected took string constants instead of identifiers.

View file

@ -265,7 +265,6 @@ enum
MF4_LOOKALLAROUND = 0x00010000, // Monster has eyes in the back of its head MF4_LOOKALLAROUND = 0x00010000, // Monster has eyes in the back of its head
MF4_STANDSTILL = 0x00020000, // Monster should not chase targets unless attacked? MF4_STANDSTILL = 0x00020000, // Monster should not chase targets unless attacked?
MF4_SPECTRAL = 0x00040000, MF4_SPECTRAL = 0x00040000,
MF4_FIRERESIST = 0x00080000, // Actor takes half damage from fire
MF4_NOSPLASHALERT = 0x00100000, // Splashes don't alert this monster MF4_NOSPLASHALERT = 0x00100000, // Splashes don't alert this monster
MF4_SYNCHRONIZED = 0x00200000, // For actors spawned at load-time only: Do not randomize tics MF4_SYNCHRONIZED = 0x00200000, // For actors spawned at load-time only: Do not randomize tics
MF4_NOTARGETSWITCH = 0x00400000, // monster never switches target until current one is dead MF4_NOTARGETSWITCH = 0x00400000, // monster never switches target until current one is dead

View file

@ -951,23 +951,14 @@ void P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage
if (olddam != damage && damage <= 0) return; if (olddam != damage && damage <= 0) return;
} }
// to be removed and replaced by an actual damage factor DmgFactors * df = target->GetClass()->ActorInfo->DamageFactors;
// once the actors using it are converted to DECORATE. if (df != NULL)
if (mod == NAME_Fire && target->flags4 & MF4_FIRERESIST)
{ {
damage /= 2; fixed_t * pdf = df->CheckKey(mod);
} if (pdf != NULL)
else
{
DmgFactors * df = target->GetClass()->ActorInfo->DamageFactors;
if (df != NULL)
{ {
fixed_t * pdf = df->CheckKey(mod); damage = FixedMul(damage, *pdf);
if (pdf != NULL) if (damage <= 0) return;
{
damage = FixedMul(damage, *pdf);
if (damage <= 0) return;
}
} }
} }

View file

@ -100,6 +100,7 @@ enum
DEPF_SHORTMISSILERANGE, DEPF_SHORTMISSILERANGE,
DEPF_PICKUPFLASH, DEPF_PICKUPFLASH,
DEPF_QUARTERGRAVITY, DEPF_QUARTERGRAVITY,
DEPF_FIRERESIST,
}; };
static flagdef ActorFlags[]= static flagdef ActorFlags[]=
@ -208,7 +209,6 @@ static flagdef ActorFlags[]=
DEFINE_FLAG(MF4, LOOKALLAROUND, AActor, flags4), DEFINE_FLAG(MF4, LOOKALLAROUND, AActor, flags4),
DEFINE_FLAG(MF4, STANDSTILL, AActor, flags4), DEFINE_FLAG(MF4, STANDSTILL, AActor, flags4),
DEFINE_FLAG(MF4, SPECTRAL, AActor, flags4), DEFINE_FLAG(MF4, SPECTRAL, AActor, flags4),
DEFINE_FLAG(MF4, FIRERESIST, AActor, flags4),
DEFINE_FLAG(MF4, NOSPLASHALERT, AActor, flags4), DEFINE_FLAG(MF4, NOSPLASHALERT, AActor, flags4),
DEFINE_FLAG(MF4, SYNCHRONIZED, AActor, flags4), DEFINE_FLAG(MF4, SYNCHRONIZED, AActor, flags4),
DEFINE_FLAG(MF4, NOTARGETSWITCH, AActor, flags4), DEFINE_FLAG(MF4, NOTARGETSWITCH, AActor, flags4),
@ -264,6 +264,7 @@ static flagdef ActorFlags[]=
DEFINE_DEPRECATED_FLAG(SHORTMISSILERANGE), DEFINE_DEPRECATED_FLAG(SHORTMISSILERANGE),
DEFINE_DEPRECATED_FLAG(LONGMELEERANGE), DEFINE_DEPRECATED_FLAG(LONGMELEERANGE),
DEFINE_DEPRECATED_FLAG(QUARTERGRAVITY), DEFINE_DEPRECATED_FLAG(QUARTERGRAVITY),
DEFINE_DEPRECATED_FLAG(FIRERESIST),
DEFINE_DUMMY_FLAG(NONETID), DEFINE_DUMMY_FLAG(NONETID),
DEFINE_DUMMY_FLAG(ALLOWCLIENTSPAWN), DEFINE_DUMMY_FLAG(ALLOWCLIENTSPAWN),
}; };
@ -434,6 +435,9 @@ static void HandleDeprecatedFlags(AActor *defaults, bool set, int index)
case DEPF_QUARTERGRAVITY: case DEPF_QUARTERGRAVITY:
defaults->gravity = set? FRACUNIT/4 : FRACUNIT; defaults->gravity = set? FRACUNIT/4 : FRACUNIT;
break; break;
case DEPF_FIRERESIST:
if (set) defaults->GetClass()->ActorInfo->DamageFactors->Insert("Fire", 0.5);
else defaults->GetClass()->ActorInfo->DamageFactors->Remove("Fire");
case DEPF_PICKUPFLASH: case DEPF_PICKUPFLASH:
if (set) if (set)
{ {

View file

@ -19,8 +19,8 @@ ACTOR Loremaster 12
+NOBLOCKMONST +NOBLOCKMONST
+INCOMBAT +INCOMBAT
+LOOKALLAROUND +LOOKALLAROUND
+FIRERESIST
+NOICEDEATH +NOICEDEATH
DamageFactor "Fire", 0.5
MinMissileChance 150 MinMissileChance 150
Tag "PRIEST" Tag "PRIEST"
SeeSound "loremaster/sight" SeeSound "loremaster/sight"

View file

@ -13,10 +13,10 @@ ACTOR Macil1 64 native
Monster Monster
-COUNTKILL -COUNTKILL
+NOTDMATCH +NOTDMATCH
+FIRERESIST
+NOICEDEATH +NOICEDEATH
+NOSPLASHALERT +NOSPLASHALERT
+NODAMAGE +NODAMAGE
DamageFactor "Fire", 0.5
MinMissileChance 150 MinMissileChance 150
SeeSound "macil/sight" SeeSound "macil/sight"
PainSound "macil/pain" PainSound "macil/pain"

View file

@ -10,7 +10,7 @@ ACTOR Oracle 199 native
Height 56 Height 56
Monster Monster
+NOTDMATCH +NOTDMATCH
+FIRERESIST DamageFactor "Fire", 0.5
MaxDropoffHeight 32 MaxDropoffHeight 32
Tag "Oracle" Tag "Oracle"
DropItem "Meat" DropItem "Meat"
@ -31,4 +31,4 @@ ACTOR Oracle 199 native
ORCL Q -1 ORCL Q -1
Stop Stop
} }
} }

View file

@ -21,9 +21,9 @@ ACTOR Programmer 71
+DONTMORPH +DONTMORPH
+NOBLOCKMONST +NOBLOCKMONST
+LOOKALLAROUND +LOOKALLAROUND
+FIRERESIST
+NOICEDEATH +NOICEDEATH
+NOTARGETSWITCH +NOTARGETSWITCH
DamageFactor "Fire", 0.5
MinMissileChance 150 MinMissileChance 150
AttackSound "programmer/attack" AttackSound "programmer/attack"
PainSound "programmer/pain" PainSound "programmer/pain"

View file

@ -16,8 +16,8 @@ ACTOR StrifeBishop 187
+NOTDMATCH +NOTDMATCH
+FLOORCLIP +FLOORCLIP
+INCOMBAT +INCOMBAT
+FIRERESIST
+NOICEDEATH +NOICEDEATH
DamageFactor "Fire", 0.5
MinMissileChance 150 MinMissileChance 150
MaxDropoffHeight 32 MaxDropoffHeight 32
SeeSound "bishop/sight" SeeSound "bishop/sight"