Skip to content

Commit

Permalink
Skip location check
Browse files Browse the repository at this point in the history
  • Loading branch information
warblgarbl committed Dec 15, 2024
1 parent 037b3ab commit 66f7e67
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 18 deletions.
22 changes: 13 additions & 9 deletions patches/scripts/DRGN21/96/3.diff
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
Skips moving animation when character is already at the destination
Retail checks to see if the sobj is already at the target location, but the code for handling that situation is inadequate.
Retail math precision issues means the sobj never reaches its destination exactly, so retail always bypasses these checks.
--- original
+++ modified
@@ -160,6 +160,8 @@
jmp_cmp !=, stor[29], stor[24], inl[:LABEL_26]
jmp_cmp !=, stor[30], stor[25], inl[:LABEL_26]
jmp_cmp !=, stor[31], stor[26], inl[:LABEL_26]
+mov 0, stor[24]
+return
jmp inl[:LABEL_31]
LABEL_26:
@@ -157,11 +157,6 @@
call 97, 0x2
LABEL_25:
call 102, stor[0], stor[29], stor[30], stor[31]
-jmp_cmp !=, stor[29], stor[24], inl[:LABEL_26]
-jmp_cmp !=, stor[30], stor[25], inl[:LABEL_26]
-jmp_cmp !=, stor[31], stor[26], inl[:LABEL_26]
-jmp inl[:LABEL_31]
-LABEL_26:
sub stor[24], stor[29]
sub stor[25], stor[30]
sub stor[26], stor[31]
22 changes: 13 additions & 9 deletions patches/scripts/DRGN24/612/3.diff
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
Skips moving animation when character is already at the destination
Retail checks to see if the sobj is already at the target location, but the code for handling that situation is inadequate.
Retail math precision issues means the sobj never reaches its destination exactly, so retail always bypasses these checks.
--- original
+++ modified
@@ -152,6 +152,8 @@
jmp_cmp !=, stor[29], stor[24], inl[:LABEL_24]
jmp_cmp !=, stor[30], stor[25], inl[:LABEL_24]
jmp_cmp !=, stor[31], stor[26], inl[:LABEL_24]
+mov 0, stor[24]
+return
jmp inl[:LABEL_29]
LABEL_24:
@@ -149,11 +149,6 @@
call 97, 0x2
LABEL_23:
call 102, stor[0], stor[29], stor[30], stor[31]
-jmp_cmp !=, stor[29], stor[24], inl[:LABEL_24]
-jmp_cmp !=, stor[30], stor[25], inl[:LABEL_24]
-jmp_cmp !=, stor[31], stor[26], inl[:LABEL_24]
-jmp inl[:LABEL_29]
-LABEL_24:
sub stor[24], stor[29]
sub stor[25], stor[30]
sub stor[26], stor[31]

0 comments on commit 66f7e67

Please sign in to comment.