Skip to content

Only use NavRtF_NoOwner on salary and teleport#4823

Merged
Loobinex merged 1 commit into
masterfrom
navflagdefault
May 24, 2026
Merged

Only use NavRtF_NoOwner on salary and teleport#4823
Loobinex merged 1 commit into
masterfrom
navflagdefault

Conversation

@Loobinex
Copy link
Copy Markdown
Member

Fixes #4822

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts several AI/navigation route checks to stop using NavRtF_NoOwner in room-targeting logic, so locked/hidden-door ownership constraints are respected when deciding whether a room is reachable (fixing #4822’s “attack/sabotage rooms ignore locked doors” behavior).

Changes:

  • Use NavRtF_Default instead of NavRtF_NoOwner when checking reachability of a player’s rooms (creature_can_get_to_any_of_players_rooms).
  • Use NavRtF_Default for room-destruction targeting and heading setup in enemy-room destruction flow.
  • Use NavRtF_Default throughout hero party “attack rooms” / “sabotage rooms” target selection and movement setup.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/room_data.c Makes “can reach any of player’s rooms” checks respect default navigation constraints.
src/creature_states.c Ensures “destroy enemy room” setup uses default navigation flags for reachability and heading.
src/creature_states_hero.c Updates hero party attack/sabotage room targeting to use default navigation flags.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/room_data.c
Comment on lines 2161 to 2164
for (RoomKind rkind = 1; rkind < game.conf.slab_conf.room_types_count; rkind++)
{
struct Room* room = find_room_of_kind_creature_can_navigate_to(thing, owner, rkind, NavRtF_NoOwner);
struct Room* room = find_room_of_kind_creature_can_navigate_to(thing, owner, rkind, NavRtF_Default);
if (!room_is_invalid(room))
@Loobinex Loobinex merged commit 0e7e1e5 into master May 24, 2026
5 checks passed
@Loobinex Loobinex deleted the navflagdefault branch May 24, 2026 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Parties set to attack/sabotage rooms don't consider locked doors.

2 participants