Folded nops into hidemoneybox and updatemoneybox
The nops are essential to the hidemoneybox and updatemoneybox commands when using vanilla versions of those commands. Even though they're not actually used parameters in the command implementation, they are still consumed, which means if someone were to get rid of the nops (as I did in TriHard) it causes the commands to consume bytecode that are not theirs, resulting in undefined behavior usually leading to softlocks. Folding the extra bytes into the macros means there's no chance of the extra bytes getting losts in scripts.
This commit is contained in:
@@ -67,8 +67,7 @@ Route121_SafariZoneEntrance_EventScript_22BC48:: @ 822BC48
|
||||
playse SE_REGI
|
||||
msgbox Route121_SafariZoneEntrance_Text_2A501B, MSGBOX_DEFAULT
|
||||
takemoney 0x1f4, 0
|
||||
updatemoneybox 0, 0
|
||||
nop
|
||||
updatemoneybox 0,0
|
||||
msgbox Route121_SafariZoneEntrance_Text_2A5036, MSGBOX_DEFAULT
|
||||
playfanfare MUS_FANFA4
|
||||
message Route121_SafariZoneEntrance_Text_2A5052
|
||||
@@ -76,8 +75,6 @@ Route121_SafariZoneEntrance_EventScript_22BC48:: @ 822BC48
|
||||
msgbox Route121_SafariZoneEntrance_Text_2A506F, MSGBOX_DEFAULT
|
||||
closemessage
|
||||
hidemoneybox
|
||||
nop
|
||||
nop
|
||||
applymovement EVENT_OBJ_ID_PLAYER, Route121_SafariZoneEntrance_Movement_22BD18
|
||||
waitmovement 0
|
||||
special EnterSafariMode
|
||||
@@ -114,8 +111,6 @@ Route121_SafariZoneEntrance_EventScript_22BCF8:: @ 822BCF8
|
||||
Route121_SafariZoneEntrance_EventScript_22BD06:: @ 822BD06
|
||||
closemessage
|
||||
hidemoneybox
|
||||
nop
|
||||
nop
|
||||
applymovement EVENT_OBJ_ID_PLAYER, Route121_SafariZoneEntrance_Movement_22BD16
|
||||
waitmovement 0
|
||||
releaseall
|
||||
|
||||
Reference in New Issue
Block a user