[Added] Ability to prevent "leaky" hurtfloor damage in PowerIronFeet

Moderator: GZDoom Developers

Ability to prevent "leaky" hurtfloor damage in PowerIronFeet

Postby Marisa Kirisame » Fri Jan 15, 2021 7:09 am

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
Marisa Kirisame
ZScript Crimester
 
 
 
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: 霧雨魔理沙#1666
Twitch ID: magusmarisa
Github ID: OrdinaryMagician
Operating System: Other Linux 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

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

Postby Xtyfe » Fri Jan 15, 2021 8:57 am

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 allExpand view
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
Xtyfe
Neque Deos, Neque Dominos
 
Joined: 14 Dec 2007
Location: The Intertubes

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

Postby Enjay » Fri Jan 15, 2021 12:40 pm

I would be nice to have a fully Lava-tight suit. TBH, the leaky damage has always annoyed me a bit.
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

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

Postby Marisa Kirisame » Sat Jan 16, 2021 9:57 am

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
Marisa Kirisame
ZScript Crimester
 
 
 
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: 霧雨魔理沙#1666
Twitch ID: magusmarisa
Github ID: OrdinaryMagician
Operating System: Other Linux 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

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

Postby Xtyfe » Sat Jan 16, 2021 11:31 am

Ohh! Thank you for this. Far better than my hacky method
User avatar
Xtyfe
Neque Deos, Neque Dominos
 
Joined: 14 Dec 2007
Location: The Intertubes

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

Postby Major Cooke » Sat Jan 16, 2021 2:57 pm

Not to mention mappers can put in custom damagetypes now for the damaging floors. That or terrain definitions. So this is much better.
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007


Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 0 guests