diff --git a/ConfigManagerV2/ConfigManagerV2.sln b/ConfigManagerV2/ConfigManagerV2.sln
index b2ffd47..8252236 100644
--- a/ConfigManagerV2/ConfigManagerV2.sln
+++ b/ConfigManagerV2/ConfigManagerV2.sln
@@ -3,18 +3,34 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.1.32228.430
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConfigManagerV2", "ConfigManagerV2\ConfigManagerV2.csproj", "{0C1DD2D0-F373-43A3-9B2D-F42BCA33D95A}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConfigManagerV2", "ConfigManagerV2\ConfigManagerV2.csproj", "{0C1DD2D0-F373-43A3-9B2D-F42BCA33D95A}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SteamShared", "..\SteamShared\SteamShared\SteamShared\SteamShared.csproj", "{A1C22F5E-D102-4236-9BD0-1D57147FED18}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
+ Debug|x64 = Debug|x64
Release|Any CPU = Release|Any CPU
+ Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{0C1DD2D0-F373-43A3-9B2D-F42BCA33D95A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0C1DD2D0-F373-43A3-9B2D-F42BCA33D95A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0C1DD2D0-F373-43A3-9B2D-F42BCA33D95A}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {0C1DD2D0-F373-43A3-9B2D-F42BCA33D95A}.Debug|x64.Build.0 = Debug|Any CPU
{0C1DD2D0-F373-43A3-9B2D-F42BCA33D95A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0C1DD2D0-F373-43A3-9B2D-F42BCA33D95A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {0C1DD2D0-F373-43A3-9B2D-F42BCA33D95A}.Release|x64.ActiveCfg = Release|Any CPU
+ {0C1DD2D0-F373-43A3-9B2D-F42BCA33D95A}.Release|x64.Build.0 = Release|Any CPU
+ {A1C22F5E-D102-4236-9BD0-1D57147FED18}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A1C22F5E-D102-4236-9BD0-1D57147FED18}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A1C22F5E-D102-4236-9BD0-1D57147FED18}.Debug|x64.ActiveCfg = Debug|x64
+ {A1C22F5E-D102-4236-9BD0-1D57147FED18}.Debug|x64.Build.0 = Debug|x64
+ {A1C22F5E-D102-4236-9BD0-1D57147FED18}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A1C22F5E-D102-4236-9BD0-1D57147FED18}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A1C22F5E-D102-4236-9BD0-1D57147FED18}.Release|x64.ActiveCfg = Release|x64
+ {A1C22F5E-D102-4236-9BD0-1D57147FED18}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/ConfigManagerV2/ConfigManagerV2/ConfigManagerV2.csproj b/ConfigManagerV2/ConfigManagerV2/ConfigManagerV2.csproj
index 4106cb0..d84276c 100644
--- a/ConfigManagerV2/ConfigManagerV2/ConfigManagerV2.csproj
+++ b/ConfigManagerV2/ConfigManagerV2/ConfigManagerV2.csproj
@@ -2,7 +2,7 @@
WinExe
- net6.0-windows
+ net7.0-windows
enable
true
diff --git a/DamageCalculator/DamageCalculator/DamageCalculator.csproj b/DamageCalculator/DamageCalculator/DamageCalculator.csproj
index 472c25b..8ad7099 100644
--- a/DamageCalculator/DamageCalculator/DamageCalculator.csproj
+++ b/DamageCalculator/DamageCalculator/DamageCalculator.csproj
@@ -11,8 +11,8 @@
27.ico
- 1.3.1.2
- 1.3.1.2
+ 1.3.1.3
+ 1.3.1.3
diff --git a/DamageCalculator/DamageCalculator/MainWindow.xaml.cs b/DamageCalculator/DamageCalculator/MainWindow.xaml.cs
index c36287e..ab39e1e 100644
--- a/DamageCalculator/DamageCalculator/MainWindow.xaml.cs
+++ b/DamageCalculator/DamageCalculator/MainWindow.xaml.cs
@@ -1113,18 +1113,18 @@ namespace Damage_Calculator
}
// Manage height
- if (this.playerPoint.AssociatedAreaID < 0 ||
- ((this.DrawMode == eDrawMode.Shooting && this.targetPoint.AssociatedAreaID < 0)
- || (this.DrawMode == eDrawMode.Bomb && this.bombPoint.AssociatedAreaID < 0)))
+ if (this.playerPoint.Z == null ||
+ ((this.DrawMode == eDrawMode.Shooting && this.targetPoint.Z == null)
+ || (this.DrawMode == eDrawMode.Bomb && this.bombPoint.Z == null)))
{
- // One of the points has no area ID, and thus no Z coordinate
+ // One of the points has no Z coordinate set
leftZ = 0;
rightZ = 0;
}
else
{
- leftZ = this.DrawMode == eDrawMode.Shooting ? this.targetPoint.Z : this.bombPoint.Z;
- rightZ = this.playerPoint.Z;
+ leftZ = (this.DrawMode == eDrawMode.Shooting ? this.targetPoint.Z : this.bombPoint.Z) ?? 0;
+ rightZ = this.playerPoint.Z ?? 0;
}
// Distance in units in 2D
@@ -1136,9 +1136,10 @@ namespace Damage_Calculator
float maxFactor = 1.0f;
// Add the appropriate height
- // They use the middle of the oriented bounding box,
- // which should be equal to the axis-aligned bounding box, but with additional yaw in the normal sense
- // Since we already have the X-Y middle, we just add half of the height to get the Z-middle as well
+ // They use a random value,
+ // which should be between the player's origin + 0.7 times their eye level and 1 times their eye level
+ // Since we already have the X-Y middle, we just add 0.7 or 1 as a factor for the eye level,
+ // depending on if it's the min or max possible value we want to get
if (radioPlayerStanding.IsChecked == true)
rightZ += isMax ? eyeLevelStanding * maxFactor : eyeLevelStanding * minFactor;
else if(radioPlayerCrouched.IsChecked == true)
@@ -1900,6 +1901,7 @@ namespace Damage_Calculator
this.targetPoint.PercentageX = newPointPosPixels.X * 100f / this.mapCanvas.ActualWidth;
this.targetPoint.PercentageY = newPointPosPixels.Y * 100f / this.mapCanvas.ActualHeight;
this.targetPoint.PercentageScale = circle.Width * 100f / this.mapCanvas.ActualWidth;
+ this.targetPoint.Z = null; // Initialise with null, just in case
this.targetPoint.Z = givenCoords == null ? this.currentMouseCoord.Z : givenCoords.Z;
if (this.currentHeightLayer >= 0 && givenCoords == null)
{
@@ -1937,6 +1939,7 @@ namespace Damage_Calculator
this.bombPoint.PercentageX = newPointPosPixels.X * 100f / this.mapCanvas.ActualWidth;
this.bombPoint.PercentageY = newPointPosPixels.Y * 100f / this.mapCanvas.ActualHeight;
this.bombPoint.PercentageScale = circle.Width * 100f / this.mapCanvas.ActualWidth;
+ this.bombPoint.Z = null; // Initialise with null, just in case
this.bombPoint.Z = givenCoords == null ? this.currentMouseCoord.Z : givenCoords.Z;
if (this.currentHeightLayer >= 0 && givenCoords == null)
{
@@ -1977,6 +1980,7 @@ namespace Damage_Calculator
this.playerPoint.PercentageX = newPointPosPixels.X * 100f / this.mapCanvas.ActualWidth;
this.playerPoint.PercentageY = newPointPosPixels.Y * 100f / this.mapCanvas.ActualHeight;
this.playerPoint.PercentageScale = circle.Width * 100f / this.mapCanvas.ActualWidth;
+ this.playerPoint.Z = null; // Initialise with null, just in case
this.playerPoint.Z = givenCoords == null ? this.currentMouseCoord.Z : givenCoords.Z;
if (this.currentHeightLayer >= 0 && givenCoords == null)
diff --git a/SteamShared/SteamShared/SteamShared/Models/MapPoint.cs b/SteamShared/SteamShared/SteamShared/Models/MapPoint.cs
index b6f5fc7..9ad2e2a 100644
--- a/SteamShared/SteamShared/SteamShared/Models/MapPoint.cs
+++ b/SteamShared/SteamShared/SteamShared/Models/MapPoint.cs
@@ -25,9 +25,9 @@ namespace SteamShared.Models
public double Y { get; set; }
///
- /// The in-game Z-coordinate.
+ /// The in-game Z-coordinate, if any.
///
- public double Z { get; set; }
+ public double? Z { get; set; }
public int AssociatedAreaID { get; set; } = -1;