diff --git a/OpenRA.Game/WVec.cs b/OpenRA.Game/WVec.cs index bfce594265..068845bf37 100644 --- a/OpenRA.Game/WVec.cs +++ b/OpenRA.Game/WVec.cs @@ -82,8 +82,8 @@ namespace OpenRA return ret; // Add an additional quadratic variation to height - // Uses fp to avoid integer overflow - var offset = (int)((float)(b - a).Length * pitch.Tan() * mul * (div - mul) / (1024 * div * div)); + // Uses decimal to avoid integer overflow + var offset = (int)((decimal)(b - a).Length * pitch.Tan() * mul * (div - mul) / (1024 * div * div)); return new WVec(ret.X, ret.Y, ret.Z + offset); }