Skip to content

Commit

Permalink
Merge pull request #1854 from warblgarbl/wall-runners
Browse files Browse the repository at this point in the history
Fix Lavitz and Meru running into walls (closes #1083 and #1720)
  • Loading branch information
LordMonoxide authored Dec 16, 2024
2 parents ca1890e + 66f7e67 commit 84094d4
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
2 changes: 2 additions & 0 deletions patches/scripts.csv
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ diff,SECT/DRGN0.BIN/5606/1,scripts/DRGN0/5606/1.diff,"Zackwell Cutscene, force-l
diff,SECT/DRGN0.BIN/5608/1,scripts/DRGN0/5608/1.diff,"Zackwell Cutscene Part 2, force-load"
diff,SECT/DRGN0.BIN/5610/1,scripts/DRGN0/5610/1.diff,"Zieg Cutscene, force-load Dart"
diff,SECT/DRGN21.BIN/36/5,scripts/DRGN21/36/5.diff,"Seles Anim Crash, GH#813"
diff,SECT/DRGN21.BIN/96/3,scripts/DRGN21/96/3.diff,"Hellena Prison, Lavitz running into walls fix, GH#1083"
diff,SECT/DRGN21.BIN/453/1,scripts/DRGN21/453/1.diff,"Lohan Hero Competition shop"
diff,SECT/DRGN21.BIN/597/1,scripts/DRGN21/597/1.diff,"Kazas Garbage Room, GH#1078"
diff,SECT/DRGN22.BIN/453/1,scripts/DRGN22/453/1.diff,"Lohan Hero Competition shop"
Expand All @@ -110,3 +111,4 @@ diff,SECT/DRGN23.BIN/366/1,scripts/DRGN23/366/1.diff,"Flanvel Teleporter Fixes"
diff,SECT/DRGN23.BIN/366/2,scripts/DRGN23/366/2.diff,"Flanvel Teleporter Fixes"
diff,SECT/DRGN23.BIN/366/3,scripts/DRGN23/366/3.diff,"Flanvel Teleporter Fixes"
diff,SECT/DRGN23.BIN/495/2,scripts/DRGN23/495/2.diff,"Vellweb Belzac dialogue fix, GH#1768"
diff,SECT/DRGN24.BIN/612/3,scripts/DRGN24/612/3.diff,"Aglis, Meru running into walls fix, GH#1720"
16 changes: 16 additions & 0 deletions patches/scripts/DRGN21/96/3.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
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
@@ -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]
16 changes: 16 additions & 0 deletions patches/scripts/DRGN24/612/3.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
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
@@ -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 84094d4

Please sign in to comment.