From c449cd1bf9fd3eefd170806bfef19169c64f0372 Mon Sep 17 00:00:00 2001 From: Mathias Lui Date: Sat, 10 Dec 2022 00:27:23 +0100 Subject: [PATCH] Fix bomb prediction & Add netconport integration * Bomb distance was previously fetched like in CBaseEntity::BodyTarget, but was switched to CBasePlayer::BodyTarget, which adds an amount of randomness to the damage, the more above or below the bomb a player is, the more randomness * unitsDistanceMax will now keep the maximum distance the bomb calculates damage at, whereas unitsDistanceMin will have the minimum distance, generating a from-to value for damage * Add min and max to bomb damage in the UI * Added more summaries * Bomb and player stroke are now thinner * Fixed a random crash at startup when there were no NavAreas to loop over * Added the functionality to set the current in-game point to either of the two points in the program, -netconport is needed for that and automatically added, if not there * Added said netconport to the settings * Added SteamUser class * Added ability for VdfParser to find strings where quotes are escaped, since they were treated as normal quotes * Add function to get the steam user that most recently logged into steam --- .../DamageCalculator/DamageCalculator.csproj | 1 + .../DamageCalculator/MainWindow.xaml | 33 +- .../DamageCalculator/MainWindow.xaml.cs | 683 ++++++++++++++---- DamageCalculator/DamageCalculator/Settings.cs | 4 + .../DamageCalculator/ShowMessage.cs | 16 + .../DamageCalculator/wndSettings.xaml | 11 +- .../DamageCalculator/wndSettings.xaml.cs | 15 + .../SteamShared/SteamShared/CsgoHelper.cs | 61 +- .../SteamShared/CsgoSocketConnection.cs | 315 ++++++++ .../SteamShared/SteamShared/Globals.cs | 32 + .../SteamShared/Models/Settings.cs | 2 + .../SteamShared/Models/SteamUser.cs | 51 ++ .../SteamShared/SteamShared/SteamHelper.cs | 91 +++ .../SteamShared/SteamShared.csproj | 1 + .../SteamShared/ZatVdfParser/VdfFile.cs | 56 +- 15 files changed, 1232 insertions(+), 140 deletions(-) create mode 100644 DamageCalculator/DamageCalculator/ShowMessage.cs create mode 100644 SteamShared/SteamShared/SteamShared/CsgoSocketConnection.cs create mode 100644 SteamShared/SteamShared/SteamShared/Models/SteamUser.cs diff --git a/DamageCalculator/DamageCalculator/DamageCalculator.csproj b/DamageCalculator/DamageCalculator/DamageCalculator.csproj index 5fb23f2..9fd64ce 100644 --- a/DamageCalculator/DamageCalculator/DamageCalculator.csproj +++ b/DamageCalculator/DamageCalculator/DamageCalculator.csproj @@ -51,6 +51,7 @@ all + diff --git a/DamageCalculator/DamageCalculator/MainWindow.xaml b/DamageCalculator/DamageCalculator/MainWindow.xaml index 2105daf..e2e6f80 100644 --- a/DamageCalculator/DamageCalculator/MainWindow.xaml +++ b/DamageCalculator/DamageCalculator/MainWindow.xaml @@ -5,7 +5,7 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:Damage_Calculator" mc:Ignorable="d" - Title="CS:GO Damage Calculator" Height="566" Width="1030" MinHeight="700" MinWidth="1000" + Title="CS:GO Damage Calculator" Height="566" Width="1030" MinHeight="845" MinWidth="1000" Style="{DynamicResource CustomWindowStyle}" WindowStartupLocation="CenterScreen" Icon="27.ico" WindowState="Maximized" @@ -29,7 +29,7 @@ - + @@ -56,7 +56,7 @@ - + @@ -82,11 +82,23 @@ - + + + + + + + + + + + + + @@ -102,6 +114,19 @@ + + + +