Rocket passes through the player who fired it

From DoomWiki.org

Under construction icon-yellow.svgThis article or section is a stub. Please help the Doom Wiki by adding to it.

Rockets, as well as other projectiles, that are fired by the player will pass through them as they make contact. This was done deliberately to prevent projectiles exploding inside their hosts, but means that (for example) a player will not be hit if they teleport into the path of a projectile that they have fired, or run out ahead of it.

This effect is negated if the player dies and then respawns while their ordnance is still in flight, because the new player is a different Thing (see section 3I of the BFG FAQ). They can then be damaged by their own projectiles.

This also applies to monsters' projectiles. For example, a revenant's homing missile cannot be eliminated by looping it around to hit the revenant that fired it, but can be blocked by other revenants.

The cause of this in PIT_CheckThing() from p_map.c.

boolean PIT_CheckThing (mobj_t* thing)
{
    [...]
    
    // missiles can hit other things
    if (tmthing->flags & MF_MISSILE)
    {
	[...]
		
	if (tmthing->target && (
	    tmthing->target->type == thing->type || 
	    (tmthing->target->type == MT_KNIGHT && thing->type == MT_BRUISER)||
	    (tmthing->target->type == MT_BRUISER && thing->type == MT_KNIGHT) ) )
	{
	    // Don't hit same species as originator.
	    if (thing == tmthing->target)
		return true;

	    [...]
	}
	
	[...]
    }
    
    [...]
}

tmthing is the missile. tmthing->target is the missile's originator. thing is what the missile is colliding with. This first checks if the originator is the same type as the collidee (with the baron/knight special case). Then it checks if the originator is the same thing as the collidee, and, if so, stops and returns true. This means there is no collision, the missile passes right through. (The comment here is misleadingly positioned as the species check is actually the check above it.)

Demo files[edit]