Skip to content

Commit

Permalink
fix enemies running off in seemingly random directions when encountered
Browse files Browse the repository at this point in the history
  • Loading branch information
Herringway committed Sep 15, 2024
1 parent ae43405 commit 507fe27
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/earthbound/bank00.d
Original file line number Diff line number Diff line change
Expand Up @@ -10008,8 +10008,8 @@ void unknownC0D7F7() {
VecYX* x1A = entityPathPoints[currentEntitySlot];
short x18 = entityAbsXTable[currentEntitySlot];
short x16 = entityAbsYTable[currentEntitySlot];
short x12 = cast(short)((pathfindingTargetCenterX - pathfindingTargetWidth * 8) + x1A.x * 8 + collisionWidths[x1C]);
short x04 = cast(short)((pathfindingTargetCenterY - pathfindingTargetHeight * 8) + x1A.y * 8 - collisionHeights2[x1C] + collisionHeights1[x1C]);
short x12 = cast(short)((pathfindingTargetCenterX - pathfindingTargetWidth) * 8 + x1A.x * 8 + collisionWidths[x1C]);
short x04 = cast(short)((pathfindingTargetCenterY - pathfindingTargetHeight) * 8 + x1A.y * 8 - collisionHeights2[x1C] + collisionHeights1[x1C]);
short x10 = cast(short)(x18 - x12);
if (0 > x10) {
x10 = cast(short)-cast(int)x10;
Expand Down

0 comments on commit 507fe27

Please sign in to comment.