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).
This commit is contained in:
parent
695876e566
commit
2e1a40b571
1 changed files with 7 additions and 2 deletions
|
|
@ -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<unsigned>(x) + static_cast<unsigned>(z) * static_cast<unsigned>(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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue