Skip to content

Fix infinite hazard timer, infinite sword glitch & bottle dupe#195

Open
Admentus64 wants to merge 1 commit intomasterfrom
min-hazard-timer
Open

Fix infinite hazard timer, infinite sword glitch & bottle dupe#195
Admentus64 wants to merge 1 commit intomasterfrom
min-hazard-timer

Conversation

@Admentus64
Copy link
Contributor

@Admentus64 Admentus64 commented Jan 16, 2026

Fixes a bug where the hazard timer does not activate when Link's health is exactly 0x1.

The hearts in the HUD do not represent Link's actual health, but rather Link's actual health is shown by using hearts.

To explain. A heart goes into four quarters. And usually a hit from an enemy does at least a minimum of one quarter of a heart. But Link's health is a larger value than 20 times 4 quarters. With 20 hearts Link has a total of 0x140 (320) health. Every 0x10 (16) health is shown as one heart, so a quarter of a heart is actually 4 health. It's not realistically to happen, but when on a quarter of a heart you can still take damage and not die (ex. burn damage to get past the last quarter of a heart).

And then the timer. The hazard timer that set's when underwater without the Zora Tunic or in a heated area without the Goron Tunic is based on Link's remaining actual health. Here's the catch and the bug though, the timer starts at 0 and adds one second for every 2 health. So what happens if Link exactly has 1 health? The timer sets itself to... You guessed it. Zero. 0 seconds. Additionally the timer can't set itself if Link's health is 1 or lower. Sooooo, Link can indefinitely stay in heated rooms or underwater without the appropriate tunic, as long you stay at 1 health. So don't replenish any health or get hit (cus you die obviously).

This fix set the hazard timer to a minimum of one second. It also fixes the timer from not activating if health is exactly 1.

But since this is a helpful glitch, it's an optional file option. The "Power Crouch Stab Fix" option has been renamed to "Fix Useful Glitches" which now includes both glitch fixes (and future ones).

In addition to the infinite hazard timer fix, the "Fix Useful Glitches" option also fixes the Infinite Sword Glitch (ISG) and various bottle (such as the Bottle Dupe Glitch when setting a different item to C / D-Pad when putting an item into a bottle, replacing the new item slot with an extra bottle, or the Fake Ocarina glitch by using a bottle and then another item when backflipping).

Finally, it also fixes a bug where you could set items to the C or D-Pad buttons regardless of allowed age, also called the Equip Swap glitch.

@Admentus64 Admentus64 changed the title Minimum hazard timer Round up hazard timer Jan 16, 2026
@Admentus64 Admentus64 force-pushed the min-hazard-timer branch 2 times, most recently from 75ca009 to 55dfe69 Compare January 16, 2026 15:57
@Admentus64 Admentus64 changed the title Round up hazard timer Activate hazard timer if health is 1 Jan 16, 2026
@Admentus64 Admentus64 force-pushed the min-hazard-timer branch 6 times, most recently from 2491088 to 3911a88 Compare January 16, 2026 16:52
@Admentus64 Admentus64 changed the title Activate hazard timer if health is 1 Fix infinite hazard timer & infinite sword glitch Jan 16, 2026
@Admentus64 Admentus64 force-pushed the min-hazard-timer branch 4 times, most recently from c1830e0 to 1f61c5a Compare January 16, 2026 23:36
@Admentus64 Admentus64 changed the title Fix infinite hazard timer & infinite sword glitch Fix infinite hazard timer, infinite sword glitch & bottle dupe Jan 16, 2026
@Admentus64 Admentus64 force-pushed the min-hazard-timer branch 5 times, most recently from fa270bc to 22262c4 Compare January 21, 2026 14:20
@Admentus64 Admentus64 force-pushed the min-hazard-timer branch 4 times, most recently from 1ca75fe to 584574b Compare January 30, 2026 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant