Ability to prevent "leaky" hurtfloor damage in PowerIronFeet

Moderator: GZDoom Developers

User avatar
Marisa the Magician
Banned User
Posts: 3886
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Operating System Version (Optional): (btw I use) Arch
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia

Ability to prevent "leaky" hurtfloor damage in PowerIronFeet

Post by Marisa the Magician »

What it says on the tin. As it is, this feature is entirely hardcoded on the native side, but it would be preferable to allow modders to avoid it entirely.

Could perhaps be implemented using the Powerup.Mode property, though I wouldn't know exactly what to name it.
User avatar
Xtyfe
Posts: 1490
Joined: Fri Dec 14, 2007 6:29 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support

Re: Ability to prevent "leaky" hurtfloor damage in PowerIron

Post by Xtyfe »

This is how I've done it in ZScript. It depends on the hardcoded damagetypes that are used for damaging floors. For this to work, it also depends on these damagetypes not being used for any other reason which is normally not the case in vanilla. (For example, I had to change the archviles attack damagetype to something other than fire)

Code: Select all

Class XtPowerEnvironmentSuit : PowerIronFeet
{
	Default
	{
		Powerup.Duration -60;
		Powerup.Color "00FF00", 0.25;
		+INVENTORY.ADDITIVETIME
	}

	override void AbsorbDamage (int damage, Name damageType, out int newdamage)
	{
		if (damageType == 'Fire' || damageType == 'Slime' || damageType == 'Drowning')
		{
			newdamage = 0;
		}
	}

	override void DoEffect ()
	{
		if (Owner.player != NULL)
		{
			Owner.player.mo.ResetAirSupply ();
		}
	}
}
I know this is not the same as what is being asked for here though. I would prefer your way if it ever ended up in GZDoom of course
Last edited by Xtyfe on Fri Jan 15, 2021 12:41 pm, edited 1 time in total.
User avatar
Enjay
 
 
Posts: 27684
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: Ability to prevent "leaky" hurtfloor damage in PowerIron

Post by Enjay »

I would be nice to have a fully Lava-tight suit. TBH, the leaky damage has always annoyed me a bit.
User avatar
Marisa the Magician
Banned User
Posts: 3886
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Operating System Version (Optional): (btw I use) Arch
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia

Re: Ability to prevent "leaky" hurtfloor damage in PowerIron

Post by Marisa the Magician »

I've made a pull request for the change. As documented there, by default the powerup will have "Normal" mode, and "Full" will be available to block out any chance of leaky damage.
User avatar
Xtyfe
Posts: 1490
Joined: Fri Dec 14, 2007 6:29 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support

Re: Ability to prevent "leaky" hurtfloor damage in PowerIron

Post by Xtyfe »

Ohh! Thank you for this. Far better than my hacky method
User avatar
Major Cooke
Posts: 8221
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

Re: Ability to prevent "leaky" hurtfloor damage in PowerIron

Post by Major Cooke »

Not to mention mappers can put in custom damagetypes now for the damaging floors. That or terrain definitions. So this is much better.

Return to “Closed Feature Suggestions [GZDoom]”