Wikia

Doom Wiki

Talk:Secret

3,233pages on
this wiki

Back to page

When a linedef has the "secret" flag set, it cannot be activated by monsters, even if this would normally be possible (e.g. a door of type 1).  This phenomenon should be mentioned here and in Linedef if one of our technical contributors can find it in the source.    Ryan W 09:44, 31 August 2007 (UTC)

See P_UseSpecialLine in p_switch.c. This is the parent function that dispatches all push and switch type linedefs. At the beginning of the function, the attempted action is rejected if a monster is attempting to hit the switch, except for linedef types 1, 32, 33, 34. (Strange that key locked door linedefs are in there. Monster attempts to use them are rejected later in the locked door code.)
    // Switches that other things can activate.
    if (!thing->player)
    {
	// never open secret doors
	if (line->flags & ML_SECRET)
	    return false;
	
	switch(line->special)
	{
	  case 1: 	// MANUAL DOOR RAISE
	  case 32:	// MANUAL BLUE
	  case 33:	// MANUAL RED
	  case 34:	// MANUAL YELLOW
	    break;
	    
	  default:
	    return false;
	    break;
	}
    }
71.58.109.233 04:44, 6 October 2007 (UTC)

Around Wikia's network

Random Wiki