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();
|
u8 playerDirection = GetPlayerFacingDirection();
|
||||||
|
|
||||||
if (IsPlayerInFrontOfPC() == TRUE)
|
if (IsPlayerInFrontOfPC() == TRUE)
|
||||||
|
return;
|
||||||
|
switch (playerDirection)
|
||||||
{
|
{
|
||||||
switch (playerDirection)
|
case DIR_NORTH:
|
||||||
{
|
dx = 0;
|
||||||
case DIR_NORTH:
|
dy = -1;
|
||||||
dx = 0;
|
break;
|
||||||
dy = -1;
|
case DIR_WEST:
|
||||||
break;
|
dx = -1;
|
||||||
case DIR_WEST:
|
dy = -1;
|
||||||
dx = -1;
|
break;
|
||||||
dy = -1;
|
case DIR_EAST:
|
||||||
break;
|
dx = 1;
|
||||||
case DIR_EAST:
|
dy = -1;
|
||||||
dx = 1;
|
break;
|
||||||
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();
|
|
||||||
}
|
}
|
||||||
|
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)
|
void DoLotteryCornerComputerEffect(void)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user