Renaming Script Contexts
- Determined how the various script contexts were used and renamed accordingly. - ScriptContext2_Enable/Disable => Lock/UnlockPlayerFieldControls - The sole purpose of the flag is to make sure the player can't move around in the overworld. It has nothing to do with script contexts. - ScriptContext1 => ScriptContext - It is the global script context used to set up scripts which run over many frames. - ScriptContext2_RunNewScript => RunScriptImmediately - ScriptContext2's sole purpose was to run scripts immediately and in a separate context, usually while the global context is waiting for things like map loads or screen changes.
This commit is contained in:
@@ -489,13 +489,13 @@ static void PlayerPC_TurnOff(u8 taskId)
|
||||
if (sTopMenuNumOptions == NUM_BEDROOM_PC_OPTIONS) // Flimsy way to determine if Bedroom PC is in use
|
||||
{
|
||||
if (gSaveBlock2Ptr->playerGender == MALE)
|
||||
ScriptContext1_SetupScript(LittlerootTown_BrendansHouse_2F_EventScript_TurnOffPlayerPC);
|
||||
ScriptContext_SetupScript(LittlerootTown_BrendansHouse_2F_EventScript_TurnOffPlayerPC);
|
||||
else
|
||||
ScriptContext1_SetupScript(LittlerootTown_MaysHouse_2F_EventScript_TurnOffPlayerPC);
|
||||
ScriptContext_SetupScript(LittlerootTown_MaysHouse_2F_EventScript_TurnOffPlayerPC);
|
||||
}
|
||||
else
|
||||
{
|
||||
EnableBothScriptContexts();
|
||||
ScriptContext_Enable();
|
||||
}
|
||||
DestroyTask(taskId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user