Universal Gibs

For high-res texture/sprite projects, sprite-fix patches, music add-ons, music randomizers, and other graphic/sound-only projects.
Forum rules
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.
Post Reply
Accensus
Posts: 2383
Joined: Thu Feb 11, 2016 9:59 am

Re: Universal Gibs

Post by Accensus »

Hard crashes should be reported to the bugs forum, but first you need to narrow it down. Try without universal gibs, because this sounds like an issue with one of those other mods you have.
User avatar
phantombeta
Posts: 2084
Joined: Thu May 02, 2013 1:27 am
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: Brazil

Re: Universal Gibs

Post by phantombeta »

I'm just gonna point out something is going very wrong in GZDoom if you triggered that. Look at the address that it tried to access.
I remember seeing that exact value before, too, so let me check this shit out.

Edit: Yep.

Code: Select all

void AActor::UnlinkFromWorld (FLinkContext *ctx)
{
	if (ctx != nullptr) ctx->sector_list = nullptr;
	if (!(flags & MF_NOSECTOR))
	{
		// invisible things don't need to be in sector list
		// unlink from subsector

		// killough 8/11/98: simpler scheme using pointers-to-pointers for prev
		// pointers, allows head node pointers to be treated like everything else
		AActor **prev = sprev;
		AActor  *next = snext;

		if (prev != NULL)	// prev will be NULL if this actor gets deleted due to cleaning up from a broken savegame
		{
			if ((*prev = next))  // unlink from sector list
				next->sprev = prev;
			snext = NULL;
			sprev = (AActor **)(size_t)0xBeefCafe;	// Woo! Bug-catching value!

			// phares 3/14/98
			//
			// Save the sector list pointed to by touching_sectorlist.
			// In P_SetThingPosition, we'll keep any nodes that represent
			// sectors the Thing still touches. We'll add new ones then, and
			// delete any nodes for sectors the Thing has vacated. Then we'll
			// put it back into touching_sectorlist. It's done this way to
			// avoid a lot of deleting/creating for nodes, when most of the
			// time you just get back what you deleted anyway.

			if (ctx != nullptr)
			{
				ctx->sector_list = touching_sectorlist;
				ctx->render_list = touching_rendersectors;
			}
			else
			{
				P_DelSeclist(touching_sectorlist, &sector_t::touching_thinglist);
				P_DelSeclist(touching_rendersectors, &sector_t::touching_renderthings);
			}
			touching_sectorlist = nullptr; //to be restored by P_SetThingPosition
			touching_rendersectors = nullptr;
		}
	}
		
	if (!(flags & MF_NOBLOCKMAP))
	{
		// [RH] Unlink from all blocks this actor uses
		FBlockNode *block = this->BlockNode;

		while (block != NULL)
		{
			if (block->NextActor != NULL)
			{
				block->NextActor->PrevActor = block->PrevActor;
			}
			*(block->PrevActor) = block->NextActor;
			FBlockNode *next = block->NextBlock;
			block->Release ();
			block = next;
		}
		BlockNode = NULL;
	}
	ClearRenderSectorList();
	ClearRenderLineList();
}
Accensus
Posts: 2383
Joined: Thu Feb 11, 2016 9:59 am

Re: Universal Gibs

Post by Accensus »

- Used Beed28's implementation of gibbable corpses. Not tested. Works at first glance.

Let me know if you find any issues. I only tested the basics using the software renderer.
User avatar
Beed28
Posts: 598
Joined: Sun Feb 24, 2013 4:07 pm
Location: United Kingdom

Re: Universal Gibs

Post by Beed28 »

The only real problem I found was in the PostBeginPlay section of the shootable corpse actor; adding a check for the tracer fixes a potential VM abort:

Code: Select all

override void PostBeginPlay()
{
	if(tracer)
	{
		Health = 2 * tracer.Radius;
		A_SetSize(tracer.Radius, tracer.Height);
	}
	
	Super.PostBeginPlay();
}
Besides that, the shootable corpse also lacked a +NOTAUTOAIMED flag. But other than that, it's been a quite a blast, especially with Russian Overkill!
Accensus
Posts: 2383
Joined: Thu Feb 11, 2016 9:59 am

