Page 7 of 14

Re: Universal Gibs

Posted: Thu Feb 22, 2018 4:51 am
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.

Re: Universal Gibs

Posted: Thu Feb 22, 2018 5:05 am
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();
}

Re: Universal Gibs

Posted: Thu Feb 22, 2018 8:30 am
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.

Re: Universal Gibs

Posted: Fri Feb 23, 2018 11:40 am
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!

Re: Universal Gibs

Posted: Fri Feb 23, 2018 11:58 am
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.

Re: Universal Gibs

Posted: Fri Feb 23, 2018 3:41 pm
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.

Re: Universal Gibs - Feature-complete, maybe?

Posted: Sat Feb 24, 2018 3:58 am
by Accensus
- Added option to dissolve blood in liquids.
EDIT: Fixed MENUDEF typo. It's "dissolve", not "disolve." :P

Re: Universal Gibs - Feature-complete, maybe?

Posted: Sat Feb 24, 2018 11:35 am
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.

Re: Universal Gibs

Posted: Wed Feb 28, 2018 12:30 am
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.

Re: Universal Gibs

Posted: Wed Feb 28, 2018 1:39 am
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.

Re: Universal Gibs

Posted: Wed Feb 28, 2018 2:10 am
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.)

Re: Universal Gibs

Posted: Wed Feb 28, 2018 2:37 am
by Accensus
Well I'm not gonna make them bullet sponges. :D
A 50-100% increase should be sufficient.

Re: Universal Gibs

Posted: Wed Feb 28, 2018 4:10 am
by Accensus
- Increased gibbable corpses' health by about 50%.
Let me know how that works out.

Re: Universal Gibs

Posted: Wed Feb 28, 2018 8:30 am
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:

Re: Universal Gibs

Posted: Tue Mar 06, 2018 4:11 am
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.