Skip to content

Commit

Permalink
zzre: Fix softlock with changeWaypoint instructions on fairy NPCs
Browse files Browse the repository at this point in the history
Fixes #278
  • Loading branch information
Helco committed Jan 22, 2024
1 parent 4b9ba81 commit 736a02c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions zzre/game/systems/npc/NPCMovementByDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ private void Update(
components.NPCType npcType,
Location location,
ref components.NPCMovement move,
ref components.NonFairyAnimation animation,
in components.NPCIsWalkingByDialog byDialog)
{
if (!UpdateWalking(elapsedTime, entity, npcType, location, ref move))
return;

if (move.NextWaypointId == -1)
animation.Next = zzio.AnimationType.Idle0;
var animation = entity.TryGet<components.NonFairyAnimation>();
if (move.NextWaypointId == -1 && animation.HasValue)
animation.Value.Next = zzio.AnimationType.Idle0;

recorder.Record(entity).Remove<components.NPCIsWalkingByDialog>();
recorder.Record(byDialog.DialogEntity).Set(components.DialogState.NextScriptOp);
Expand Down

0 comments on commit 736a02c

Please sign in to comment.