Dev command updated
This commit is contained in:
@@ -184,7 +184,7 @@ public class Terrain {
|
||||
|
||||
// Normalize terrain offset
|
||||
|
||||
Vector2f normalizedLoc = new Vector2f(Math.abs(zone_offset.x) / this.terrain_size.x,
|
||||
Vector2f normalizedOffset = new Vector2f(Math.abs(zone_offset.x) / this.terrain_size.x,
|
||||
Math.abs(zone_offset.y) / terrain_size.y);
|
||||
|
||||
float xval;
|
||||
@@ -203,14 +203,14 @@ public class Terrain {
|
||||
|
||||
float value;
|
||||
|
||||
if (normalizedLoc.x <= 1 - xval || normalizedLoc.x <= normalizedLoc.y) {
|
||||
if (normalizedOffset.x <= 1 - xval || normalizedOffset.x <= normalizedOffset.y) {
|
||||
|
||||
if (normalizedLoc.y < 1 - yval)
|
||||
if (normalizedOffset.y < 1 - yval)
|
||||
return 1;
|
||||
|
||||
value = (normalizedLoc.y - (1 - yval)) / yval;
|
||||
value = (normalizedOffset.y - (1 - yval)) / yval;
|
||||
} else
|
||||
value = (normalizedLoc.x - (1 - xval)) / xval;
|
||||
value = (normalizedOffset.x - (1 - xval)) / xval;
|
||||
|
||||
value = (float) Math.atan((0.5f - value) * PI);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user