diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 7996f0af3..7bb646608 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,6 @@ +August 19, 2008 (Changes by Graf Zahl) +- Added Gez's patch for removing MF4_FIRERESIST. + August 18, 2008 (SBARINFO patch) - Fixed: DrawBar would not show. - Fixed: IsSelected took string constants instead of identifiers. diff --git a/src/actor.h b/src/actor.h index f28ff7b16..b6c0eb02d 100644 --- a/src/actor.h +++ b/src/actor.h @@ -265,7 +265,6 @@ enum MF4_LOOKALLAROUND = 0x00010000, // Monster has eyes in the back of its head MF4_STANDSTILL = 0x00020000, // Monster should not chase targets unless attacked? MF4_SPECTRAL = 0x00040000, - MF4_FIRERESIST = 0x00080000, // Actor takes half damage from fire MF4_NOSPLASHALERT = 0x00100000, // Splashes don't alert this monster 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 diff --git a/src/p_interaction.cpp b/src/p_interaction.cpp index 02d224cec..14dddb6d6 100644 --- a/src/p_interaction.cpp +++ b/src/p_interaction.cpp @@ -951,23 +951,14 @@ void P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage if (olddam != damage && damage <= 0) return; } - // to be removed and replaced by an actual damage factor - // once the actors using it are converted to DECORATE. - if (mod == NAME_Fire && target->flags4 & MF4_FIRERESIST) + DmgFactors * df = target->GetClass()->ActorInfo->DamageFactors; + if (df != NULL) { - damage /= 2; - } - else - { - DmgFactors * df = target->GetClass()->ActorInfo->DamageFactors; - if (df != NULL) + fixed_t * pdf = df->CheckKey(mod); + if (pdf != NULL) { - fixed_t * pdf = df->CheckKey(mod); - if (pdf != NULL) - { - damage = FixedMul(damage, *pdf); - if (damage <= 0) return; - } + damage = FixedMul(damage, *pdf); + if (damage <= 0) return; } } diff --git a/src/thingdef/thingdef_properties.cpp b/src/thingdef/thingdef_properties.cpp index de2d358f5..d60bad331 100644 --- a/src/thingdef/thingdef_properties.cpp +++ b/src/thingdef/thingdef_properties.cpp @@ -100,6 +100,7 @@ enum DEPF_SHORTMISSILERANGE, DEPF_PICKUPFLASH, DEPF_QUARTERGRAVITY, + DEPF_FIRERESIST, }; static flagdef ActorFlags[]= @@ -208,7 +209,6 @@ static flagdef ActorFlags[]= DEFINE_FLAG(MF4, LOOKALLAROUND, AActor, flags4), DEFINE_FLAG(MF4, STANDSTILL, AActor, flags4), DEFINE_FLAG(MF4, SPECTRAL, AActor, flags4), - DEFINE_FLAG(MF4, FIRERESIST, AActor, flags4), DEFINE_FLAG(MF4, NOSPLASHALERT, AActor, flags4), DEFINE_FLAG(MF4, SYNCHRONIZED, AActor, flags4), DEFINE_FLAG(MF4, NOTARGETSWITCH, AActor, flags4), @@ -264,6 +264,7 @@ static flagdef ActorFlags[]= DEFINE_DEPRECATED_FLAG(SHORTMISSILERANGE), DEFINE_DEPRECATED_FLAG(LONGMELEERANGE), DEFINE_DEPRECATED_FLAG(QUARTERGRAVITY), + DEFINE_DEPRECATED_FLAG(FIRERESIST), DEFINE_DUMMY_FLAG(NONETID), DEFINE_DUMMY_FLAG(ALLOWCLIENTSPAWN), }; @@ -434,6 +435,9 @@ static void HandleDeprecatedFlags(AActor *defaults, bool set, int index) case DEPF_QUARTERGRAVITY: defaults->gravity = set? FRACUNIT/4 : FRACUNIT; break; + case DEPF_FIRERESIST: + if (set) defaults->GetClass()->ActorInfo->DamageFactors->Insert("Fire", 0.5); + else defaults->GetClass()->ActorInfo->DamageFactors->Remove("Fire"); case DEPF_PICKUPFLASH: if (set) { diff --git a/wadsrc/static/actors/strife/loremaster.txt b/wadsrc/static/actors/strife/loremaster.txt index f8e760eb9..39ffcea4c 100644 --- a/wadsrc/static/actors/strife/loremaster.txt +++ b/wadsrc/static/actors/strife/loremaster.txt @@ -19,8 +19,8 @@ ACTOR Loremaster 12 +NOBLOCKMONST +INCOMBAT +LOOKALLAROUND - +FIRERESIST +NOICEDEATH + DamageFactor "Fire", 0.5 MinMissileChance 150 Tag "PRIEST" SeeSound "loremaster/sight" diff --git a/wadsrc/static/actors/strife/macil.txt b/wadsrc/static/actors/strife/macil.txt index 0c11f0164..fbd52ecad 100644 --- a/wadsrc/static/actors/strife/macil.txt +++ b/wadsrc/static/actors/strife/macil.txt @@ -13,10 +13,10 @@ ACTOR Macil1 64 native Monster -COUNTKILL +NOTDMATCH - +FIRERESIST +NOICEDEATH +NOSPLASHALERT +NODAMAGE + DamageFactor "Fire", 0.5 MinMissileChance 150 SeeSound "macil/sight" PainSound "macil/pain" diff --git a/wadsrc/static/actors/strife/oracle.txt b/wadsrc/static/actors/strife/oracle.txt index 347088638..6c0639a96 100644 --- a/wadsrc/static/actors/strife/oracle.txt +++ b/wadsrc/static/actors/strife/oracle.txt @@ -10,7 +10,7 @@ ACTOR Oracle 199 native Height 56 Monster +NOTDMATCH - +FIRERESIST + DamageFactor "Fire", 0.5 MaxDropoffHeight 32 Tag "Oracle" DropItem "Meat" @@ -31,4 +31,4 @@ ACTOR Oracle 199 native ORCL Q -1 Stop } -} \ No newline at end of file +} diff --git a/wadsrc/static/actors/strife/programmer.txt b/wadsrc/static/actors/strife/programmer.txt index 41fdedff2..fef811b7e 100644 --- a/wadsrc/static/actors/strife/programmer.txt +++ b/wadsrc/static/actors/strife/programmer.txt @@ -21,9 +21,9 @@ ACTOR Programmer 71 +DONTMORPH +NOBLOCKMONST +LOOKALLAROUND - +FIRERESIST +NOICEDEATH +NOTARGETSWITCH + DamageFactor "Fire", 0.5 MinMissileChance 150 AttackSound "programmer/attack" PainSound "programmer/pain" diff --git a/wadsrc/static/actors/strife/strifebishop.txt b/wadsrc/static/actors/strife/strifebishop.txt index 427483864..303129271 100644 --- a/wadsrc/static/actors/strife/strifebishop.txt +++ b/wadsrc/static/actors/strife/strifebishop.txt @@ -16,8 +16,8 @@ ACTOR StrifeBishop 187 +NOTDMATCH +FLOORCLIP +INCOMBAT - +FIRERESIST +NOICEDEATH + DamageFactor "Fire", 0.5 MinMissileChance 150 MaxDropoffHeight 32 SeeSound "bishop/sight"