Skip to content

Commit 77d1afe

Browse files
authored
Merge pull request #372 from KSSBrawl/match-runecl
Match EclManager::RunEcl
2 parents 01ce2a7 + 27a29a2 commit 77d1afe

2 files changed

Lines changed: 2 additions & 7 deletions

File tree

src/EclManager.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -804,8 +804,8 @@ ZunResult EclManager::RunEcl(Enemy *enemy)
804804
{
805805
local_98 = enemy->position;
806806

807-
g_Rng.GetRandomF32InBounds(&local_98.x, -72.0f, 72.0f);
808-
g_Rng.GetRandomF32InBounds(&local_98.y, -72.0f, 72.0f);
807+
local_98[0] += g_Rng.GetRandomF32InRange(144.0f) - 72.0f;
808+
local_98[1] += g_Rng.GetRandomF32InRange(144.0f) - 72.0f;
809809
if (g_GameManager.currentPower < 128)
810810
{
811811
g_ItemManager.SpawnItem(&local_98, local_8c == 0 ? ITEM_POWER_BIG : ITEM_POWER_SMALL, 0);

src/Rng.hpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,6 @@ struct Rng
3434
{
3535
return this->GetRandomF32ZeroToOne() * range;
3636
}
37-
38-
void GetRandomF32InBounds(f32 *res, f32 min, f32 max)
39-
{
40-
*res += this->GetRandomF32InRange(max - min) + min;
41-
}
4237
};
4338

4439
DIFFABLE_EXTERN(Rng, g_Rng);

0 commit comments

Comments
 (0)