Re: Universal Gibs

Post by Accensus »

I did not add the check on purpose. The reason is that I want to know if it crashes somewhere, because it could expose a deeper issue, but come to think of it I am better off with doing A_Log instead. Gonna fix that in a few hours when I'm at a PC.
Accensus
Posts: 2383
Joined: Thu Feb 11, 2016 9:59 am

Re: Universal Gibs

Post by Accensus »

- Patched a possible VM abort and put in a proper warning that doesn't abort the game.
- Added NOTAUTOAIMED to gibbable corpses.

Well, since nobody else has reported anything else by now I'll assume no issues have been found. That makes me happy. I can relax now. :D

EDIT: Fixed MENUDEF description.
Accensus
Posts: 2383
Joined: Thu Feb 11, 2016 9:59 am

Re: Universal Gibs - Feature-complete, maybe?

Post by Accensus »

- Added option to dissolve blood in liquids.
EDIT: Fixed MENUDEF typo. It's "dissolve", not "disolve." :P
Accensus
Posts: 2383
Joined: Thu Feb 11, 2016 9:59 am

Re: Universal Gibs - Feature-complete, maybe?

Post by Accensus »

- Decreased dissolving speed and forced a specific alpha for blood on liquids. Alpha of 1.0 on water is weird.
- Reduced gib bounce count from 5 to 4 as to spawn less blood pools and slightly increase performance.
User avatar
Sh4d0wS14d3
Posts: 25
Joined: Sun Jul 25, 2010 2:35 am

Re: Universal Gibs

Post by Sh4d0wS14d3 »

A small bug, but if you gib corpses while sv_monsterrespawn is on, monsters, well. Don't respawn.

I've actually been abusing this to clear through slaughter maps on Nightmare difficulty with Lithium, but I figure it's probably something that needs reporting.
Accensus
Posts: 2383
Joined: Thu Feb 11, 2016 9:59 am

Re: Universal Gibs

Post by Accensus »

At this point I'd rather consider it a feature rather than a bug. Gibbing corpses also prevents resurrection, so I suppose it's intended. Still, I'll increase corpse health to make it less rewarding due to increased ammo consumption.

Anything pertaining to resurrection/respawning is black magic voodoo. I seriously don't want to touch that anymore.
User avatar
Spaceman333
Posts: 622
Joined: Thu Oct 13, 2016 8:40 pm

Re: Universal Gibs

Post by Spaceman333 »

Lud wrote:Still, I'll increase corpse health to make it less rewarding due to increased ammo consumption.
Nooo, I want gibbing corpses to remain satisfying as it already is! :eek:

(P.S. I've recently found Factorio, so I haven't had the chance to play Doom lately.)
Accensus
Posts: 2383
Joined: Thu Feb 11, 2016 9:59 am

Re: Universal Gibs

Post by Accensus »

Well I'm not gonna make them bullet sponges. :D
A 50-100% increase should be sufficient.
Accensus
Posts: 2383
Joined: Thu Feb 11, 2016 9:59 am

Re: Universal Gibs

Post by Accensus »

- Increased gibbable corpses' health by about 50%.
Let me know how that works out.
User avatar
Spaceman333
Posts: 622
Joined: Thu Oct 13, 2016 8:40 pm

Re: Universal Gibs

Post by Spaceman333 »

Lud wrote:Well I'm not gonna make them bullet sponges. :D
A 50-100% increase should be sufficient.
Thanks, thats relieving to hear. :wub:
Accensus
Posts: 2383
Joined: Thu Feb 11, 2016 9:59 am

Re: Universal Gibs

Post by Accensus »

- Added option to toggle whether floor decals are spawned on every bounce or just the first one. Option to disable is still there, of course.
- Gibs no longer spawn a floor decal upon stopping. With the current bounce count/bounce factor it only ate up resources without any visible change.
Post Reply

Return to “Graphic/Audio Patches”