From 52f826e899787206774836e0bba06a4221a3f173 Mon Sep 17 00:00:00 2001 From: aMannus Date: Wed, 21 Dec 2022 12:55:35 +0100 Subject: [PATCH] Fix particle regression --- soh/src/code/z_en_item00.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/soh/src/code/z_en_item00.c b/soh/src/code/z_en_item00.c index 627776ffa66..88fb1b8ab30 100644 --- a/soh/src/code/z_en_item00.c +++ b/soh/src/code/z_en_item00.c @@ -1339,25 +1339,26 @@ void EnItem00_CustomItemsParticles(Actor* Parent, PlayState* play, GetItemEntry { 154, 154, 154 } // White Color placeholder }; - static Vec3f velocity = { 0.0f, 0.2f, 0.0f }; - static Vec3f accel = { 0.0f, 0.05f, 0.0f }; + static Vec3f velocity = { 0.0f, 0.0f, 0.0f }; + static Vec3f accel = { 0.0f, 0.0f, 0.0f }; Color_RGBA8 primColor = { colors[color_slot][0], colors[color_slot][1], colors[color_slot][2], 0 }; Color_RGBA8 envColor = { colors[color_slot][0], colors[color_slot][1], colors[color_slot][2], 0 }; Vec3f pos; - velocity.y = -0.00f; - accel.y = -0.0f; - pos.x = Rand_CenteredFloat(15.0f) + Parent->world.pos.x; - // Shop items are rendered at a different height than the rest, so a different y offset is required + // Make particles more compact for shop items and use a different height offset for them. if (Parent->id == ACTOR_EN_GIRLA) { + pos.x = Rand_CenteredFloat(15.0f) + Parent->world.pos.x; pos.y = (Rand_ZeroOne() * 10.0f) + Parent->world.pos.y + 3; + pos.z = Rand_CenteredFloat(15.0f) + Parent->world.pos.z; + EffectSsKiraKira_SpawnFocused(play, &pos, &velocity, &accel, &primColor, &envColor, 1000, 30); } else { - pos.y = (Rand_ZeroOne() * 10.0f) + Parent->world.pos.y + 25; + pos.x = Rand_CenteredFloat(32.0f) + Parent->world.pos.x; + pos.y = (Rand_ZeroOne() * 6.0f) + Parent->world.pos.y + 25; + pos.z = Rand_CenteredFloat(32.0f) + Parent->world.pos.z; + velocity.y = -0.05f; + accel.y = -0.025f; + EffectSsKiraKira_SpawnDispersed(play, &pos, &velocity, &accel, &primColor, &envColor, 1000, 30); } - pos.z = Rand_CenteredFloat(15.0f) + Parent->world.pos.z; - - - EffectSsKiraKira_SpawnFocused(play, &pos, &velocity, &accel, &primColor, &envColor, 1000, 30); } /**