• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Automap (client) [VS plugin mod]


Commit MetaInfo

Révisionb12ce327c9ba97d184bfe079f86b847bf2ef9a17 (tree)
l'heure2021-05-19 05:53:47
Auteurmelchior <melchior@user...>
Commitermelchior

Message de Log

W.I.P. changed slope variables

Change Summary

Modification

--- a/Automap/Renderers/StandardRenderer.cs
+++ b/Automap/Renderers/StandardRenderer.cs
@@ -153,27 +153,22 @@ namespace Automap
153153 continue;
154154 }
155155
156- //if (mapCornerChunks.Any(chks => chks == null)) {
157- //Logger.Warning("mapCornerChunks A.W.O.L. near : X{0} Y{1} Z{2} - ", localX, localY, localZ);
158- //continue;
159- //}
160-
161156 float slopeBoost = 1f;
162- int leftTop, rightTop, leftBot;
163-
164- int up_X = localX;
165- int low_X = localX + 1;
166- int left_Z = localZ;
167- int right_Z = localZ + 1;
157+ int northH, northWestH, westH;
168158
169- //topX = GameMath.Mod(topX, chunkSize + 1);
170- //leftZ = GameMath.Mod(leftZ, chunkSize + 1);
159+ int north_X = localX + 1;
160+ int north_Z = localZ;
161+ int west_X = localX;
162+ int west_Z = localZ + 1;
163+ int northWest_X = localX;
164+ int northWest_Z = localZ;
171165
172- leftTop = Math.Sign(localY - (overlapHeightmap[up_X, left_Z] == 0 ? avgOverlap_Y : overlapHeightmap[up_X, left_Z]));
173- rightTop = Math.Sign(localY - (overlapHeightmap[up_X, right_Z]== 0 ? avgOverlap_Y : overlapHeightmap[up_X, right_Z]));
174- leftBot = Math.Sign(localY - (overlapHeightmap[low_X, left_Z]== 0 ? avgOverlap_Y : overlapHeightmap[low_X, left_Z]));
166+
167+ northH = Math.Sign(localY - (overlapHeightmap[north_X, north_Z] == 0 ? avgOverlap_Y : overlapHeightmap[north_X, north_Z]));
168+ northWestH = Math.Sign(localY - (overlapHeightmap[northWest_X, northWest_Z] == 0 ? avgOverlap_Y : overlapHeightmap[northWest_X, northWest_Z]));
169+ westH = Math.Sign(localY - (overlapHeightmap[west_X, west_Z] == 0 ? avgOverlap_Y : overlapHeightmap[west_X, west_Z]));
175170
176- float slopeness = (leftTop + rightTop + leftBot);
171+ float slopeness = (northH + northWestH + westH);
177172
178173 if (slopeness > 0) slopeBoost = 1.2f;
179174 if (slopeness < 0) slopeBoost = 0.8f;