Skip to content

Fix OpenPerpetuum/PerpetuumServer#342#488

Merged
aqpanaciy merged 2 commits intoDevelopmentfrom
342-npc-freeze
Mar 31, 2024
Merged

Fix OpenPerpetuum/PerpetuumServer#342#488
aqpanaciy merged 2 commits intoDevelopmentfrom
342-npc-freeze

Conversation

@aqpanaciy
Copy link

Fix - "NPCs don't move" while aggro due to:

  1. Normalization of zero length vector;
  2. Zeroing speed and fail to find path to hostile;
  3. Don't process stationary primary hostile.

No other reasons were found during testing.

- when stopping npc, reset movement to null;
- periodically check primary hostile.
- velocity vector in the case of zero length is calculated in the direction of the unit;
- if at the start already at destination, then set Arrived to true.
@aqpanaciy aqpanaciy added the bug Something isn't working label Mar 22, 2024
@aqpanaciy aqpanaciy requested review from Sellafield and clouths March 22, 2024 10:13
@aqpanaciy aqpanaciy self-assigned this Mar 22, 2024
Copy link

@clouths clouths left a comment

Choose a reason for hiding this comment

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

LGTM

@aqpanaciy aqpanaciy merged commit bf431d3 into Development Mar 31, 2024
@aqpanaciy aqpanaciy linked an issue Mar 31, 2024 that may be closed by this pull request
@aqpanaciy aqpanaciy deleted the 342-npc-freeze branch April 29, 2024 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

NPC State: npc freeze/no-movement

3 participants