Damagefactor "Falling", 0 doesn't work
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
- 4thcharacter
- Banned User
- Posts: 1183
- Joined: Tue Jun 02, 2015 7:54 am
Damagefactor "Falling", 0 doesn't work
On the latest version, monsters that have a damagefactor of 0 on "falling" damagetype still dies after falling from large heights. On the oldest GZDoom I have, 1.8.09-78-g1db064b this works properly.
The wad has a modified ettin that has a damagefactor of 0. Load it in Hexen. While flying high, just summon them.
The wad has a modified ettin that has a damagefactor of 0. Load it in Hexen. While flying high, just summon them.
- Attachments
-
fallingdamagetest.wad
- (105 Bytes) Downloaded 25 times
- Major Cooke
- Posts: 8212
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Re: Damagefactor "Falling", 0 doesn't work
Use +LAXTELEFRAGDMG if needed. I don't know what about it causes it but sometimes big monsters accumulate over a million hitpoints in damage.
And any damage that's over a million ignores damagefactors unless that flag is used.
And any damage that's over a million ignores damagefactors unless that flag is used.
- InsanityBringer
- Posts: 3392
- Joined: Thu Jul 05, 2007 4:53 pm
- Location: opening the forbidden box
Re: Damagefactor "Falling", 0 doesn't work
all falling damage types, except for strife, have a point where the falling damage would cause instant death (it ignores the regular calculations and just does telefrag damage at this point), and I think that's what's going on here. +LAXTELEFRAGDMNG should help.
- Major Cooke
- Posts: 8212
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Re: Damagefactor "Falling", 0 doesn't work
...That's what I said. 

- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49234
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Damagefactor "Falling", 0 doesn't work
InsanityBringer wrote:all falling damage types, except for strife, have a point where the falling damage would cause instant death (it ignores the regular calculations and just does telefrag damage at this point), and I think that's what's going on here. +LAXTELEFRAGDMNG should help.
Yes, but none sets the damage to TELEFRAG_DAMAGE. The monster version does. Even stranger, it completey discards earlier calculations and if damage is dealt, it's always fatal.
Behold this beauty:
Code: Select all
void P_MonsterFallingDamage (AActor *mo)
{
int damage;
double vel;
if (!(level.flags2 & LEVEL2_MONSTERFALLINGDAMAGE))
return;
if (mo->floorsector->Flags & SECF_NOFALLINGDAMAGE)
return;
vel = fabs(mo->Vel.Z);
if (vel > 35)
{ // automatic death
damage = TELEFRAG_DAMAGE;
}
else
{
damage = int((vel - 23)*6);
}
damage = TELEFRAG_DAMAGE; // always kill 'em
P_DamageMobj (mo, NULL, NULL, damage, NAME_Falling);
}
- Major Cooke
- Posts: 8212
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Re: Damagefactor "Falling", 0 doesn't work
I think someone forgot about their if statement. Or just really wanted to exploit something. 

Re: Damagefactor "Falling", 0 doesn't work
I think the "always kill 'em" line was added after some playtesting when they found out there was absolutely no point to let monsters survive death pit falls.
Re: Damagefactor "Falling", 0 doesn't work
That's not a decision that should be forced on mod authors, imo.Gez wrote:I think the "always kill 'em" line was added after some playtesting when they found out there was absolutely no point to let monsters survive death pit falls.
EDIT: Wow - that line is so old, I think it predates ZDoom even going SVN. In that case, blatantly changing it might not be the best option.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49234
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Damagefactor "Falling", 0 doesn't work
That code is taken directly from Hexen, it's not a ZDoom invention at all.
- Arctangent
- Posts: 1235
- Joined: Thu Nov 06, 2014 1:53 pm
- Contact:
Re: Damagefactor "Falling", 0 doesn't work
It might be a better idea to just provide an alternative flag that applies whatever falling damage there is for the player to monsters as well.
Re: Damagefactor "Falling", 0 doesn't work
When I said "they" I meant "the Raven Software developers".Eruanna wrote:That's not a decision that should be forced on mod authors, imo.Gez wrote:I think the "always kill 'em" line was added after some playtesting when they found out there was absolutely no point to let monsters survive death pit falls.
EDIT: Wow - that line is so old, I think it predates ZDoom even going SVN. In that case, blatantly changing it might not be the best option.

Re: Damagefactor "Falling", 0 doesn't work
I may have realized that - a little late.Gez wrote:When I said "they" I meant "the Raven Software developers".

- InsanityBringer
- Posts: 3392
- Joined: Thu Jul 05, 2007 4:53 pm
- Location: opening the forbidden box
Re: Damagefactor "Falling", 0 doesn't work
huh, I always thought the monster falling damage system was specific to ZDoom, but I quickly searched my copy of the hexen source
Basically the same as the ZD version, unsurprisingly. I really do wonder how this came about, without them actually eliminating the old code, heh
Would adding level flags for the various types of fall damage applied to monsters, to override the stupid hexen system be feasible? I imagine just changing it wouldn't be desired.
EDIT: Searching the hexen source deeper, I found its only applied to monsters that were knocked back by the Disc of Repulsion, so I guess at the end of the day they only wanted this to apply if you knocked a dude off a cliff. Which makes sense since that's about the only time a monster actually falls due to Doom's weird logic. Extending this in ZD might be nice, since obviously we can now have monsters that can drop off of cliffs for other reasons.
Code: Select all
void P_MonsterFallingDamage(mobj_t *mo)
{
int damage;
int mom;
mom = abs(mo->momz);
if(mom > 35*FRACUNIT)
{ // automatic death
damage=10000;
}
else
{
damage = ((mom - (23*FRACUNIT) )*6)>>FRACBITS;
}
damage=10000; // always kill 'em
P_DamageMobj(mo, NULL, NULL, damage);
}
Would adding level flags for the various types of fall damage applied to monsters, to override the stupid hexen system be feasible? I imagine just changing it wouldn't be desired.
EDIT: Searching the hexen source deeper, I found its only applied to monsters that were knocked back by the Disc of Repulsion, so I guess at the end of the day they only wanted this to apply if you knocked a dude off a cliff. Which makes sense since that's about the only time a monster actually falls due to Doom's weird logic. Extending this in ZD might be nice, since obviously we can now have monsters that can drop off of cliffs for other reasons.
- 4thcharacter
- Banned User
- Posts: 1183
- Joined: Tue Jun 02, 2015 7:54 am
Re: Damagefactor "Falling", 0 doesn't work
InsanityBringer wrote:all falling damage types, except for strife, have a point where the falling damage would cause instant death (it ignores the regular calculations and just does telefrag damage at this point), and I think that's what's going on here. +LAXTELEFRAGDMNG should help.
I tried this on Strife with stalkers and got the same result. Do monsters' falling damage are based on the currently used falling damage formula?
- Major Cooke
- Posts: 8212
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Re: Damagefactor "Falling", 0 doesn't work
Did you add the Damagefactor "Falling", 0.0?