shithub: zelda3

Download patch

ref: 3da7cb4231ab12fc937c34405d888bca2bab03c4
parent: fd83a854d915cfc42b857a544fa4c0440f2ddacb
author: Snesrev <[email protected]>
date: Mon Oct 17 23:24:11 EDT 2022

Don't grab fairys under a rock with the hookshot (#126)

--- a/sprite_main.c
+++ b/sprite_main.c
@@ -11806,8 +11806,13 @@
   if (!sprite_ai_state[k]) {
     if (!player_is_indoors)
       sprite_obj_prio[k] = 48;
-    if (SpriteDraw_AbsorbableTransient(k, true))
+    if (SpriteDraw_AbsorbableTransient(k, true)) {
+      // sprite_B holds the sprite that grabbed us. 
+      // Cancel the grab if we're hidden under a rock.
+      if (enhanced_features0 & kFeatures0_MiscBugFixes)
+        sprite_B[k] = 0;
       return;
+    }
   }
   Fairy_CheckIfTouchable(k);
   if (Sprite_ReturnIfInactive(k))