diff --git a/Source/Contents/Effects/Skills/LightSphereEffect.cpp b/Source/Contents/Effects/Skills/LightSphereEffect.cpp index 8acb59818..bddcd31c0 100644 --- a/Source/Contents/Effects/Skills/LightSphereEffect.cpp +++ b/Source/Contents/Effects/Skills/LightSphereEffect.cpp @@ -35,10 +35,13 @@ void CLightSphereEffect::CreateRayParticles(int param) { particle->scale = 1.0f; int r1 = std::rand() % 360; - particle->phaseParameter = r1 < 0 ? 0 : r1; + if (r1 < 0) { + r1 = 0; + } + particle->phaseParameter = r1; int r2 = std::rand() % 360; - *reinterpret_cast(&particle->angleBits) = static_cast(r2 < 0 ? 0 : r2); + *reinterpret_cast(&particle->angleBits) = static_cast(std::ranges::max(r2, 0)); int r3 = std::rand() % 360; particle->angleParameter = r3 < 0 ? 0 : r3; diff --git a/Source/Contents/Effects/Skills/SunStanceEffect.cpp b/Source/Contents/Effects/Skills/SunStanceEffect.cpp index 17ed74357..1607240db 100644 --- a/Source/Contents/Effects/Skills/SunStanceEffect.cpp +++ b/Source/Contents/Effects/Skills/SunStanceEffect.cpp @@ -99,8 +99,8 @@ void CSunStanceEffect::OnProcess() { const float cosine = ClientCos(angle) * 8.0f; const float sine = ClientSin(angle) * 8.0f; const float z = cosine + this->position[2]; - const float y = this->position[1] - 10.0f; const float x = sine + this->position[0]; + const float y = this->position[1] - 10.0f; particle->position.z = z; particle->position.y = y; particle->position.x = x;