Jump to content
  • 0

Arch-vile can't resurrect Spider Mastermind


antares031

Question

So I made a dehacked file that allows arch-viles to resurrect spider masterminds. This works pretty good in ZDoom-related source ports, and even in prboom+ with complevel 2, although the arch-vile sometimes ignores the corpse and just move on in the opened field. I made a mock-up to test the resurrecting platform of spider mastermind with 264 x 256 sized sector (since the speed of spider mastermid is changed to 8, this is the minimum area that it can be active without being stuck), and placed arch-viles around it under the platform. They managed to resurrect the boss monster in prboom+ -complevel 2, so I made the same setup in the level.

 

But they can't resurrect the spider demon, unlike they did with the mock-up, even if the setting is identical with same-sized platform. It still works flawlessly in ZDoom source ports, but I need to fix this for prboom since my target compatibility is limit-removing. I wonder if this is related to blockmap or something about vanilla doom. Thanks, and have a nice day.

Share this post


Link to post

9 answers to this question

Recommended Posts

  • 0

Possibly just move the platforms/sectors around a bit to better suit the 128 grid and give it another try.

Share this post


Link to post
  • 0

This looks like some blockmap issue. The Mastermind is extremely wide and the original blockmap code never accounted for it that well. So if the node builder places the blockmap origin so that the block where the Mastermind is in won't get touched it cannot get resurrected.

 

Share this post


Link to post
  • 0
36 minutes ago, Graf Zahl said:

...So if the node builder places the blockmap origin so that the block where the Mastermind is in won't get touched...

 

 

Sounds like I need to choose the right node builder for this one. Or, is there any method to fix the blockmap by myself manually?

Share this post


Link to post
  • 0
1 hour ago, Fonze said:

......move the platforms/sectors around a bit to better suit the 128 grid

 

Wow, the problem is solved! Thanks a million, Fonze. :)

Share this post


Link to post
  • 0

I think kb1 pointed it out to me when I was having problems with similar things in a wip from a bit ago: (good thing to know for setups like these too)

IIrc a couple of these still need to be fixed

 

2vBtgGO.png

Share this post


Link to post
  • 0

Also I think sometimes arch-viles have enough space to move but not enough space to perform resurrections. It seems like for some reason they need a bit bigger area for that.

Share this post


Link to post
  • 0
39 minutes ago, Memfis said:

Also I think sometimes arch-viles have enough space to move but not enough space to perform resurrections. It seems like for some reason they need a bit bigger area for that.

The Archvile can't be standing on top of the corpse he's resurrecting, because resurrection only works if the position above the corpse is not blocked by anything. Other than that, I don't see any reason why he should need more space than expected. Code:

Spoiler

//
// PIT_VileCheck
// Detect a corpse that could be raised.
//
mobj_t*		corpsehit;
mobj_t*		vileobj;
fixed_t		viletryx;
fixed_t		viletryy;

boolean PIT_VileCheck (mobj_t*	thing)
{
    int		maxdist;
    boolean	check;
	
    if (!(thing->flags & MF_CORPSE) )
	return true;	// not a monster
    
    if (thing->tics != -1)
	return true;	// not lying still yet
    
    if (thing->info->raisestate == S_NULL)
	return true;	// monster doesn't have a raise state
    
    maxdist = thing->info->radius + mobjinfo[MT_VILE].radius;
	
    if ( abs(thing->x - viletryx) > maxdist
	 || abs(thing->y - viletryy) > maxdist )
	return true;		// not actually touching
		
    corpsehit = thing;
    corpsehit->momx = corpsehit->momy = 0;
    corpsehit->height <<= 2;
    check = P_CheckPosition (corpsehit, corpsehit->x, corpsehit->y);
    corpsehit->height >>= 2;

    if (!check)
	return true;		// doesn't fit here
		
    return false;		// got one, so stop checking
}



//
// A_VileChase
// Check for ressurecting a body
//
void A_VileChase (mobj_t* actor)
{
    int			xl;
    int			xh;
    int			yl;
    int			yh;
    
    int			bx;
    int			by;

    mobjinfo_t*		info;
    mobj_t*		temp;
	
    if (actor->movedir != DI_NODIR)
    {
	// check for corpses to raise
	viletryx =
	    actor->x + actor->info->speed*xspeed[actor->movedir];
	viletryy =
	    actor->y + actor->info->speed*yspeed[actor->movedir];

	xl = (viletryx - bmaporgx - MAXRADIUS*2)>>MAPBLOCKSHIFT;
	xh = (viletryx - bmaporgx + MAXRADIUS*2)>>MAPBLOCKSHIFT;
	yl = (viletryy - bmaporgy - MAXRADIUS*2)>>MAPBLOCKSHIFT;
	yh = (viletryy - bmaporgy + MAXRADIUS*2)>>MAPBLOCKSHIFT;
	
	vileobj = actor;
	for (bx=xl ; bx<=xh ; bx++)
	{
	    for (by=yl ; by<=yh ; by++)
	    {
		// Call PIT_VileCheck to check
		// whether object is a corpse
		// that canbe raised.
		if (!P_BlockThingsIterator(bx,by,PIT_VileCheck))
		{
		    // got one!
		    temp = actor->target;
		    actor->target = corpsehit;
		    A_FaceTarget (actor);
		    actor->target = temp;
					
		    P_SetMobjState (actor, S_VILE_HEAL1);
		    S_StartSound (corpsehit, sfx_slop);
		    info = corpsehit->info;
		    
		    P_SetMobjState (corpsehit,info->raisestate);
		    corpsehit->height <<= 2;
		    corpsehit->flags = info->flags;
		    corpsehit->health = info->spawnhealth;
		    corpsehit->target = NULL;

		    return;
		}
	    }
	}
    }

    // Return to normal attack.
    A_Chase (actor);
}

 

 

Share this post


Link to post
  • 0

I guess what was happening is that my arch-vile couldn't always reach the corpse. Then I gave him a bigger area, that solved the problem, and I came to the wrong conclusion.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...