Chaingun replacement + A_Keedie = broken dehacked mod

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Post Reply
User avatar
Revae
Posts: 98
Joined: Wed Jul 02, 2014 7:52 pm
Location: CA
Contact:

Chaingun replacement + A_Keedie = broken dehacked mod

Post by Revae »

When you replace a chaingun pickup in Dehacked with a monster who has the action A_Keendie ZDoom derivatives (gzdoom most importantly - to me) will think the chaingun in your inventory is "alive". Thereby any door with the 666 tag will be un-triggerable.

Here's an Ultimate Doom pwad for example. Kill the caco (replaces chaingunner), it'll drop a lost soul (replaces chaingun). Kill the lost soul and the door will open. Try again, but this time IDFA to get a chaingun into your inventory and it'll no longer work as it should.
http://www.mediafire.com/file/qmka8itio4u4uor/keeny.wad
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: Chaingun replacement + A_Keedie = broken dehacked mod

Post by _mental_ »

In which source port does the given sample work? For example, it's broken in PrBoom+ because there is no chaingunner in Ultimate Doom.
If it's designed for (G)ZDoom only then what's the point to use DEHACKED?
Gez
 
 
Posts: 17835
Joined: Fri Jul 06, 2007 3:22 pm

Re: Chaingun replacement + A_Keedie = broken dehacked mod

Post by Gez »

You absolutely can get a chaingunner in Ult. Doom with DeHackEd, you just need to change its editor number to fool the spawn check.

Code: Select all

	// Do not spawn cool, new monsters if !commercial
	if ( gamemode != commercial)
	{
	    switch(mt->type)
	    {
	      case 68:	// Arachnotron
	      case 64:	// Archvile
	      case 88:	// Boss Brain
	      case 89:	// Boss Shooter
	      case 69:	// Hell Knight
	      case 67:	// Mancubus
	      case 71:	// Pain Elemental
	      case 65:	// Former Human Commando
	      case 66:	// Revenant
	      case 84:	// Wolf SS
		spawn = false;
		break;
	    }
	}
	if (spawn == false)
	    break;
Anyway, the fix for this particular issue is simply to add a check discounting items held in inventory from A_KeenDie()'s code. And it would probably be a good idea to do the same with A_BossDeath(). Keep in mind that vanilla, Boom, and so on simply do not have any concept of an inventory item -- a player pawn with a chaingun doesn't keep a chaingun mobj abstractly in the map, it simply has a weapon check flag turned on.
Guest

Re: Chaingun replacement + A_Keedie = broken dehacked mod

Post by Guest »

Yeah. I kinda rushed to make an example of what didn't work in ZDoom, and forgot to make it work in other engines.
http://www.mediafire.com/file/qmka8itio4u4uor/keeny.wad
Updated file that works in prboom, etc, to show I'm not lying.
Never used Eternity before this, but it seems to work fine there too.
User avatar
Revae
Posts: 98
Joined: Wed Jul 02, 2014 7:52 pm
Location: CA
Contact:

Re: Chaingun replacement + A_Keedie = broken dehacked mod

Post by Revae »

Yeah, I rushed to make an example of what didn't work in ZDoom, and forgot to make it work in other engines.
Fixed example: http://www.mediafire.com/file/qmka8itio4u4uor/keeny.wad
Seems to work fine in Eternity as well.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49071
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Chaingun replacement + A_Keedie = broken dehacked mod

Post by Graf Zahl »

The actual problem seems to be that the 'give' cheat never checks the flags of the items it gives to the player. A dehacked weapon that has lost its MF_SPECIAL flag should be excluded from being added to the inventory - no questions asked.
User avatar
Revae
Posts: 98
Joined: Wed Jul 02, 2014 7:52 pm
Location: CA
Contact:

Re: Chaingun replacement + A_Keedie = broken dehacked mod

Post by Revae »

But it needs to be added to the inventory if someone wants to replace the weapon drop, and the held weapon separately.
Updated link: http://www.mediafire.com/file/qmka8itio4u4uor/keeny.wad
The chaingun on the ground replaces a tech column. Just has the SPECIAL flag and the MGUNA sprite.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49071
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Chaingun replacement + A_Keedie = broken dehacked mod

Post by Graf Zahl »

fixed
Post Reply

Return to “Closed Bugs [GZDoom]”