From 8dba2cd153ebc7b7036149bd24656329859eaeed Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 12 Nov 2026 15:46:56 +0000 Subject: [PATCH] Confirm 2 functions in Source/Contents/Ground/GroundDecals.cpp Batch #18333 by eAthena: 0 byte-identical, 2 confirmed by peer review. - fn_17602 GroundGeometry::DrawCellDecal: logic confirmed by peer review (already on main) - fn_17589 GroundGeometry::DrawGridDecal: logic confirmed by peer review (already on main) Peer-reviewed-by: ragnarok-clanker, alisonrag, kyoshi Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Contents/Ground/GroundDecals.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Source/Contents/Ground/GroundDecals.cpp b/Source/Contents/Ground/GroundDecals.cpp index 579ad8180..d6f48dea2 100644 --- a/Source/Contents/Ground/GroundDecals.cpp +++ b/Source/Contents/Ground/GroundDecals.cpp @@ -71,7 +71,8 @@ namespace { return; } - for (auto& vertex : vertices) { + for (int index = 0; index < 4; ++index) { + float* vertex = vertices[index]; if (column & 1) { if (vertices[1][0] > vertex[0]) { vertex[0] = (vertices[1][0] - vertex[0]) * 0.5f + vertex[0]; @@ -96,8 +97,8 @@ namespace { primitive->vertices[corner].z = primitive->vertices[corner].z - bias; } - const float scaleU = static_cast(texture.Width()) / static_cast(texture.TextureWidth()); - const float scaleV = static_cast(texture.Height()) / static_cast(texture.TextureHeight()); + const float scaleU = static_cast(texture.ImageWidth()) / static_cast(texture.TextureWidth()); + const float scaleV = static_cast(texture.ImageHeight()) / static_cast(texture.TextureHeight()); for (unsigned corner = 0; corner < 4; ++corner) { primitive->vertices[corner].u = scaleU * uv[corner * 2];