// [RH] Give the pain elemental vertical friction (???)

Discuss anything ZDoom-related that doesn't fall into one of the other categories.
Post Reply
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

// [RH] Give the pain elemental vertical friction (???)

Post by Graf Zahl »

Code: Select all

void APainElemental::Tick ()
{
	// [RH] Give the pain elemental vertical friction
	if (flags & MF_FLOAT)
	{
		if (abs (momz) < FRACUNIT/4)
		{
			momz = 0;
		}
		else
		{
			momz = FixedMul (momz, 0xe800);
		}
	}
	Super::Tick ();
}
Forgive me for asking, but what's the point of this? Doom didn't do it and I honestly can see any reason for adding this 'feature'.
User avatar
Enjay
 
 
Posts: 27298
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Post by Enjay »

It wouldn't be something to do with a fix from a couple of years back when previously the painelemental, after descending along a corridor with a sloped downwards ceiling would launch its lost souls into the ceiling so that they were destroyed immediately on the ceiling would it?

Code: Select all

April 9, 2002
- Added code to make the pain elemental move down if it's too close to the ceiling to successfully launch a lost soul.
4 hours
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Nice! And how should that work in case that A_PainAttack is used with another monster? What we have here is clearly a 'fix' that has to be re-fixed because it limits the usefulness of the PE's code pointers. It might have created problems even with DEHACKED!
The 'vertical friction' code belongs into AActor, not APainElemental.

I think I'll take care of a proper fix for the next DECORATE update due this weekend so that it works with DECORATE monsters that use A_PainAttack.
Thanks for pointing me to that line. It's hard to find specific info in that file on occasion. ;)


EDIT: Already done!
Post Reply

Return to “General”