Updated FOLLOWER_SAFE_MOVEMENT logic.
This commit is contained in:
parent
87140b9352
commit
e60a0b161c
@ -105,6 +105,7 @@ bool8 ScrCmd_nop1(struct ScriptContext *ctx)
|
||||
|
||||
bool8 ScrCmd_end(struct ScriptContext *ctx)
|
||||
{
|
||||
FlagClear(FLAG_SAFE_FOLLOWER_MOVEMENT);
|
||||
StopScript(ctx);
|
||||
return FALSE;
|
||||
}
|
||||
@ -295,6 +296,7 @@ bool8 ScrCmd_returnram(struct ScriptContext *ctx)
|
||||
|
||||
bool8 ScrCmd_endram(struct ScriptContext *ctx)
|
||||
{
|
||||
FlagClear(FLAG_SAFE_FOLLOWER_MOVEMENT);
|
||||
ClearRamScript();
|
||||
StopScript(ctx);
|
||||
return TRUE;
|
||||
@ -1270,7 +1272,6 @@ bool8 ScrCmd_releaseall(struct ScriptContext *ctx)
|
||||
{
|
||||
u8 playerObjectId;
|
||||
struct ObjectEvent *followerObject = GetFollowerObject();
|
||||
FlagClear(FLAG_SAFE_FOLLOWER_MOVEMENT);
|
||||
// Release follower from movement iff it exists and is in the shadowing state
|
||||
if (followerObject && gSprites[followerObject->spriteId].data[1] == 0)
|
||||
ClearObjectEventMovement(followerObject, &gSprites[followerObject->spriteId]);
|
||||
@ -1287,7 +1288,6 @@ bool8 ScrCmd_release(struct ScriptContext *ctx)
|
||||
{
|
||||
u8 playerObjectId;
|
||||
struct ObjectEvent *followerObject = GetFollowerObject();
|
||||
FlagClear(FLAG_SAFE_FOLLOWER_MOVEMENT);
|
||||
// Release follower from movement iff it exists and is in the shadowing state
|
||||
if (followerObject && gSprites[followerObject->spriteId].data[1] == 0)
|
||||
ClearObjectEventMovement(followerObject, &gSprites[followerObject->spriteId]);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user