Opened 7 years ago

Closed 6 years ago

#1747 closed bug (invalid)

Closed/locked/jammed doors inconsistencies

Reported by: PowerWyrm Owned by:
Milestone: 3.5.0 Keywords:
Cc:

Description

The FEAT_XXX refactoring introduced inconsistencies with how closed/locked/jammed doors are treated due to the fact that cave_iscloseddoor() doesn't define what you would expect (closed doors), but all closed/locked/jammed doors. So at some places in the code, it is used for closed doors incorrectly, like when a monster tries to open a door. Or you get redundant calls (cave_iscloseddoor + cave_islockeddoor for example).

Fix: use cave_iscloseddoor() for closed doors only (not locked), cave_islockeddoor() for locked doors only (not jammed) and cave_iscloseddoor + cave_islockeddoor + cave_isjammeddoor for "any" door.

Note that this ticket becomes obsolete when #1746 is implemented.

Change History (2)

comment:1 Changed 7 years ago by PowerWyrm

FEAT_DOOR_HEAD + 0x08 is really confusing too. Is this a jammed door? A closed door? There are places in the code where a test against 0x07 is done, other places where it's 0x08 and other places with 0x09. This could explain the comments why monsters don't bash doors in the latest dev version.

Temporary fix: 0x00 is a closed door, 0x01-0x07 is a locked door, 0x08 is a closed door (same as 0x00), 0x09-0x15 is a jammed door; players/monsters pick locks by removing 1 to the door power until it's 0x00; players/monsters bash doors by removing 1 to the door power until it's 0x08.

Ultimate fix: implement #1746 and remove locked/jammed doors.

comment:2 Changed 6 years ago by PowerWyrm

  • Resolution set to invalid
  • Status changed from new to closed

Closing this as #1746 made it obsolete.

Note: See TracTickets for help on using tickets.