Bully: Difference between revisions

Jump to navigation Jump to search
93 bytes added ,  26 February 2020
m
no edit summary
(Made page)
 
mNo edit summary
Line 30: Line 30:
==Bully Crashes==
==Bully Crashes==
===Angle Conversion Crash===
===Angle Conversion Crash===
Normally, a Bully's angle is confined to the range [-32768, 32767]. However, this code does not occur if the Bully is out-of-bounds. Due to this oversight, if Mario knocks a Bully out-of-bounds, its angle will increase by 32767 every frame without bound. After approximately 36 minutes, the Bully's angle exceeds the hex value 0x7FFFFFFF (2,147,483,647) at which point the game will crash from trying to perform a double-to-int conversion on a value above 0x7FFFFFFF. This crash does not occur on emulators.  
Normally, a Bully's angle is confined to the range [-32768, 32767]. However, this code does not occur if the Bully is out-of-bounds. Due to this oversight, if Mario knocks a Bully out-of-bounds, its angle will increase by 32767 every frame without bound. After approximately 36 minutes, the Bully's angle exceeds the hex value 0x7FFFFFFF (2,147,483,647) at which point the game will crash from trying to perform a double-to-int conversion on a value above 0x7FFFFFFF. This crash does not occur on emulators, except for Wii VC, where the bully will keep moving on one axis, all the way out of the map.  
===Divide by 0 Crash===
===Divide by 0 Crash===
The Bully enemy's knockback logic contains a step that involves dividing by the horizontal distance between Mario and the Bully. Thus, the game will crash from a divide by 0 error if the operation is performed while the distance between Mario and the Bully is 0. Causing this crash requires very specific conditions. Mario must be next to an area out-of-bounds so that he will not be moved away from the bully before the crash can occur and Mario must be in a state to receive knockback from the bully, making the exact movement needed to cause the crash very precise.
The Bully enemy's knockback logic contains a step that involves dividing by the horizontal distance between Mario and the Bully. Thus, the game will crash from a divide by 0 error if the operation is performed while the distance between Mario and the Bully is 0. Causing this crash requires very specific conditions. Mario must be next to an area out-of-bounds so that he will not be moved away from the bully before the crash can occur and Mario must be in a state to receive knockback from the bully, making the exact movement needed to cause the crash very precise.


[[Category:Enemies]]
[[Category:Enemies]]
88

edits

Navigation menu