Skip to content

Commit 9eb190e

Browse files
authored
Fix particle regression (#2228)
1 parent 0e7a89d commit 9eb190e

1 file changed

Lines changed: 12 additions & 11 deletions

File tree

soh/src/code/z_en_item00.c

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1339,25 +1339,26 @@ void EnItem00_CustomItemsParticles(Actor* Parent, PlayState* play, GetItemEntry
13391339
{ 154, 154, 154 } // White Color placeholder
13401340
};
13411341

1342-
static Vec3f velocity = { 0.0f, 0.2f, 0.0f };
1343-
static Vec3f accel = { 0.0f, 0.05f, 0.0f };
1342+
static Vec3f velocity = { 0.0f, 0.0f, 0.0f };
1343+
static Vec3f accel = { 0.0f, 0.0f, 0.0f };
13441344
Color_RGBA8 primColor = { colors[color_slot][0], colors[color_slot][1], colors[color_slot][2], 0 };
13451345
Color_RGBA8 envColor = { colors[color_slot][0], colors[color_slot][1], colors[color_slot][2], 0 };
13461346
Vec3f pos;
13471347

1348-
velocity.y = -0.00f;
1349-
accel.y = -0.0f;
1350-
pos.x = Rand_CenteredFloat(15.0f) + Parent->world.pos.x;
1351-
// Shop items are rendered at a different height than the rest, so a different y offset is required
1348+
// Make particles more compact for shop items and use a different height offset for them.
13521349
if (Parent->id == ACTOR_EN_GIRLA) {
1350+
pos.x = Rand_CenteredFloat(15.0f) + Parent->world.pos.x;
13531351
pos.y = (Rand_ZeroOne() * 10.0f) + Parent->world.pos.y + 3;
1352+
pos.z = Rand_CenteredFloat(15.0f) + Parent->world.pos.z;
1353+
EffectSsKiraKira_SpawnFocused(play, &pos, &velocity, &accel, &primColor, &envColor, 1000, 30);
13541354
} else {
1355-
pos.y = (Rand_ZeroOne() * 10.0f) + Parent->world.pos.y + 25;
1355+
pos.x = Rand_CenteredFloat(32.0f) + Parent->world.pos.x;
1356+
pos.y = (Rand_ZeroOne() * 6.0f) + Parent->world.pos.y + 25;
1357+
pos.z = Rand_CenteredFloat(32.0f) + Parent->world.pos.z;
1358+
velocity.y = -0.05f;
1359+
accel.y = -0.025f;
1360+
EffectSsKiraKira_SpawnDispersed(play, &pos, &velocity, &accel, &primColor, &envColor, 1000, 30);
13561361
}
1357-
pos.z = Rand_CenteredFloat(15.0f) + Parent->world.pos.z;
1358-
1359-
1360-
EffectSsKiraKira_SpawnFocused(play, &pos, &velocity, &accel, &primColor, &envColor, 1000, 30);
13611362
}
13621363

13631364
/**

0 commit comments

Comments
 (0)