Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Terra-jin

Revenant's Behaviour

Recommended Posts

Has anybody else noticed that the Revenant seems to have a tendancy to use its melee attack? Even in -fast mode, the Revenant sometimes charges at you, without firing its missiles. I get this very often with the skeletons, and when I blast a Revenant it suddenly does fire its missiles in -fast mode... I don't know of any other demon that does this.

For the record, this was in ZDOOM 2.0.63, but I've seen it in regular DOOM, as well.

Share this post


Link to post

Odd. I experience the exact opposite. even running right into a revenant's face, I can't get him to punch me. He just uses those missiles.

Share this post


Link to post
Terra-jin said:

Has anybody else noticed that the Revenant seems to have a tendancy to use its melee attack? Even in -fast mode, the Revenant sometimes charges at you, without firing its missiles. I get this very often with the skeletons, and when I blast a Revenant it suddenly does fire its missiles in -fast mode... I don't know of any other demon that does this.

For the record, this was in ZDOOM 2.0.63, but I've seen it in regular DOOM, as well.




Yes, the Revenant uses a slightly different attack AI that prefers using the melee attack. It is the only monster that is doing this.
Surprisingly this is the first time I see this mentioned somewhere.

Share this post


Link to post
Graf Zahl said:

Yes, the Revenant uses a slightly different attack AI that prefers using the melee attack. It is the only monster that is doing this.
Surprisingly this is the first time I see this mentioned somewhere.

Uh excuse me? The revenant uses the exact same walking code pointer as every other monster except the archvile, which is the only monster with different movement AI. Check Dehacked.

Share this post


Link to post

It's probably his speed. When he's awakened, by the time he decides to use his attack, he's usually right in your face.

Share this post


Link to post

Uh excuse me? The revenant uses the exact same walking code pointer as every other monster except the archvile, which is the only monster with different movement AI. Check Dehacked.


Not if inside the code of that codepointer a check is done on what monster it's affecting. Or maybe Graf Zahl is talking about just ZDoom?

Share this post


Link to post

This is the function which decides whether to to a missile attack. It does a specific check for the Revenant (MT_UNDEAD) not to do a missile attack if it is too close to the target:

//
// P_CheckMissileRange
//
boolean P_CheckMissileRange (mobj_t* actor)
{
    fixed_t	dist;
	
    if (! P_CheckSight (actor, actor->target) )	return false;
	
    if ( actor->flags & MF_JUSTHIT )
    {
		// the target just hit the enemy,
		// so fight back!
		actor->flags &= ~MF_JUSTHIT;
		return true;
    }
	
    if (actor->reactiontime) return false;	// do not attack yet
		
    dist = P_AproxDistance ( actor->x-actor->target->x, actor->y-actor->target->y) - 64*FRACUNIT;
    if (!actor->info->meleestate) dist -= 128*FRACUNIT;	// no melee attack, so fire more
    dist >>= 16;

    if (actor->type == MT_VILE)
    {
		if (dist > 14*64) return false;	// too far away
    }
	
    if (actor->type == MT_UNDEAD)
    {
		if (dist < 196)	return false;	// close for fist attack
		dist >>= 1;
    }
	

    if (actor->type == MT_CYBORG || actor->type == MT_SPIDER || actor->type == MT_SKULL)
    {
		dist >>= 1;
    }
    
    if (dist > 200) dist = 200;
    if (actor->type == MT_CYBORG && dist > 160) dist = 160;
    if (P_Random () < dist) return false;
    return true;
}

As you can see there are special checks for some monsters. This function is just a small part behind the walking code pointer.

Share this post


Link to post

i remember this, its not so obvious in the game but if you create a monster in dehacked in place of the reverent and eliminate the melee attack it becomes increadibly obvious. What i'm wondering is why the reverent, is it becasue he launches holming missles (did id think we wouldn't be able to hide and return fire?)

Share this post


Link to post

This is the sort of thing that I find absolutely fascinating, little snippets of code that explain why things in Doom work the way they do. I would love for someone to collaborate on writing a series of layman-level articles going through various stuff like this and explaining what exactly happens and why it's that way.

Share this post


Link to post

I've always hated the revenants rockets, but his bitch-slap just looks awesome. Glad to know that ID realized this as well.

Share this post


Link to post
Terra-jin said:

Has anybody else noticed that the Revenant seems to have a tendancy to use its melee attack? Even in -fast mode, the Revenant sometimes charges at you, without firing its missiles. I get this very often with the skeletons, and when I blast a Revenant it suddenly does fire its missiles in -fast mode... I don't know of any other demon that does this.

For the record, this was in ZDOOM 2.0.63, but I've seen it in regular DOOM, as well.

Bravo on raising a doom related point that hasn't been rehashed a bazillion times!

Share this post


Link to post

Cool, now I have a new strategy for close Revenants

Share this post


Link to post
Jello said:

I've always hated the revenants rockets, but his bitch-slap just looks awesome. Glad to know that ID realized this as well.

Nothin' bad about the rockets. They increase the challenge of fighting him

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×