Bugfix hidefollower not waiting properly (#7768)
This commit is contained in:
parent
5b2ecfe4d4
commit
4816fe02c2
@ -2482,7 +2482,7 @@
|
|||||||
|
|
||||||
@ Hides any follower Pokémon if present, putting them into their Poké Ball; by default waits for their movement to finish.
|
@ Hides any follower Pokémon if present, putting them into their Poké Ball; by default waits for their movement to finish.
|
||||||
.macro hidefollower wait=1
|
.macro hidefollower wait=1
|
||||||
callnative ScrFunc_hidefollower
|
.byte SCR_OP_HIDEFOLLOWER
|
||||||
.2byte \wait
|
.2byte \wait
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
|||||||
@ -251,6 +251,7 @@ gScriptCmdTable::
|
|||||||
script_cmd_table_entry SCR_OP_BUFFERITEMNAMEPLURAL ScrCmd_bufferitemnameplural, requests_effects=1 @ 0xe2
|
script_cmd_table_entry SCR_OP_BUFFERITEMNAMEPLURAL ScrCmd_bufferitemnameplural, requests_effects=1 @ 0xe2
|
||||||
script_cmd_table_entry SCR_OP_DYNMULTICHOICE ScrCmd_dynmultichoice, requests_effects=1 @ 0xe3
|
script_cmd_table_entry SCR_OP_DYNMULTICHOICE ScrCmd_dynmultichoice, requests_effects=1 @ 0xe3
|
||||||
script_cmd_table_entry SCR_OP_DYNMULTIPUSH ScrCmd_dynmultipush, requests_effects=1 @ 0xe4
|
script_cmd_table_entry SCR_OP_DYNMULTIPUSH ScrCmd_dynmultipush, requests_effects=1 @ 0xe4
|
||||||
|
script_cmd_table_entry SCR_OP_HIDEFOLLOWER ScrCmd_hidefollower, requests_effects=1 @ 0xe5
|
||||||
|
|
||||||
.if ALLOCATE_SCRIPT_CMD_TABLE
|
.if ALLOCATE_SCRIPT_CMD_TABLE
|
||||||
gScriptCmdTableEnd::
|
gScriptCmdTableEnd::
|
||||||
|
|||||||
@ -3154,11 +3154,13 @@ bool8 Scrcmd_getobjectfacingdirection(struct ScriptContext *ctx)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 ScrFunc_hidefollower(struct ScriptContext *ctx)
|
bool8 ScrCmd_hidefollower(struct ScriptContext *ctx)
|
||||||
{
|
{
|
||||||
bool16 wait = VarGet(ScriptReadHalfword(ctx));
|
bool16 wait = VarGet(ScriptReadHalfword(ctx));
|
||||||
struct ObjectEvent *obj;
|
struct ObjectEvent *obj;
|
||||||
|
|
||||||
|
Script_RequestEffects(SCREFF_V1 | SCREFF_HARDWARE);
|
||||||
|
|
||||||
if ((obj = ScriptHideFollower()) != NULL && wait)
|
if ((obj = ScriptHideFollower()) != NULL && wait)
|
||||||
{
|
{
|
||||||
sMovingNpcId = obj->localId;
|
sMovingNpcId = obj->localId;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user