Small tweak to the new check in PCTurnOffEffect

This commit is contained in:
LOuroboros 2022-09-24 22:10:46 -03:00
parent 5500e64a71
commit 00eb67608a

View File

@ -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)