Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
851e654
build: update assembly title
Variapolis Jan 19, 2023
6bbea2e
feat(ipc): make damage tracker use shared memory list correctly
Variapolis Jan 19, 2023
777f737
refactor(library): cleanup Process.cs
Variapolis Jan 19, 2023
b68e354
refactor: clean up files
Variapolis Jan 19, 2023
48e27c7
fix: add useless native to main function to warm up jit
Variapolis Jan 19, 2023
0769037
refactor(damage-tracker-lib): rename classes to reflect the use case
Variapolis Jan 19, 2023
0dc9064
feat(damage-tracker-lib): add events
Variapolis Jan 20, 2023
d795776
chore: delete Wrapper.cs
Variapolis Jan 20, 2023
8176d5e
fix(damage-tracker-lib): fix shared memory not being read properly
Variapolis Jan 20, 2023
a574c0d
fix(damage-tracker-lib): fix crash if dependent plugin loads before o…
Variapolis Jan 20, 2023
312d5b8
chore: add comments to DamageTrackerService.cs
Variapolis Jan 20, 2023
652b066
feat(damage-tracker): add check if ped is human
Variapolis Jan 22, 2023
e7a72e3
docs: add todo comments
Variapolis Jan 22, 2023
0327d60
refactor: clean up lookup dictionary and rename medical damage type t…
Variapolis Feb 7, 2023
46fcf71
feat(damage-info): add attacker handle to damage info struct
Variapolis Feb 7, 2023
ef89432
docs: add documentation comments
Variapolis Feb 7, 2023
4f88ef4
feat: add damage logging to DamageTrackerService.cs
Variapolis Feb 7, 2023
1a7cf6b
fix(damage-tracker): make armour damage tracked
Variapolis Feb 20, 2023
d9616b0
fix(damage-tracker): fix armour check changes ignoring all damage
Variapolis Feb 20, 2023
153aff0
feat: add version checking
Variapolis Feb 24, 2023
8424d58
feat: add version mismatch checking
Variapolis Feb 25, 2023
f12e1c1
fix: add notification for version check fail
Variapolis Feb 25, 2023
4c357b3
fix: check for mismatch even if web request fails.
Variapolis Feb 26, 2023
fb68d03
fix: fix damage coalescing
Variapolis Feb 27, 2023
61017ff
fix(damage-tracker-service): log when dts fiber is null and add optio…
Variapolis May 5, 2023
95c044d
feat(damage-tracker-service): add start and stop logging
Variapolis May 5, 2023
c86c1cf
fix(damage-tracker-service): fix crash for outdated plugins starting …
Variapolis May 5, 2023
ac1bb7f
refactor(damage-tracker-service): make damage logging more verbose
Variapolis May 5, 2023
061171b
feat(damage-tracker-service): add IsRunning property to DamageTracker…
Variapolis May 5, 2023
a9bddb5
build: update copyright
Variapolis May 14, 2023
aa07478
feat(hashes): update hashes
Variapolis May 16, 2023
bc96112
feat(damage-tracker): make tracker send unknown damage
Variapolis May 16, 2023
ce894fd
refactor(damage-tracker): make damage tracker use ped memory componen…
Variapolis May 19, 2023
4e374b4
build: bump version to 1.0.0
Variapolis May 19, 2023
bc83a6a
Create README.md
Variapolis May 19, 2023
d15daf4
Create License.txt
Variapolis May 22, 2023
3e00d78
Update License.txt
Variapolis May 22, 2023
55068bc
Update License.txt
Variapolis May 22, 2023
dbd64e9
Update README.md
Variapolis May 22, 2023
4868f0b
refactor(damage-tracker-service): split up run method in DamageTracke…
Variapolis May 24, 2023
4227d3c
refactor(damage-tracker-service): clean up DamageTrackerService.cs
Variapolis May 24, 2023
81fea5a
fix(damage-tracker-service): fix crash caused by invalid ped handle
Variapolis May 27, 2023
c85a54d
fix(damage-tracker-service): make entity exists check cast handle to …
Variapolis May 28, 2023
ad09a74
fix(damage-tracker-service): make DamageTrackerService warm up JIT.
Variapolis May 28, 2023
c16bbd3
feat: add damage hooking
Variapolis Aug 24, 2023
88f5a68
feat(damage-tracker-service): combine legacy tracking system with hoo…
Variapolis Apr 15, 2024
a578535
fix: make tear gas in gas category
Variapolis Apr 15, 2024
4f5e578
fix: make TryGetPedDamage return hook damage as true only if ped was …
Variapolis Apr 22, 2024
c86b372
feat(damage-tracker-lib): move functionality to new library project
Variapolis Jan 19, 2023
4a9e0ae
feat(ipc): remove pipe server functionality in place of shared memory
Variapolis Jan 19, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
413 changes: 404 additions & 9 deletions .gitignore

Large diffs are not rendered by default.

