From 37d0e17be491625384ba738acaa135b9e9f71a60 Mon Sep 17 00:00:00 2001 From: Ariel Antonitis Date: Sat, 24 Apr 2021 21:21:01 -0400 Subject: [PATCH] Fixed shadow hot springs bug. --- data/layouts/LavaridgeTown/map.bin | 2 +- data/maps/LavaridgeTown/map.json | 2 +- src/event_object_movement.c | 2 +- src/field_effect_helpers.c | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/data/layouts/LavaridgeTown/map.bin b/data/layouts/LavaridgeTown/map.bin index 604ad5f3f8..a001f8cd38 100644 --- a/data/layouts/LavaridgeTown/map.bin +++ b/data/layouts/LavaridgeTown/map.bin @@ -1,3 +1,3 @@ -qqqq{ttttt|qqqqqqq66{tttzq2񭀬񭀬xttttttttr{2t2|qqqNKLOq6rr񋍐񋉖JHIMyy0123rr2332PQRS2289:;򷠶rr񠫞򘄨XYZ[󩅍`ABC򷠶rr`abc550 1"1044rr򑺐񚢠򎰬0 1"10000 1"1000rr񚠀񚠀220 1"1000 1"1000rr燘燘00 1!11111!1!1111rr22200(1)1)1)1)1)1)1)1)1)1)1rr񠙁񣝹񣞃000000000000rr0000 0 0 +qqqq{ttttt|qqqqqqq66{tttzq2񭀬񭀬xttttttttr{2t2|qqqNKLOq6rr񋍐񋉖JHIMyy0123rr򔾖񋍆PQRS2289:;򷠶rr񠫞򘄨XYZ[󩅍`ABC򷠶rr`abc550 1"1044rr򑺐񚢠򎰬0 1"10000 1"1000rr񚠀񚠀220 1"1000 1"1000rr燘燘00 1!11111!1!1111rr22200(1)1)1)1)1)1)1)1)1)1)1rr񠙁񣝹񣞃000000000000rr0000 0 0 00 0 0 00rr0000rr000  4rr򼯽000 !" !"4rr000000000000400004m000000000000000򷠶qqrm0000000000000044qqllllllllllllllll \ No newline at end of file diff --git a/data/maps/LavaridgeTown/map.json b/data/maps/LavaridgeTown/map.json index 54bda6ca32..29b1d2d33f 100644 --- a/data/maps/LavaridgeTown/map.json +++ b/data/maps/LavaridgeTown/map.json @@ -77,7 +77,7 @@ "x": 4, "y": 4, "elevation": 3, - "movement_type": "MOVEMENT_TYPE_FACE_DOWN_AND_RIGHT", + "movement_type": "MOVEMENT_TYPE_FACE_DOWN_AND_LEFT", "movement_range_x": 0, "movement_range_y": 0, "trainer_type": "TRAINER_TYPE_NONE", diff --git a/src/event_object_movement.c b/src/event_object_movement.c index 939ff3ca6d..635659fb03 100644 --- a/src/event_object_movement.c +++ b/src/event_object_movement.c @@ -8862,7 +8862,7 @@ static void DoFlaggedGroundEffects(struct ObjectEvent *objEvent, struct Sprite * for (i = 0; i < ARRAY_COUNT(sGroundEffectFuncs); i++, flags >>= 1) if (flags & 1) sGroundEffectFuncs[i](objEvent, sprite); - if (!gWeatherPtr->noShadows) + if (!(gWeatherPtr->noShadows || objEvent->inHotSprings)) GroundEffect_Shadow(objEvent, sprite); } diff --git a/src/field_effect_helpers.c b/src/field_effect_helpers.c index ed5ffecd62..4304230391 100755 --- a/src/field_effect_helpers.c +++ b/src/field_effect_helpers.c @@ -349,6 +349,7 @@ void UpdateShadowFieldEffect(struct Sprite *sprite) sprite->invisible = linkedSprite->invisible; if (!objectEvent->active || objectEvent->noShadow + || objectEvent->inHotSprings || gWeatherPtr->noShadows || MetatileBehavior_IsPokeGrass(objectEvent->currentMetatileBehavior) || MetatileBehavior_IsSurfableWaterOrUnderwater(objectEvent->currentMetatileBehavior)