Merge pull request #1985 from PokemonSanFran/surfingDismountFix
BUGFIX for Surfing Dismount Ground Effects
This commit is contained in:
@@ -8077,7 +8077,7 @@ static void DoGroundEffects_OnSpawn(struct ObjectEvent *objEvent, struct Sprite
|
|||||||
GetAllGroundEffectFlags_OnSpawn(objEvent, &flags);
|
GetAllGroundEffectFlags_OnSpawn(objEvent, &flags);
|
||||||
SetObjectEventSpriteOamTableForLongGrass(objEvent, sprite);
|
SetObjectEventSpriteOamTableForLongGrass(objEvent, sprite);
|
||||||
DoFlaggedGroundEffects(objEvent, sprite, flags);
|
DoFlaggedGroundEffects(objEvent, sprite, flags);
|
||||||
objEvent->triggerGroundEffectsOnMove = 0;
|
objEvent->triggerGroundEffectsOnMove = FALSE;
|
||||||
objEvent->disableCoveringGroundEffects = 0;
|
objEvent->disableCoveringGroundEffects = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -8094,7 +8094,7 @@ static void DoGroundEffects_OnBeginStep(struct ObjectEvent *objEvent, struct Spr
|
|||||||
SetObjectEventSpriteOamTableForLongGrass(objEvent, sprite);
|
SetObjectEventSpriteOamTableForLongGrass(objEvent, sprite);
|
||||||
filters_out_some_ground_effects(objEvent, &flags);
|
filters_out_some_ground_effects(objEvent, &flags);
|
||||||
DoFlaggedGroundEffects(objEvent, sprite, flags);
|
DoFlaggedGroundEffects(objEvent, sprite, flags);
|
||||||
objEvent->triggerGroundEffectsOnMove = 0;
|
objEvent->triggerGroundEffectsOnMove = FALSE;
|
||||||
objEvent->disableCoveringGroundEffects = 0;
|
objEvent->disableCoveringGroundEffects = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -2496,7 +2496,7 @@ static void TeleportWarpInFieldEffect_SpinEnter(struct Task *task)
|
|||||||
if (task->data[13] == 0)
|
if (task->data[13] == 0)
|
||||||
{
|
{
|
||||||
task->data[13]++;
|
task->data[13]++;
|
||||||
objectEvent->triggerGroundEffectsOnMove = 1;
|
objectEvent->triggerGroundEffectsOnMove = TRUE;
|
||||||
sprite->subspriteMode = task->data[14];
|
sprite->subspriteMode = task->data[14];
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
|
|||||||
@@ -1663,6 +1663,10 @@ static void Task_WaitStopSurfing(u8 taskId)
|
|||||||
gPlayerAvatar.preventStep = FALSE;
|
gPlayerAvatar.preventStep = FALSE;
|
||||||
UnlockPlayerFieldControls();
|
UnlockPlayerFieldControls();
|
||||||
DestroySprite(&gSprites[playerObjEvent->fieldEffectSpriteId]);
|
DestroySprite(&gSprites[playerObjEvent->fieldEffectSpriteId]);
|
||||||
|
#ifdef BUGFIX
|
||||||
|
// If this is not defined but the player steps into grass from surfing, they will appear over the grass instead of in the grass.
|
||||||
|
playerObjEvent->triggerGroundEffectsOnMove = TRUE;
|
||||||
|
#endif
|
||||||
DestroyTask(taskId);
|
DestroyTask(taskId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -3050,7 +3050,7 @@ static void SetPlayerFacingDirection(u8 linkPlayerId, u8 facing)
|
|||||||
{
|
{
|
||||||
if (facing > FACING_FORCED_RIGHT)
|
if (facing > FACING_FORCED_RIGHT)
|
||||||
{
|
{
|
||||||
objEvent->triggerGroundEffectsOnMove = 1;
|
objEvent->triggerGroundEffectsOnMove = TRUE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -3199,7 +3199,7 @@ static void CreateLinkPlayerSprite(u8 linkPlayerId, u8 gameVersion)
|
|||||||
sprite = &gSprites[objEvent->spriteId];
|
sprite = &gSprites[objEvent->spriteId];
|
||||||
sprite->coordOffsetEnabled = TRUE;
|
sprite->coordOffsetEnabled = TRUE;
|
||||||
sprite->data[0] = linkPlayerId;
|
sprite->data[0] = linkPlayerId;
|
||||||
objEvent->triggerGroundEffectsOnMove = 0;
|
objEvent->triggerGroundEffectsOnMove = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -595,7 +595,7 @@ static bool8 JumpInPlaceBuriedTrainer(u8 taskId, struct Task *task, struct Objec
|
|||||||
if (gSprites[task->tOutOfAshSpriteId].animCmdIndex == 2)
|
if (gSprites[task->tOutOfAshSpriteId].animCmdIndex == 2)
|
||||||
{
|
{
|
||||||
trainerObj->fixedPriority = 0;
|
trainerObj->fixedPriority = 0;
|
||||||
trainerObj->triggerGroundEffectsOnMove = 1;
|
trainerObj->triggerGroundEffectsOnMove = TRUE;
|
||||||
|
|
||||||
sprite = &gSprites[trainerObj->spriteId];
|
sprite = &gSprites[trainerObj->spriteId];
|
||||||
sprite->oam.priority = 2;
|
sprite->oam.priority = 2;
|
||||||
|
|||||||
Reference in New Issue
Block a user