From 2e1a40b57166b3b0a04007d42cb978e539d1ea2d Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Tue, 10 Nov 2026 09:33:42 +0000 Subject: [PATCH] Decompile 2 functions in Source/Contents/Ground/GroundWaterState.cpp Batch #15755 by Yommy: 1 byte-identical, 1 confirmed by peer review. - fn_17580 GroundGeometry::WaterLevel: byte-identical - fn_17581 GroundGeometry::UpdateWater: logic confirmed by peer review Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Contents/Ground/GroundWaterState.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Source/Contents/Ground/GroundWaterState.cpp b/Source/Contents/Ground/GroundWaterState.cpp index 9e0525cfb..565e5be3d 100644 --- a/Source/Contents/Ground/GroundWaterState.cpp +++ b/Source/Contents/Ground/GroundWaterState.cpp @@ -57,7 +57,11 @@ float GroundGeometry::WaterLevel(int column, int row) const { const int z = std::min(row / cellHeight, this->waterRows - 1); const unsigned index = static_cast(x) + static_cast(z) * static_cast(this->waterColumns); - return index < this->waterLevels.size() ? this->waterLevels[index] : 0.0f; + if (this->waterLevels.size() > index) { + return this->waterLevels[index]; + } + + return 0.0f; } // OFFSET: 0x00AC1430 @@ -68,7 +72,8 @@ void GroundGeometry::UpdateWater() { static constexpr char format[] = "워터\\water%d%02d.jpg"; char name[32]{}; - for (GroundWaterSurface& surface : this->waterSurfaces) { + for (auto it = this->waterSurfaces.begin(); it != this->waterSurfaces.end(); ++it) { + GroundWaterSurface& surface = *it; ++surface.frame; const int end = surface.animation * 32;