mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-27 13:53:52 +01:00
Small tweak to the new check in PCTurnOffEffect
This commit is contained in:
parent
5500e64a71
commit
00eb67608a
@ -1056,31 +1056,30 @@ static void PCTurnOffEffect(void)
|
||||
u8 playerDirection = GetPlayerFacingDirection();
|
||||
|
||||
if (IsPlayerInFrontOfPC() == TRUE)
|
||||
return;
|
||||
switch (playerDirection)
|
||||
{
|
||||
switch (playerDirection)
|
||||
{
|
||||
case DIR_NORTH:
|
||||
dx = 0;
|
||||
dy = -1;
|
||||
break;
|
||||
case DIR_WEST:
|
||||
dx = -1;
|
||||
dy = -1;
|
||||
break;
|
||||
case DIR_EAST:
|
||||
dx = 1;
|
||||
dy = -1;
|
||||
break;
|
||||
}
|
||||
if (gSpecialVar_0x8004 == PC_LOCATION_OTHER)
|
||||
tileId = METATILE_Building_PC_Off;
|
||||
else if (gSpecialVar_0x8004 == PC_LOCATION_BRENDANS_HOUSE)
|
||||
tileId = METATILE_BrendansMaysHouse_BrendanPC_Off;
|
||||
else if (gSpecialVar_0x8004 == PC_LOCATION_MAYS_HOUSE)
|
||||
tileId = METATILE_BrendansMaysHouse_MayPC_Off;
|
||||
MapGridSetMetatileIdAt(gSaveBlock1Ptr->pos.x + dx + MAP_OFFSET, gSaveBlock1Ptr->pos.y + dy + MAP_OFFSET, tileId | MAPGRID_COLLISION_MASK);
|
||||
DrawWholeMapView();
|
||||
case DIR_NORTH:
|
||||
dx = 0;
|
||||
dy = -1;
|
||||
break;
|
||||
case DIR_WEST:
|
||||
dx = -1;
|
||||
dy = -1;
|
||||
break;
|
||||
case DIR_EAST:
|
||||
dx = 1;
|
||||
dy = -1;
|
||||
break;
|
||||
}
|
||||
if (gSpecialVar_0x8004 == PC_LOCATION_OTHER)
|
||||
tileId = METATILE_Building_PC_Off;
|
||||
else if (gSpecialVar_0x8004 == PC_LOCATION_BRENDANS_HOUSE)
|
||||
tileId = METATILE_BrendansMaysHouse_BrendanPC_Off;
|
||||
else if (gSpecialVar_0x8004 == PC_LOCATION_MAYS_HOUSE)
|
||||
tileId = METATILE_BrendansMaysHouse_MayPC_Off;
|
||||
MapGridSetMetatileIdAt(gSaveBlock1Ptr->pos.x + dx + MAP_OFFSET, gSaveBlock1Ptr->pos.y + dy + MAP_OFFSET, tileId | MAPGRID_COLLISION_MASK);
|
||||
DrawWholeMapView();
|
||||
}
|
||||
|
||||
void DoLotteryCornerComputerEffect(void)
|
||||
|
Loading…
x
Reference in New Issue
Block a user