Combined if statements per https://github.com/rh-hideout/pokeemerald-expansion/pull/5044\#discussion_r1712962988
This commit is contained in:
parent
91255a6054
commit
0a55a7f40b
1 changed files with 9 additions and 12 deletions
|
@ -183,18 +183,15 @@ int ProcessPlayerFieldInput(struct FieldInput *input)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
if (input->checkStandardWildEncounter)
|
||||
{
|
||||
if (input->dpadDirection == 0 || input->dpadDirection == playerDirection)
|
||||
{
|
||||
GetInFrontOfPlayerPosition(&position);
|
||||
metatileBehavior = MapGridGetMetatileBehaviorAt(position.x, position.y);
|
||||
if (TrySetUpWalkIntoSignpostScript(&position, metatileBehavior, playerDirection) == TRUE)
|
||||
return TRUE;
|
||||
GetPlayerPosition(&position);
|
||||
metatileBehavior = MapGridGetMetatileBehaviorAt(position.x, position.y);
|
||||
}
|
||||
}
|
||||
if ((input->checkStandardWildEncounter) && ((input->dpadDirection == 0) || input->dpadDirection == playerDirection))
|
||||
{
|
||||
GetInFrontOfPlayerPosition(&position);
|
||||
metatileBehavior = MapGridGetMetatileBehaviorAt(position.x, position.y);
|
||||
if (TrySetUpWalkIntoSignpostScript(&position, metatileBehavior, playerDirection) == TRUE)
|
||||
return TRUE;
|
||||
GetPlayerPosition(&position);
|
||||
metatileBehavior = MapGridGetMetatileBehaviorAt(position.x, position.y);
|
||||
}
|
||||
|
||||
if (input->checkStandardWildEncounter && CheckStandardWildEncounter(metatileBehavior) == TRUE)
|
||||
return TRUE;
|
||||
|
|
Loading…
Reference in a new issue