Binary file added .vs/DamageTrackerUtility/v16/.suo
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace DamageTrackingFramework.DamageInfo
namespace DamageTrackerLib.DamageInfo
{
public enum BodyRegion
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
using System;

namespace DamageTrackingFramework.DamageInfo
namespace DamageTrackerLib.DamageInfo
{
/// <summary>
/// Holds info on the Bone that was damaged on the Ped.
/// </summary>
[Serializable]
public struct BoneDamageInfo
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
namespace DamageTrackingFramework.DamageInfo
namespace DamageTrackerLib.DamageInfo
{
/// <summary>
/// Complete set of BoneIds. Should be cast-able to RagePluginHook BoneIds however, RPH has no "Root" bone which is 0.
/// </summary>
public enum BoneId : ushort
{
LeftThumb1 = 4089, // 0x0FF9
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace DamageTrackingFramework.DamageInfo
namespace DamageTrackerLib.DamageInfo
{
public enum DamageGroup
{
Expand All @@ -15,7 +15,7 @@ public enum DamageGroup
Environmental = 11,
Gas = 12,
WaterCannon = 13,
Medical = 14,
Drowning = 15
Bodily = 14,
Drowning = 15,
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// ReSharper disable InconsistentNaming
namespace DamageTrackingFramework.DamageInfo
namespace DamageTrackerLib.DamageInfo
{
public enum DamageType
{
Expand All @@ -20,7 +19,7 @@ public enum DamageType
Misc = 14,
NonDamaging = 15,
WaterCannon = 16,
Medical = 17,
Bodily = 17, // Bleeding, Exhaustion
Drowning = 18,
Animal = 19,
Vehicle = 20,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace DamageTrackingFramework.DamageInfo
namespace DamageTrackerLib.DamageInfo
{
public enum Limb
{
Expand Down
18 changes: 18 additions & 0 deletions DamageTrackerLib/DamageInfo/PedDamageInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System;

namespace DamageTrackerLib.DamageInfo
{
/// <summary>
/// Holds all info for a Ped's damage.
/// </summary>
[Serializable]
public struct PedDamageInfo
{
public uint PedHandle;
public uint AttackerPedHandle;
public int Damage;
public int ArmourDamage;
public WeaponDamageInfo WeaponInfo;
public BoneDamageInfo BoneInfo;
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
using System;

namespace DamageTrackingFramework.DamageInfo
namespace DamageTrackerLib.DamageInfo
{
/// <summary>
/// Holds info on the Weapon/Thing that damaged the Ped.
/// </summary>
[Serializable]
public struct WeaponDamageInfo
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// ReSharper disable InconsistentNaming
namespace DamageTrackingFramework.DamageInfo
namespace DamageTrackerLib.DamageInfo
{
/// <summary>
/// Complete set of Weapon Hashes.
/// </summary>
public enum WeaponHash : uint
{
Unknown = 0,
Expand Down Expand Up @@ -85,7 +87,7 @@ public enum WeaponHash : uint
Ray_Minigun = 3056410471,
Grenade = 2481070269,
BZGas = 2694266206,
Smoke_Grenade = 4256991824,
Tear_Gas = 4256991824,
Flare = 1233104067,
Molotov = 615608432,
Sticky_Bomb = 741814745,
Expand Down Expand Up @@ -232,5 +234,21 @@ public enum WeaponHash : uint
Vehicle_Volatol_Dual_MG = 1150790720,
Vehicle_Water_Cannon = 1741783703,
Vehicle_Helicopter_Rotors = 2971687502,

// 0.9.9
Military_Rifle = 0x9D1F17E6,
Heavy_Rifle = 0xC78D71B4,
Service_Carbine = 3520460075,
Precision_Rifle = 1853742572,
Combat_Shotgun = 94989220,
Compact_EMP_Launcher = 3676729658,
Railgun_XM3 = 4272043364,
Stun_Gun_MP = 1171102963,
Perico_Pistol = 1470379660,
WM29_Pistol = 465894841,
Navy_Revolver = 2441047180,
Ceramic_Pistol = 727643628,
Candy_Cane = 1703483498,
Custom = 694201337,
}
}
73 changes: 73 additions & 0 deletions DamageTrackerLib/DamageTrackerLib.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{8BA678B1-D73D-4B13-8D42-F6750285E52A}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>DamageTrackerLib</RootNamespace>
<AssemblyName>DamageTrackerLib</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<LangVersion>10</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
<Reference Include="RagePluginHook, Version=0.0.0.0, Culture=neutral, processorArchitecture=Amd64">
<HintPath>..\packages\RagePluginHook.1.98.0\lib\net472\RagePluginHook.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="DamageInfo\BodyRegion.cs" />
<Compile Include="DamageInfo\BoneDamageInfo.cs" />
<Compile Include="DamageInfo\BoneId.cs" />
<Compile Include="DamageInfo\DamageGroup.cs" />
<Compile Include="DamageInfo\DamageType.cs" />
<Compile Include="DamageInfo\Limb.cs" />
<Compile Include="DamageInfo\PedDamageInfo.cs" />
<Compile Include="DamageInfo\WeaponDamageInfo.cs" />
<Compile Include="DamageInfo\WeaponHash.cs" />
<Compile Include="DamageTrackerLookups.cs" />
<Compile Include="DamageTrackerService.cs" />
<Compile Include="HandleUtility.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\AssemblyVersion.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->

</Project>
Loading