diff --git a/Source/Contents/Effects/Core/Effect.cpp b/Source/Contents/Effects/Core/Effect.cpp index 981ffa0a0..bcca23e62 100644 --- a/Source/Contents/Effects/Core/Effect.cpp +++ b/Source/Contents/Effects/Core/Effect.cpp @@ -141,7 +141,7 @@ void CEffect::Update(std::uint32_t aid) { } const vector3d player = static_cast(g_modeMgr.GetGameMode())->scene->player->render.position; - for (auto event = this->events.begin(); event != this->events.end(); ++event) { + for (auto event = this->events.begin(); this->events.end() != event; ++event) { if (this->frame != event->frame) { continue; } diff --git a/Source/Contents/Effects/Particles/EZ2STREffectEx.cpp b/Source/Contents/Effects/Particles/EZ2STREffectEx.cpp index af718a699..32aa61a33 100644 --- a/Source/Contents/Effects/Particles/EZ2STREffectEx.cpp +++ b/Source/Contents/Effects/Particles/EZ2STREffectEx.cpp @@ -29,19 +29,19 @@ void CEZ2STREffectEx::EnableTimeLimit() { // OFFSET: 0x006FF780 // FUNCTION: fn_06966 float ScreenAngle(const float* from, const float* to, const float* matrix) { - float fromX; - float fromY; float fromDepth = 0.0f; - float toX; - float toY; float toDepth = 0.0f; + float fromY; + float fromX; + float toY; + float toX; g_renderer->ProjectViewport(from, matrix, &fromX, &fromY, &fromDepth); g_renderer->ProjectViewport(to, matrix, &toX, &toY, &toDepth); const float dx = toX - fromX; const float dy = toY - fromY; const float length = SquareRoot(dy * dy + dx * dx); - if (length == 0.0f) { + if (0.0f == length) { return 0.0f; }