Merge pull request #1608 from GriffinRichards/fix-fieldmap

Fix some incorrect fieldmap names
This commit is contained in:
GriffinR
2022-01-26 17:51:56 -05:00
committed by GitHub
34 changed files with 459 additions and 568 deletions
+7 -7
View File
@@ -445,8 +445,8 @@ static void PacifidlogBridgePerStepCallback(u8 taskId)
static void TryLowerFortreeBridge(s16 x, s16 y)
{
u8 z = PlayerGetZCoord();
if (!(z & 1))
u8 elevation = PlayerGetElevation();
if (!(elevation & 1))
{
switch (MapGridGetMetatileIdAt(x, y))
{
@@ -462,8 +462,8 @@ static void TryLowerFortreeBridge(s16 x, s16 y)
static void TryRaiseFortreeBridge(s16 x, s16 y)
{
u8 z = PlayerGetZCoord();
if (!(z & 1))
u8 elevation = PlayerGetElevation();
if (!(elevation & 1))
{
switch (MapGridGetMetatileIdAt(x, y))
{
@@ -488,7 +488,7 @@ static void FortreeBridgePerStepCallback(u8 taskId)
{
bool8 isFortreeBridgeCur;
bool8 isFortreeBridgePrev;
u8 z, onBridgeElevation;
u8 elevation, onBridgeElevation;
s16 x, y, prevX, prevY;
s16 *data = gTasks[taskId].data;
PlayerGetDestCoords(&x, &y);
@@ -520,9 +520,9 @@ static void FortreeBridgePerStepCallback(u8 taskId)
isFortreeBridgePrev = MetatileBehavior_IsFortreeBridge(MapGridGetMetatileBehaviorAt(prevX, prevY));
// Make sure player isn't below bridge
z = PlayerGetZCoord();
elevation = PlayerGetElevation();
onBridgeElevation = FALSE;
if ((u8)(z & 1) == 0)
if ((u8)(elevation & 1) == 0)
onBridgeElevation = TRUE;
if (onBridgeElevation && (isFortreeBridgeCur == TRUE || isFortreeBridgePrev == TRUE))