summaryrefslogtreecommitdiff
path: root/soh/src/code
diff options
context:
space:
mode:
authoraMannus <mannusmenting@gmail.com>2022-12-21 16:40:23 +0100
committerGitHub <noreply@github.com>2022-12-21 10:40:23 -0500
commit9eb190e734b1ae5487803e9d2c430af9690be8a8 (patch)
treeeecd554bccb52f5e7b6fe23016068c557ff5ec72 /soh/src/code
parent0e7a89d1174a9080d1d88e9556e6b11e4ab8726e (diff)
Fix particle regression (#2228)
Diffstat (limited to 'soh/src/code')
-rw-r--r--soh/src/code/z_en_item00.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/soh/src/code/z_en_item00.c b/soh/src/code/z_en_item00.c
index 627776ffa..88fb1b8ab 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);
}
/**