Damagefactor "Falling", 0 doesn't work

Archive of the old editing forum
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.
User avatar
4thcharacter
Banned User
Posts: 1183
Joined: Tue Jun 02, 2015 7:54 am

Damagefactor "Falling", 0 doesn't work

Post by 4thcharacter »

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.
Attachments
fallingdamagetest.wad
(105 Bytes) Downloaded 25 times
User avatar
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

Post by Major Cooke »

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.
User avatar
InsanityBringer
Posts: 3392
Joined: Thu Jul 05, 2007 4:53 pm
Location: opening the forbidden box

Re: Damagefactor "Falling", 0 doesn't work

Post by InsanityBringer »

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.
User avatar
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

Post by Major Cooke »

...That's what I said. :P
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Damagefactor "Falling", 0 doesn't work

Post by Graf Zahl »

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);
}
User avatar
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

Post by Major Cooke »

I think someone forgot about their if statement. Or just really wanted to exploit something. :twisted:
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: Damagefactor "Falling", 0 doesn't work

Post by Gez »

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.
User avatar
Rachael
Posts: 13955
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Damagefactor "Falling", 0 doesn't work

Post by Rachael »

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.
That's not a decision that should be forced on mod authors, imo.

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.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Damagefactor "Falling", 0 doesn't work

Post by Graf Zahl »

That code is taken directly from Hexen, it's not a ZDoom invention at all.
User avatar
Arctangent
Posts: 1235
Joined: Thu Nov 06, 2014 1:53 pm
Contact:

Re: Damagefactor "Falling", 0 doesn't work

Post by Arctangent »

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.
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: Damagefactor "Falling", 0 doesn't work

Post by Gez »

Eruanna wrote:
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.
That's not a decision that should be forced on mod authors, imo.

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.
When I said "they" I meant "the Raven Software developers". 8-)
User avatar
Rachael
Posts: 13955
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Damagefactor "Falling", 0 doesn't work

Post by Rachael »

Gez wrote:When I said "they" I meant "the Raven Software developers". 8-)
I may have realized that - a little late. ;)
User avatar
InsanityBringer
Posts: 3392
Joined: Thu Jul 05, 2007 4:53 pm
Location: opening the forbidden box

Re: Damagefactor "Falling", 0 doesn't work

Post by InsanityBringer »

huh, I always thought the monster falling damage system was specific to ZDoom, but I quickly searched my copy of the hexen source

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);
}
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.
User avatar
4thcharacter
Banned User
Posts: 1183
Joined: Tue Jun 02, 2015 7:54 am

Re: Damagefactor "Falling", 0 doesn't work

Post by 4thcharacter »

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?
User avatar
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

Post by Major Cooke »

Did you add the Damagefactor "Falling", 0.0?
Locked

Return to “Editing (Archive)”