src/game/Tactical/Keys.cc
FOR_EACH_DOOR_STATUS(d)
	{
		if (d.sGridNo != base_gridno) continue;

		// Set the status
		if (perceived_open != DONTSETDOORSTATUS)
		{
			if (perceived_open)
				d.ubFlags |= DOOR_PERCEIVED_OPEN;
			else
				d.ubFlags &= ~DOOR_PERCEIVED_OPEN;

			// Turn off perceived not set flag
			d.ubFlags &= ~DOOR_PERCEIVED_NOTSET;
		}

		if (is_open != DONTSETDOORSTATUS)
		{
			if (is_open)
				d.ubFlags |= DOOR_OPEN;
			else
				d.ubFlags &= ~DOOR_OPEN;
		}

		return true;
	}
// Check to see if the user is adding an existing door
Check to see if the user is adding an existing door
Check to see if the user is adding an existing door
FOR_EACH_DOOR_STATUS(d)
	{
		if (d.sGridNo != base_gridno) continue;
		if (perceived_open != DONTSETDOORSTATUS)
		{
			if (perceived_open)
				d.ubFlags |= DOOR_PERCEIVED_OPEN;
			else
				d.ubFlags &= ~DOOR_PERCEIVED_OPEN;
			d.ubFlags &= ~DOOR_PERCEIVED_NOTSET;
		}
		if (is_open != DONTSETDOORSTATUS)
		{
			if (is_open)
				d.ubFlags |= DOOR_OPEN;
			else
				d.ubFlags &= ~DOOR_OPEN;
		}
		return true;
	}
FOR_EACH_DOOR_STATUS ( d ) { if ( d . sGridNo != base_gridno ) continue ; if ( perceived_open != DONTSETDOORSTATUS ) { if ( perceived_open ) d . ubFlags |= DOOR_PERCEIVED_OPEN ; else d . ubFlags &= ~ DOOR_PERCEIVED_OPEN ; d . ubFlags &= ~ DOOR_PERCEIVED_NOTSET ; } if ( is_open != DONTSETDOORSTATUS ) { if ( is_open ) d . ubFlags |= DOOR_OPEN ; else d . ubFlags &= ~ DOOR_OPEN ; } return true ; }
Check to see if the user is adding an existing door
Check to see if the user is adding an existing door
// Set the status // Turn off perceived not set flag