mirror of
https://github.com/pret/pokefirered.git
synced 2026-10-02 05:50:47 -05:00
fix pc spawning on specific tiles when using boxlink/debug pc access
This commit is contained in:
@@ -10,4 +10,7 @@ extern const u16 gTilesetPalettes_GenericBuilding1[][16];
|
||||
extern const u32 gTilesetTiles_DepartmentStore[];
|
||||
extern const u16 gTilesetPalettes_DepartmentStore[][16];
|
||||
|
||||
extern const struct Tileset gTileset_PokemonCenter;
|
||||
extern const struct Tileset gTileset_GenericBuilding1;
|
||||
|
||||
#endif // GUARD_TILESETS_H
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "naming_screen.h"
|
||||
#include "party_menu.h"
|
||||
#include "rtc.h"
|
||||
#include "tilesets.h"
|
||||
#include "wallclock.h"
|
||||
#include "dynamic_placeholder_text_util.h"
|
||||
#include "new_menu_helpers.h"
|
||||
@@ -237,10 +238,8 @@ static bool8 IsPlayerInFrontOfPC(void)
|
||||
GetXYCoordsOneStepInFrontOfPlayer(&x, &y);
|
||||
tileInFront = MapGridGetMetatileIdAt(x, y);
|
||||
|
||||
return (tileInFront == METATILE_Building_PCOff
|
||||
|| tileInFront == METATILE_Building_PCOn
|
||||
|| tileInFront == METATILE_GenericBuilding1_PlayersPCOff
|
||||
|| tileInFront == METATILE_GenericBuilding1_PlayersPCOn);
|
||||
return (gMapHeader.mapLayout->secondaryTileset == &gTileset_PokemonCenter && (tileInFront == METATILE_Building_PCOn || tileInFront == METATILE_Building_PCOff))
|
||||
|| (gMapHeader.mapLayout->secondaryTileset == &gTileset_GenericBuilding1 && (tileInFront == METATILE_GenericBuilding1_PlayersPCOn || tileInFront == METATILE_GenericBuilding1_PlayersPCOff));
|
||||
}
|
||||
|
||||
#define tState data[0]
|
||||
|
||||
Reference in New Issue
Block a user