Initial migration commit to .NET 7
Menu, sync and other stuff except resource system should be working. We're far from finished
This commit is contained in:
@ -6,7 +6,6 @@ using System.Reflection;
|
|||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Forms;
|
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
using RageCoop.Core;
|
using RageCoop.Core;
|
||||||
using static RageCoop.Client.Shared;
|
using static RageCoop.Client.Shared;
|
||||||
@ -141,7 +140,7 @@ namespace RageCoop.Client.Installer
|
|||||||
Dispatcher.BeginInvoke(new Action(() =>
|
Dispatcher.BeginInvoke(new Action(() =>
|
||||||
KeyDown += (s, e) =>
|
KeyDown += (s, e) =>
|
||||||
{
|
{
|
||||||
settings.MenuKey = (Keys)KeyInterop.VirtualKeyFromKey(e.Key);
|
settings.MenuKey = (GTA.Keys)KeyInterop.VirtualKeyFromKey(e.Key);
|
||||||
ae.Set();
|
ae.Set();
|
||||||
}));
|
}));
|
||||||
ae.WaitOne();
|
ae.WaitOne();
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
<NoAotCompile>true</NoAotCompile>
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<TargetFramework>net48</TargetFramework>
|
<TargetFramework>net7.0-windows</TargetFramework>
|
||||||
<UseWPF>true</UseWPF>
|
<UseWPF>true</UseWPF>
|
||||||
<UseWindowsForms>true</UseWindowsForms>
|
<UseWindowsForms>true</UseWindowsForms>
|
||||||
<AllowedReferenceRelatedFileExtensions>
|
<AllowedReferenceRelatedFileExtensions>
|
||||||
@ -10,7 +10,6 @@
|
|||||||
</AllowedReferenceRelatedFileExtensions>
|
</AllowedReferenceRelatedFileExtensions>
|
||||||
<Configurations>Debug;Release</Configurations>
|
<Configurations>Debug;Release</Configurations>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
|
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
|
||||||
<OutDir>..\..\bin\Debug\Client</OutDir>
|
<OutDir>..\..\bin\Debug\Client</OutDir>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
@ -21,17 +20,13 @@
|
|||||||
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
|
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
|
||||||
<OutDir>..\..\bin\Release\Client</OutDir>
|
<OutDir>..\..\bin\Release\Client</OutDir>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Loader\RageCoop.Client.Loader.csproj" />
|
|
||||||
<ProjectReference Include="..\Scripts\RageCoop.Client.csproj" />
|
<ProjectReference Include="..\Scripts\RageCoop.Client.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Resource Include="bg.png" />
|
<Resource Include="bg.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Update="Resource.Designer.cs">
|
<Compile Update="Resource.Designer.cs">
|
||||||
<DesignTime>True</DesignTime>
|
<DesignTime>True</DesignTime>
|
||||||
@ -39,19 +34,24 @@
|
|||||||
<DependentUpon>Resource.resx</DependentUpon>
|
<DependentUpon>Resource.resx</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<EmbeddedResource Update="Resource.resx">
|
<EmbeddedResource Update="Resource.resx">
|
||||||
<Generator>ResXFileCodeGenerator</Generator>
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
<LastGenOutput>Resource.Designer.cs</LastGenOutput>
|
<LastGenOutput>Resource.Designer.cs</LastGenOutput>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Costura.Fody" Version="5.7.0">
|
<PackageReference Include="Costura.Fody" Version="5.7.0">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>compile; runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers" Version="0.4.355802">
|
||||||
|
<PrivateAssets>all</PrivateAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="ScriptHookVDotNetCore">
|
||||||
|
<HintPath>..\..\libs\ScriptHookVDotNetCore.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
@ -1,27 +0,0 @@
|
|||||||
using System;
|
|
||||||
|
|
||||||
namespace GTA
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Wrapper that provides access to SHVDN's in-game console
|
|
||||||
/// </summary>
|
|
||||||
public class Console
|
|
||||||
{
|
|
||||||
private static SHVDN.Console console => (SHVDN.Console)AppDomain.CurrentDomain.GetData("Console");
|
|
||||||
|
|
||||||
public static void Warning(object format, params object[] objects)
|
|
||||||
{
|
|
||||||
console.PrintInfo("[~o~WARNING~w~] ", format.ToString(), objects);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void Error(object format, params object[] objects)
|
|
||||||
{
|
|
||||||
console.PrintError("[~r~ERROR~w~] ", format.ToString(), objects);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void Info(object format, params object[] objects)
|
|
||||||
{
|
|
||||||
console.PrintWarning("[~b~INFO~w~] ", format.ToString(), objects);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -29,7 +29,7 @@ namespace RageCoop.Client
|
|||||||
|
|
||||||
static Debug()
|
static Debug()
|
||||||
{
|
{
|
||||||
foreach (TimeStamp t in Enum.GetValues(typeof(TimeStamp))) TimeStamps.Add(t, 0);
|
foreach (TimeStamp t in Enum.GetValues<TimeStamp>()) TimeStamps.Add(t, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string Dump(this Dictionary<TimeStamp, long> d)
|
public static string Dump(this Dictionary<TimeStamp, long> d)
|
||||||
|
@ -5,8 +5,7 @@ using RageCoop.Core;
|
|||||||
|
|
||||||
namespace RageCoop.Client
|
namespace RageCoop.Client
|
||||||
{
|
{
|
||||||
[ScriptAttributes(Author = "RageCoop", NoDefaultInstance = false,
|
[ScriptAttributes(Author = "RageCoop", SupportURL = "https://github.com/RAGECOOP/RAGECOOP-V")]
|
||||||
SupportURL = "https://github.com/RAGECOOP/RAGECOOP-V")]
|
|
||||||
internal class DevTool : Script
|
internal class DevTool : Script
|
||||||
{
|
{
|
||||||
public static Vehicle ToMark;
|
public static Vehicle ToMark;
|
||||||
@ -14,14 +13,14 @@ namespace RageCoop.Client
|
|||||||
|
|
||||||
public DevTool()
|
public DevTool()
|
||||||
{
|
{
|
||||||
Util.StartUpCheck();
|
|
||||||
Instance = this;
|
Instance = this;
|
||||||
Tick += OnTick;
|
|
||||||
Pause();
|
Pause();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnTick(object sender, EventArgs e)
|
protected override void OnTick()
|
||||||
{
|
{
|
||||||
|
base.OnTick();
|
||||||
|
|
||||||
foreach (var p in World.GetAllPeds()) DrawWeaponBone(p);
|
foreach (var p in World.GetAllPeds()) DrawWeaponBone(p);
|
||||||
if (ToMark == null) return;
|
if (ToMark == null) return;
|
||||||
|
|
||||||
|
79
Client/Scripts/EntryPoint.cs
Normal file
79
Client/Scripts/EntryPoint.cs
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
using System;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
using GTA;
|
||||||
|
using RageCoop.Client;
|
||||||
|
using SHVDN;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Template for generating AOT entrypoints
|
||||||
|
/// </summary>
|
||||||
|
public static class EntryPoint
|
||||||
|
{
|
||||||
|
private static void ModuleSetup()
|
||||||
|
{
|
||||||
|
Script script = new Main();
|
||||||
|
Core.RegisterScript(script);
|
||||||
|
script = new WorldThread();
|
||||||
|
Core.RegisterScript(script);
|
||||||
|
script = new DevTool();
|
||||||
|
Core.RegisterScript(script);
|
||||||
|
}
|
||||||
|
|
||||||
|
[UnmanagedCallersOnly(EntryPoint = "OnInit")]
|
||||||
|
public unsafe static void OnInit(IntPtr module)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Core.OnInit(module);
|
||||||
|
ModuleSetup();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
PInvoke.MessageBoxA((IntPtr)0, ex.ToString(), "Module initialization error", 0u);
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Called prior to module unload
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="module"></param>
|
||||||
|
[UnmanagedCallersOnly(EntryPoint = "OnUnload")]
|
||||||
|
public static void OnUnload(IntPtr module)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Core.OnUnload(module);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Logger.Error((ReadOnlySpan<char>)("Module unload error: " + ex.ToString()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[UnmanagedCallersOnly(EntryPoint = "OnKeyboard")]
|
||||||
|
public unsafe static void OnKeyboard(int key, ushort repeats, bool scanCode, bool isExtended, bool isWithAlt, bool wasDownBefore, bool isUpNow)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Core.DoKeyEvent(key, !isUpNow, (PInvoke.GetAsyncKeyState(17) & 0x8000) != 0, (PInvoke.GetAsyncKeyState(16) & 0x8000) != 0, isWithAlt);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Logger.Error((ReadOnlySpan<char>)("Keyboard event error: " + ex.ToString()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[UnmanagedCallersOnly(EntryPoint = "OnTick")]
|
||||||
|
public static void OnTick(IntPtr currentFiber)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Core.DoTick(currentFiber);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Logger.Error((ReadOnlySpan<char>)("Tick error: " + ex.ToString()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -3,7 +3,6 @@ using System.Collections.Concurrent;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using DXHook.Hook.Common;
|
|
||||||
using GTA;
|
using GTA;
|
||||||
using GTA.Native;
|
using GTA.Native;
|
||||||
using RageCoop.Client.CefHost;
|
using RageCoop.Client.CefHost;
|
||||||
|
Binary file not shown.
@ -4,7 +4,7 @@ using System.Collections.Generic;
|
|||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Windows.Forms;
|
using System.Threading;
|
||||||
using GTA;
|
using GTA;
|
||||||
using GTA.Math;
|
using GTA.Math;
|
||||||
using GTA.Native;
|
using GTA.Native;
|
||||||
@ -12,53 +12,40 @@ using GTA.UI;
|
|||||||
using LemonUI.Elements;
|
using LemonUI.Elements;
|
||||||
using LemonUI.Menus;
|
using LemonUI.Menus;
|
||||||
using Lidgren.Network;
|
using Lidgren.Network;
|
||||||
using Newtonsoft.Json.Linq;
|
|
||||||
using RageCoop.Client.GUI;
|
|
||||||
using RageCoop.Client.Menus;
|
using RageCoop.Client.Menus;
|
||||||
using RageCoop.Client.Scripting;
|
using RageCoop.Client.Scripting;
|
||||||
using RageCoop.Core;
|
using RageCoop.Core;
|
||||||
using static RageCoop.Client.Shared;
|
|
||||||
using Console = GTA.Console;
|
|
||||||
using Control = GTA.Control;
|
using Control = GTA.Control;
|
||||||
using Screen = System.Windows.Forms.Screen;
|
|
||||||
|
|
||||||
namespace RageCoop.Client
|
namespace RageCoop.Client
|
||||||
{
|
{
|
||||||
/// <summary>
|
[ScriptAttributes(Author = "RageCoop", SupportURL = "https://github.com/RAGECOOP/RAGECOOP-V", NoScriptThread = true)]
|
||||||
/// Don't use it!
|
|
||||||
/// </summary>
|
|
||||||
[ScriptAttributes(Author = "RageCoop", NoScriptThread = true,
|
|
||||||
SupportURL = "https://github.com/RAGECOOP/RAGECOOP-V")]
|
|
||||||
internal class Main : Script
|
internal class Main : Script
|
||||||
{
|
{
|
||||||
private static bool _gameLoaded = false;
|
|
||||||
internal static Version Version = typeof(Main).Assembly.GetName().Version;
|
internal static Version Version = typeof(Main).Assembly.GetName().Version;
|
||||||
|
|
||||||
internal static int LocalPlayerID = 0;
|
internal static int LocalPlayerID = 0;
|
||||||
|
|
||||||
internal static RelationshipGroup SyncedPedsGroup;
|
internal static RelationshipGroup SyncedPedsGroup;
|
||||||
|
|
||||||
internal static new Settings Settings = null;
|
internal static Settings Settings = null;
|
||||||
internal static Chat MainChat = null;
|
internal static Chat MainChat = null;
|
||||||
internal static Stopwatch Counter = new Stopwatch();
|
internal static Stopwatch Counter = new Stopwatch();
|
||||||
internal static Logger Logger = null;
|
internal static Logger Logger = null;
|
||||||
internal static ulong Ticked = 0;
|
internal static ulong Ticked = 0;
|
||||||
internal static Vector3 PlayerPosition;
|
internal static Vector3 PlayerPosition;
|
||||||
internal static Resources Resources = null;
|
internal static Resources Resources = null;
|
||||||
private static readonly ConcurrentQueue<Action> TaskQueue = new ConcurrentQueue<Action>();
|
|
||||||
|
|
||||||
public static Ped P;
|
public static Ped P;
|
||||||
public static float FPS;
|
public static float FPS;
|
||||||
private static bool _lastDead;
|
private static bool _lastDead;
|
||||||
public static bool CefRunning;
|
public static bool CefRunning;
|
||||||
|
public static bool IsUnloading { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Don't use it!
|
/// Don't use it!
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Main()
|
public Main()
|
||||||
{
|
{
|
||||||
Util.StartUpCheck();
|
|
||||||
|
|
||||||
Directory.CreateDirectory(DataPath);
|
Directory.CreateDirectory(DataPath);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -87,138 +74,86 @@ namespace RageCoop.Client
|
|||||||
#if DEBUG
|
#if DEBUG
|
||||||
// case LogLevel.Trace:
|
// case LogLevel.Trace:
|
||||||
case LogLevel.Debug:
|
case LogLevel.Debug:
|
||||||
Console.Info(line.Message);
|
Console.PrintInfo(line.Message);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
case LogLevel.Info:
|
case LogLevel.Info:
|
||||||
Console.Info(line.Message);
|
Console.PrintInfo(line.Message);
|
||||||
break;
|
break;
|
||||||
case LogLevel.Warning:
|
case LogLevel.Warning:
|
||||||
Console.Warning(line.Message);
|
Console.PrintWarning(line.Message);
|
||||||
break;
|
break;
|
||||||
case LogLevel.Error:
|
case LogLevel.Error:
|
||||||
Console.Error(line.Message);
|
Console.PrintError(line.Message);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
Resources = new Resources();
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnAborted(AbortedEventArgs e)
|
||||||
|
{
|
||||||
|
base.OnAborted(e);
|
||||||
|
try
|
||||||
|
{
|
||||||
|
IsUnloading = e.IsUnloading;
|
||||||
|
CleanUp("Abort");
|
||||||
|
WorldThread.DoQueuedActions();
|
||||||
|
if (IsUnloading)
|
||||||
|
{
|
||||||
|
ThreadManager.OnUnload();
|
||||||
|
Logger.Dispose();
|
||||||
|
Networking.Peer?.Shutdown("bye");
|
||||||
|
Thread.Sleep(1000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Logger.Error(ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
protected override void OnStart()
|
||||||
|
{
|
||||||
|
base.OnStart();
|
||||||
|
|
||||||
if (Game.Version < GameVersion.v1_0_1290_1_Steam)
|
if (Game.Version < GameVersion.v1_0_1290_1_Steam)
|
||||||
{
|
{
|
||||||
Tick += (object sender, EventArgs e) =>
|
throw new NotSupportedException("Please update your GTA5 to v1.0.1290 or newer!");
|
||||||
{
|
|
||||||
if (Game.IsLoading)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!_gameLoaded)
|
Resources = new Resources();
|
||||||
{
|
|
||||||
Notification.Show("~r~Please update your GTA5 to v1.0.1290 or newer!", true);
|
|
||||||
_gameLoaded = true;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Logger.Info(
|
Logger.Info(
|
||||||
$"Starting {typeof(Main).FullName}, domain: {AppDomain.CurrentDomain.Id} {AppDomain.CurrentDomain.FriendlyName}");
|
$"Main script initialized");
|
||||||
|
|
||||||
BaseScript.OnStart();
|
BaseScript.OnStart();
|
||||||
SyncedPedsGroup = World.AddRelationshipGroup("SYNCPED");
|
SyncedPedsGroup = World.AddRelationshipGroup("SYNCPED");
|
||||||
Game.Player.Character.RelationshipGroup.SetRelationshipBetweenGroups(SyncedPedsGroup, Relationship.Neutral,
|
Game.Player.Character.RelationshipGroup.SetRelationshipBetweenGroups(SyncedPedsGroup, Relationship.Neutral,
|
||||||
true);
|
true);
|
||||||
#if !NON_INTERACTIVE
|
|
||||||
#endif
|
|
||||||
MainChat = new Chat();
|
MainChat = new Chat();
|
||||||
Aborted += OnAborted;
|
|
||||||
Tick += OnTick;
|
|
||||||
KeyDown += OnKeyDown;
|
|
||||||
KeyUp += OnKeyUp;
|
|
||||||
|
|
||||||
Util.NativeMemory();
|
Util.NativeMemory();
|
||||||
Counter.Restart();
|
Counter.Restart();
|
||||||
}
|
|
||||||
|
|
||||||
private static void OnAborted(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
WorldThread.Instance?.Abort();
|
|
||||||
DevTool.Instance?.Abort();
|
|
||||||
CleanUp("Abort");
|
|
||||||
WorldThread.DoQueuedActions();
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
protected override void OnTick()
|
||||||
{
|
|
||||||
Logger.Error(ex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Queue an action to main thread and wait for execution to complete, must be called from script thread.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="task"></param>
|
|
||||||
internal static void QueueToMainThreadAndWait(Action task)
|
|
||||||
{
|
|
||||||
Exception e = null;
|
|
||||||
TaskQueue.Enqueue(() =>
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
task();
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
e = ex;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
Yield();
|
|
||||||
if (e != null)
|
|
||||||
{
|
|
||||||
throw e;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void OnTick(object sender, EventArgs e)
|
|
||||||
{
|
{
|
||||||
|
base.OnTick();
|
||||||
P = Game.Player.Character;
|
P = Game.Player.Character;
|
||||||
PlayerPosition = P.ReadPosition();
|
PlayerPosition = P.ReadPosition();
|
||||||
FPS = Game.FPS;
|
FPS = Game.FPS;
|
||||||
if (Game.IsLoading)
|
#if CEF
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!_gameLoaded && (_gameLoaded = true))
|
|
||||||
{
|
|
||||||
#if !NON_INTERACTIVE
|
|
||||||
Notification.Show(NotificationIcon.AllPlayersConf, "RAGECOOP", "Welcome!",
|
|
||||||
$"Press ~g~{Settings.MenuKey}~s~ to open the menu.");
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
while (TaskQueue.TryDequeue(out var task))
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
task.Invoke();
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
Logger.Error(ex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (CefRunning)
|
if (CefRunning)
|
||||||
{
|
{
|
||||||
CefManager.Tick();
|
CefManager.Tick();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if (!Networking.IsOnServer)
|
if (!Networking.IsOnServer)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
EntityPool.DoSync();
|
EntityPool.DoSync();
|
||||||
@ -228,6 +163,7 @@ namespace RageCoop.Client
|
|||||||
Logger.Error(ex);
|
Logger.Error(ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (Game.TimeScale != 1.0f)
|
if (Game.TimeScale != 1.0f)
|
||||||
{
|
{
|
||||||
Game.TimeScale = 1;
|
Game.TimeScale = 1;
|
||||||
@ -235,13 +171,13 @@ namespace RageCoop.Client
|
|||||||
|
|
||||||
if (Networking.ShowNetworkInfo)
|
if (Networking.ShowNetworkInfo)
|
||||||
{
|
{
|
||||||
new ScaledText(new PointF(Screen.PrimaryScreen.Bounds.Width / 2, 0),
|
new ScaledText(new PointF(200, 0),
|
||||||
$"L: {Networking.Latency * 1000:N0}ms", 0.5f)
|
$"L: {Networking.Latency * 1000:N0}ms", 0.5f)
|
||||||
{ Alignment = Alignment.Center }.Draw();
|
{ Alignment = Alignment.Center }.Draw();
|
||||||
new ScaledText(new PointF(Screen.PrimaryScreen.Bounds.Width / 2, 30),
|
new ScaledText(new PointF(200, 30),
|
||||||
$"R: {NetUtility.ToHumanReadable(Statistics.BytesDownPerSecond)}/s", 0.5f)
|
$"R: {NetUtility.ToHumanReadable(Statistics.BytesDownPerSecond)}/s", 0.5f)
|
||||||
{ Alignment = Alignment.Center }.Draw();
|
{ Alignment = Alignment.Center }.Draw();
|
||||||
new ScaledText(new PointF(Screen.PrimaryScreen.Bounds.Width / 2, 60),
|
new ScaledText(new PointF(200, 60),
|
||||||
$"S: {NetUtility.ToHumanReadable(Statistics.BytesUpPerSecond)}/s", 0.5f)
|
$"S: {NetUtility.ToHumanReadable(Statistics.BytesUpPerSecond)}/s", 0.5f)
|
||||||
{ Alignment = Alignment.Center }.Draw();
|
{ Alignment = Alignment.Center }.Draw();
|
||||||
}
|
}
|
||||||
@ -250,13 +186,13 @@ namespace RageCoop.Client
|
|||||||
PlayerList.Tick();
|
PlayerList.Tick();
|
||||||
if (!API.Config.EnableAutoRespawn)
|
if (!API.Config.EnableAutoRespawn)
|
||||||
{
|
{
|
||||||
Function.Call(Hash.PAUSE_DEATH_ARREST_RESTART, true);
|
Call(PAUSE_DEATH_ARREST_RESTART, true);
|
||||||
Function.Call(Hash.IGNORE_NEXT_RESTART, true);
|
Call(IGNORE_NEXT_RESTART, true);
|
||||||
Function.Call(Hash.FORCE_GAME_STATE_PLAYING);
|
Call(FORCE_GAME_STATE_PLAYING);
|
||||||
Function.Call(Hash.TERMINATE_ALL_SCRIPTS_WITH_THIS_NAME, "respawn_controller");
|
Call(TERMINATE_ALL_SCRIPTS_WITH_THIS_NAME, "respawn_controller");
|
||||||
if (P.IsDead)
|
if (P.IsDead)
|
||||||
{
|
{
|
||||||
Function.Call(Hash.SET_FADE_OUT_AFTER_DEATH, false);
|
Call(SET_FADE_OUT_AFTER_DEATH, false);
|
||||||
|
|
||||||
if (P.Health != 1)
|
if (P.Health != 1)
|
||||||
{
|
{
|
||||||
@ -266,11 +202,11 @@ namespace RageCoop.Client
|
|||||||
API.Events.InvokePlayerDied();
|
API.Events.InvokePlayerDied();
|
||||||
}
|
}
|
||||||
|
|
||||||
GTA.UI.Screen.StopEffects();
|
Screen.StopEffects();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Function.Call(Hash.DISPLAY_HUD, true);
|
Call(DISPLAY_HUD, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (P.IsDead && !_lastDead)
|
else if (P.IsDead && !_lastDead)
|
||||||
@ -282,27 +218,32 @@ namespace RageCoop.Client
|
|||||||
Ticked++;
|
Ticked++;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnKeyUp(object sender, KeyEventArgs e)
|
protected override void OnKeyUp(GTA.KeyEventArgs e)
|
||||||
{
|
{
|
||||||
|
base.OnKeyUp(e);
|
||||||
|
#if CEF
|
||||||
if (CefRunning)
|
if (CefRunning)
|
||||||
{
|
{
|
||||||
CefManager.KeyUp(e.KeyCode);
|
CefManager.KeyUp(e.KeyCode);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void OnKeyDown(object sender, KeyEventArgs e)
|
protected unsafe override void OnKeyDown(KeyEventArgs e)
|
||||||
{
|
{
|
||||||
|
base.OnKeyDown(e);
|
||||||
if (MainChat.Focused)
|
if (MainChat.Focused)
|
||||||
{
|
{
|
||||||
MainChat.OnKeyDown(e.KeyCode);
|
MainChat.OnKeyDown(e.KeyCode);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if CEF
|
||||||
if (CefRunning)
|
if (CefRunning)
|
||||||
{
|
{
|
||||||
CefManager.KeyDown(e.KeyCode);
|
CefManager.KeyDown(e.KeyCode);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if (Networking.IsOnServer)
|
if (Networking.IsOnServer)
|
||||||
{
|
{
|
||||||
if (Voice.WasInitialized())
|
if (Voice.WasInitialized())
|
||||||
@ -322,15 +263,15 @@ namespace RageCoop.Client
|
|||||||
|
|
||||||
if (Game.IsControlPressed(Control.FrontendPause))
|
if (Game.IsControlPressed(Control.FrontendPause))
|
||||||
{
|
{
|
||||||
Function.Call(Hash.ACTIVATE_FRONTEND_MENU,
|
Call(ACTIVATE_FRONTEND_MENU,
|
||||||
Function.Call<int>(Hash.GET_HASH_KEY, "FE_MENU_VERSION_SP_PAUSE"), false, 0);
|
Call<int>(GET_HASH_KEY, "FE_MENU_VERSION_SP_PAUSE"), false, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Game.IsControlPressed(Control.FrontendPauseAlternate) && Settings.DisableAlternatePause)
|
if (Game.IsControlPressed(Control.FrontendPauseAlternate) && Settings.DisableAlternatePause)
|
||||||
{
|
{
|
||||||
Function.Call(Hash.ACTIVATE_FRONTEND_MENU,
|
Call(ACTIVATE_FRONTEND_MENU,
|
||||||
Function.Call<int>(Hash.GET_HASH_KEY, "FE_MENU_VERSION_SP_PAUSE"), false, 0);
|
Call<int>(GET_HASH_KEY, "FE_MENU_VERSION_SP_PAUSE"), false, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -423,7 +364,7 @@ namespace RageCoop.Client
|
|||||||
API.QueueAction(() =>
|
API.QueueAction(() =>
|
||||||
{
|
{
|
||||||
WorldThread.Traffic(!Settings.DisableTraffic);
|
WorldThread.Traffic(!Settings.DisableTraffic);
|
||||||
Function.Call(Hash.SET_ENABLE_VEHICLE_SLIPSTREAMING, true);
|
Call(SET_ENABLE_VEHICLE_SLIPSTREAMING, true);
|
||||||
CoopMenu.ConnectedMenuSetting();
|
CoopMenu.ConnectedMenuSetting();
|
||||||
MainChat.Init();
|
MainChat.Init();
|
||||||
Notification.Show("~g~Connected!");
|
Notification.Show("~g~Connected!");
|
||||||
@ -451,23 +392,22 @@ namespace RageCoop.Client
|
|||||||
MainChat.Clear();
|
MainChat.Clear();
|
||||||
EntityPool.Cleanup();
|
EntityPool.Cleanup();
|
||||||
WorldThread.Traffic(true);
|
WorldThread.Traffic(true);
|
||||||
Function.Call(Hash.SET_ENABLE_VEHICLE_SLIPSTREAMING, false);
|
Call(SET_ENABLE_VEHICLE_SLIPSTREAMING, false);
|
||||||
CoopMenu.DisconnectedMenuSetting();
|
CoopMenu.DisconnectedMenuSetting();
|
||||||
LocalPlayerID = default;
|
LocalPlayerID = default;
|
||||||
Resources.Unload();
|
Resources.Unload();
|
||||||
});
|
});
|
||||||
Memory.RestorePatches();
|
Memory.RestorePatches();
|
||||||
|
#if CEF
|
||||||
if (CefRunning)
|
if (CefRunning)
|
||||||
{
|
{
|
||||||
CefManager.CleanUp();
|
CefManager.CleanUp();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
HookManager.CleanUp();
|
|
||||||
DownloadManager.Cleanup();
|
DownloadManager.Cleanup();
|
||||||
Voice.ClearAll();
|
Voice.ClearAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !NON_INTERACTIVE
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -95,9 +95,9 @@ namespace RageCoop.Client.Menus
|
|||||||
scaleform.CallFunction("CREATE_CONTAINER");
|
scaleform.CallFunction("CREATE_CONTAINER");
|
||||||
|
|
||||||
scaleform.CallFunction("SET_DATA_SLOT", 0,
|
scaleform.CallFunction("SET_DATA_SLOT", 0,
|
||||||
Function.Call<string>((Hash)0x0499D7B09FC9B407, 2, (int)Control.FrontendAccept, 0), "Continue");
|
Call<string>((Hash)0x0499D7B09FC9B407, 2, (int)Control.FrontendAccept, 0), "Continue");
|
||||||
scaleform.CallFunction("SET_DATA_SLOT", 1,
|
scaleform.CallFunction("SET_DATA_SLOT", 1,
|
||||||
Function.Call<string>((Hash)0x0499D7B09FC9B407, 2, (int)Control.FrontendCancel, 0), "Cancel");
|
Call<string>((Hash)0x0499D7B09FC9B407, 2, (int)Control.FrontendCancel, 0), "Cancel");
|
||||||
scaleform.CallFunction("DRAW_INSTRUCTIONAL_BUTTONS", -1);
|
scaleform.CallFunction("DRAW_INSTRUCTIONAL_BUTTONS", -1);
|
||||||
scaleform.Render2D();
|
scaleform.Render2D();
|
||||||
if (Game.IsControlJustPressed(Control.FrontendAccept))
|
if (Game.IsControlJustPressed(Control.FrontendAccept))
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using GTA;
|
|
||||||
using GTA.UI;
|
using GTA.UI;
|
||||||
using LemonUI.Menus;
|
using LemonUI.Menus;
|
||||||
using RageCoop.Client.GUI;
|
|
||||||
using RageCoop.Client.Loader;
|
|
||||||
|
|
||||||
namespace RageCoop.Client
|
namespace RageCoop.Client
|
||||||
{
|
{
|
||||||
@ -22,8 +19,6 @@ namespace RageCoop.Client
|
|||||||
Alignment = Main.Settings.FlipMenu ? Alignment.Right : Alignment.Left
|
Alignment = Main.Settings.FlipMenu ? Alignment.Right : Alignment.Left
|
||||||
};
|
};
|
||||||
|
|
||||||
public static NativeItem ReloadItem = new NativeItem("Reload", "Reload RAGECOOP and associated scripts");
|
|
||||||
|
|
||||||
public static NativeItem SimulatedLatencyItem =
|
public static NativeItem SimulatedLatencyItem =
|
||||||
new NativeItem("Simulated network latency", "Simulated network latency in ms (one way)", "0");
|
new NativeItem("Simulated network latency", "Simulated network latency in ms (one way)", "0");
|
||||||
|
|
||||||
@ -33,14 +28,6 @@ namespace RageCoop.Client
|
|||||||
private static readonly NativeCheckboxItem ShowNetworkInfoItem =
|
private static readonly NativeCheckboxItem ShowNetworkInfoItem =
|
||||||
new NativeCheckboxItem("Show Network Info", Networking.ShowNetworkInfo);
|
new NativeCheckboxItem("Show Network Info", Networking.ShowNetworkInfo);
|
||||||
|
|
||||||
private static readonly NativeCheckboxItem DxHookTest =
|
|
||||||
new NativeCheckboxItem("Enable D3D11 hook", false);
|
|
||||||
|
|
||||||
private static readonly NativeCheckboxItem CefTest =
|
|
||||||
new NativeCheckboxItem("Test CEF overlay", false);
|
|
||||||
|
|
||||||
private static CefClient _testCef;
|
|
||||||
|
|
||||||
static DebugMenu()
|
static DebugMenu()
|
||||||
{
|
{
|
||||||
Menu.Banner.Color = Color.FromArgb(225, 0, 0, 0);
|
Menu.Banner.Color = Color.FromArgb(225, 0, 0, 0);
|
||||||
@ -77,49 +64,10 @@ namespace RageCoop.Client
|
|||||||
Main.Settings.ShowEntityOwnerName = ShowOwnerItem.Checked;
|
Main.Settings.ShowEntityOwnerName = ShowOwnerItem.Checked;
|
||||||
Util.SaveSettings();
|
Util.SaveSettings();
|
||||||
};
|
};
|
||||||
DxHookTest.CheckboxChanged += Hook;
|
|
||||||
CefTest.CheckboxChanged += CefTestChange;
|
|
||||||
;
|
|
||||||
ReloadItem.Activated += ReloadDomain;
|
|
||||||
Menu.Add(SimulatedLatencyItem);
|
Menu.Add(SimulatedLatencyItem);
|
||||||
Menu.Add(ShowNetworkInfoItem);
|
Menu.Add(ShowNetworkInfoItem);
|
||||||
Menu.Add(ShowOwnerItem);
|
Menu.Add(ShowOwnerItem);
|
||||||
Menu.Add(ReloadItem);
|
|
||||||
Menu.AddSubMenu(DiagnosticMenu);
|
Menu.AddSubMenu(DiagnosticMenu);
|
||||||
Menu.Add(DxHookTest);
|
|
||||||
Menu.Add(CefTest);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void CefTestChange(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
if (CefTest.Checked)
|
|
||||||
{
|
|
||||||
_testCef = CefManager.CreateClient(new Size(640, 480));
|
|
||||||
_testCef.Scale = 0.8f;
|
|
||||||
_testCef.Opacity = 128;
|
|
||||||
Script.Wait(2000);
|
|
||||||
_testCef.Controller.LoadUrl("https://ragecoop.online/");
|
|
||||||
CefManager.ActiveClient = _testCef;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
CefManager.DestroyClient(_testCef);
|
|
||||||
}
|
|
||||||
|
|
||||||
DxHookTest.Checked = HookManager.Hooked;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void Hook(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
if (DxHookTest.Checked)
|
|
||||||
HookManager.Initialize();
|
|
||||||
else
|
|
||||||
HookManager.CleanUp();
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void ReloadDomain(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
LoaderContext.RequestUnload();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -7,8 +7,8 @@ using GTA.UI;
|
|||||||
using LemonUI.Menus;
|
using LemonUI.Menus;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using RageCoop.Core;
|
using RageCoop.Core;
|
||||||
using static RageCoop.Client.Shared;
|
|
||||||
using Console = GTA.Console;
|
|
||||||
|
|
||||||
namespace RageCoop.Client
|
namespace RageCoop.Client
|
||||||
{
|
{
|
||||||
@ -40,9 +40,9 @@ namespace RageCoop.Client
|
|||||||
var anims = JsonConvert.DeserializeObject<AnimDic[]>(File.ReadAllText(AnimationsDataPath));
|
var anims = JsonConvert.DeserializeObject<AnimDic[]>(File.ReadAllText(AnimationsDataPath));
|
||||||
foreach (var anim in anims)
|
foreach (var anim in anims)
|
||||||
foreach (var a in anim.Animations)
|
foreach (var a in anim.Animations)
|
||||||
if (Function.Call<bool>(Hash.IS_ENTITY_PLAYING_ANIM, Main.P, anim.DictionaryName, a, 3))
|
if (Call<bool>(IS_ENTITY_PLAYING_ANIM, Main.P, anim.DictionaryName, a, 3))
|
||||||
{
|
{
|
||||||
Console.Info(anim.DictionaryName + " : " + a);
|
Console.PrintInfo(anim.DictionaryName + " : " + a);
|
||||||
Notification.Show(anim.DictionaryName + " : " + a);
|
Notification.Show(anim.DictionaryName + " : " + a);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
using System.Net.Http;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using GTA.UI;
|
using GTA.UI;
|
||||||
using LemonUI.Menus;
|
using LemonUI.Menus;
|
||||||
@ -41,8 +42,7 @@ namespace RageCoop.Client.Menus
|
|||||||
Menu.Add(ResultItem = new NativeItem("Loading..."));
|
Menu.Add(ResultItem = new NativeItem("Loading..."));
|
||||||
|
|
||||||
// Prevent freezing
|
// Prevent freezing
|
||||||
GetServersThread = new Thread(() => GetAllServers());
|
GetServersThread = ThreadManager.CreateThread(() => GetAllServers(),"GetServers");
|
||||||
GetServersThread.Start();
|
|
||||||
};
|
};
|
||||||
Menu.Closing += (object sender, CancelEventArgs e) => { CleanUpList(); };
|
Menu.Closing += (object sender, CancelEventArgs e) => { CleanUpList(); };
|
||||||
}
|
}
|
||||||
@ -57,7 +57,9 @@ namespace RageCoop.Client.Menus
|
|||||||
{
|
{
|
||||||
List<ServerInfo> serverList = null;
|
List<ServerInfo> serverList = null;
|
||||||
var realUrl = Main.Settings.MasterServer;
|
var realUrl = Main.Settings.MasterServer;
|
||||||
serverList = JsonConvert.DeserializeObject<List<ServerInfo>>(DownloadString(realUrl));
|
serverList = null;
|
||||||
|
try { serverList = JsonConvert.DeserializeObject<List<ServerInfo>>(DownloadString(realUrl)); }
|
||||||
|
catch (Exception ex) { Main.Logger.Error(ex); }
|
||||||
|
|
||||||
// Need to be processed in main thread
|
// Need to be processed in main thread
|
||||||
API.QueueAction(() =>
|
API.QueueAction(() =>
|
||||||
@ -130,8 +132,8 @@ namespace RageCoop.Client.Menus
|
|||||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls13 | SecurityProtocolType.Tls12;
|
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls13 | SecurityProtocolType.Tls12;
|
||||||
ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };
|
ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };
|
||||||
|
|
||||||
WebClient client = new WebClient();
|
var client = new HttpClient();
|
||||||
return client.DownloadString(url);
|
return client.GetStringAsync(url).GetAwaiter().GetResult();
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Windows.Forms;
|
|
||||||
using GTA;
|
using GTA;
|
||||||
using GTA.UI;
|
using GTA.UI;
|
||||||
using LemonUI.Menus;
|
using LemonUI.Menus;
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Windows.Forms;
|
|
||||||
using GTA;
|
using GTA;
|
||||||
using GTA.Native;
|
using GTA.Native;
|
||||||
|
|
||||||
@ -74,7 +73,7 @@ namespace RageCoop.Client
|
|||||||
|
|
||||||
if (!CurrentFocused) return;
|
if (!CurrentFocused) return;
|
||||||
|
|
||||||
Function.Call(Hash.DISABLE_ALL_CONTROL_ACTIONS, 0);
|
Call(DISABLE_ALL_CONTROL_ACTIONS, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddMessage(string sender, string msg)
|
public void AddMessage(string sender, string msg)
|
||||||
@ -132,6 +131,9 @@ namespace RageCoop.Client
|
|||||||
StringBuilder receivingBuffer,
|
StringBuilder receivingBuffer,
|
||||||
int bufferSize, uint flags, IntPtr kblayout);
|
int bufferSize, uint flags, IntPtr kblayout);
|
||||||
|
|
||||||
|
[DllImport("user32.dll")]
|
||||||
|
static extern IntPtr GetKeyboardLayout(uint idThread);
|
||||||
|
|
||||||
public static string GetCharFromKey(Keys key, bool shift, bool altGr)
|
public static string GetCharFromKey(Keys key, bool shift, bool altGr)
|
||||||
{
|
{
|
||||||
var buf = new StringBuilder(256);
|
var buf = new StringBuilder(256);
|
||||||
@ -145,7 +147,7 @@ namespace RageCoop.Client
|
|||||||
keyboardState[(int)Keys.Menu] = 0xff;
|
keyboardState[(int)Keys.Menu] = 0xff;
|
||||||
}
|
}
|
||||||
|
|
||||||
ToUnicodeEx((uint)key, 0, keyboardState, buf, 256, 0, InputLanguage.CurrentInputLanguage.Handle);
|
ToUnicodeEx((uint)key, 0, keyboardState, buf, 256, 0, GetKeyboardLayout(0));
|
||||||
return buf.ToString();
|
return buf.ToString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -95,7 +95,7 @@ namespace RageCoop.Client
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Task.Run(() =>
|
ThreadManager.CreateThread(() =>
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -153,7 +153,7 @@ namespace RageCoop.Client
|
|||||||
}
|
}
|
||||||
|
|
||||||
IsConnecting = false;
|
IsConnecting = false;
|
||||||
});
|
},"Connect");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ namespace RageCoop.Client
|
|||||||
p.Clothes = ped.GetPedClothes();
|
p.Clothes = ped.GetPedClothes();
|
||||||
p.ModelHash = ped.Model.Hash;
|
p.ModelHash = ped.Model.Hash;
|
||||||
p.WeaponComponents = ped.Weapons.Current.GetWeaponComponents();
|
p.WeaponComponents = ped.Weapons.Current.GetWeaponComponents();
|
||||||
p.WeaponTint = (byte)Function.Call<int>(Hash.GET_PED_WEAPON_TINT_INDEX, ped, ped.Weapons.Current.Hash);
|
p.WeaponTint = (byte)Call<int>(GET_PED_WEAPON_TINT_INDEX, ped, ped.Weapons.Current.Hash);
|
||||||
|
|
||||||
Blip b;
|
Blip b;
|
||||||
if (sp.IsPlayer)
|
if (sp.IsPlayer)
|
||||||
@ -122,7 +122,7 @@ namespace RageCoop.Client
|
|||||||
byte secondaryColor = 0;
|
byte secondaryColor = 0;
|
||||||
unsafe
|
unsafe
|
||||||
{
|
{
|
||||||
Function.Call<byte>(Hash.GET_VEHICLE_COLOURS, veh, &primaryColor, &secondaryColor);
|
Call<byte>(GET_VEHICLE_COLOURS, veh, &primaryColor, &secondaryColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
packet.Flags |= VehicleDataFlags.IsFullSync;
|
packet.Flags |= VehicleDataFlags.IsFullSync;
|
||||||
@ -134,8 +134,8 @@ namespace RageCoop.Client
|
|||||||
packet.ModelHash = veh.Model.Hash;
|
packet.ModelHash = veh.Model.Hash;
|
||||||
packet.EngineHealth = veh.EngineHealth;
|
packet.EngineHealth = veh.EngineHealth;
|
||||||
packet.LockStatus = veh.LockStatus;
|
packet.LockStatus = veh.LockStatus;
|
||||||
packet.LicensePlate = Function.Call<string>(Hash.GET_VEHICLE_NUMBER_PLATE_TEXT, veh);
|
packet.LicensePlate = Call<string>(GET_VEHICLE_NUMBER_PLATE_TEXT, veh);
|
||||||
packet.Livery = Function.Call<int>(Hash.GET_VEHICLE_LIVERY, veh);
|
packet.Livery = Call<int>(GET_VEHICLE_LIVERY, veh);
|
||||||
if (v.MainVehicle == Game.Player.LastVehicle) packet.RadioStation = Util.GetPlayerRadioIndex();
|
if (v.MainVehicle == Game.Player.LastVehicle) packet.RadioStation = Util.GetPlayerRadioIndex();
|
||||||
if (packet.EngineHealth > v.LastEngineHealth) packet.Flags |= VehicleDataFlags.Repaired;
|
if (packet.EngineHealth > v.LastEngineHealth) packet.Flags |= VehicleDataFlags.Repaired;
|
||||||
v.LastEngineHealth = packet.EngineHealth;
|
v.LastEngineHealth = packet.EngineHealth;
|
||||||
|
@ -7,9 +7,9 @@ namespace RageCoop.Client
|
|||||||
{
|
{
|
||||||
static Statistics()
|
static Statistics()
|
||||||
{
|
{
|
||||||
Task.Run(() =>
|
ThreadManager.CreateThread(() =>
|
||||||
{
|
{
|
||||||
while (true)
|
while (!Main.IsUnloading)
|
||||||
{
|
{
|
||||||
var bu = Networking.Peer.Statistics.SentBytes;
|
var bu = Networking.Peer.Statistics.SentBytes;
|
||||||
var bd = Networking.Peer.Statistics.ReceivedBytes;
|
var bd = Networking.Peer.Statistics.ReceivedBytes;
|
||||||
@ -17,7 +17,7 @@ namespace RageCoop.Client
|
|||||||
BytesUpPerSecond = Networking.Peer.Statistics.SentBytes - bu;
|
BytesUpPerSecond = Networking.Peer.Statistics.SentBytes - bu;
|
||||||
BytesDownPerSecond = Networking.Peer.Statistics.ReceivedBytes - bd;
|
BytesDownPerSecond = Networking.Peer.Statistics.ReceivedBytes - bd;
|
||||||
}
|
}
|
||||||
});
|
},"Statistics");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int BytesDownPerSecond { get; private set; }
|
public static int BytesDownPerSecond { get; private set; }
|
||||||
|
@ -33,7 +33,7 @@ namespace RageCoop.Client
|
|||||||
&& !CoopMenu.MenuPool.AreAnyVisible
|
&& !CoopMenu.MenuPool.AreAnyVisible
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
Function.Call(Hash.DRAW_SCALEFORM_MOVIE, _mainScaleform.Handle,
|
Call(DRAW_SCALEFORM_MOVIE, _mainScaleform.Handle,
|
||||||
LeftAlign ? LEFT_POSITION : RIGHT_POSITION, 0.3f,
|
LeftAlign ? LEFT_POSITION : RIGHT_POSITION, 0.3f,
|
||||||
0.28f, 0.6f,
|
0.28f, 0.6f,
|
||||||
255, 255, 255, 255, 0);
|
255, 255, 255, 255, 0);
|
||||||
|
@ -1,23 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
<TargetFramework>net7.0-windows</TargetFramework>
|
||||||
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
|
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
|
||||||
<ProjectGuid>{EF56D109-1F22-43E0-9DFF-CFCFB94E0681}</ProjectGuid>
|
|
||||||
<OutputType>Library</OutputType>
|
<OutputType>Library</OutputType>
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<OutDir>..\..\bin\$(Configuration)\Client\Scripts</OutDir>
|
||||||
<RootNamespace>RageCoop.Client</RootNamespace>
|
|
||||||
<AssemblyName>RageCoop.Client</AssemblyName>
|
|
||||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
|
||||||
<FileAlignment>512</FileAlignment>
|
|
||||||
<Deterministic>true</Deterministic>
|
|
||||||
<TargetFrameworkProfile />
|
|
||||||
<NuGetPackageImportStamp>
|
|
||||||
</NuGetPackageImportStamp>
|
|
||||||
<OutPutPath>..\..\bin\$(Configuration)\Client\Scripts</OutPutPath>
|
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
|
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
|
||||||
<AllowedReferenceRelatedFileExtensions>
|
<AllowedReferenceRelatedFileExtensions>
|
||||||
@ -25,146 +11,38 @@
|
|||||||
.pdb
|
.pdb
|
||||||
</AllowedReferenceRelatedFileExtensions>
|
</AllowedReferenceRelatedFileExtensions>
|
||||||
<DocumentationFile>..\..\bin\API\RageCoop.Client.xml</DocumentationFile>
|
<DocumentationFile>..\..\bin\API\RageCoop.Client.xml</DocumentationFile>
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<NoWarn>CS1591</NoWarn>
|
<NoWarn>CS1591</NoWarn>
|
||||||
</PropertyGroup>
|
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||||
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
|
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
|
||||||
<DefineConstants>DEBUG</DefineConstants>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Console.cs" />
|
<TrimmerRootDescriptor Include="Trimming.xml" />
|
||||||
<Compile Include="Debug.cs" />
|
<Compile Remove="GUI\**" />
|
||||||
<Compile Include="DevTools\DevTool.cs" />
|
<EmbeddedResource Remove="GUI\**" />
|
||||||
<Compile Include="GUI\CefClient.cs" />
|
<None Remove="GUI\**" />
|
||||||
<Compile Include="GUI\CefManager.cs" />
|
</ItemGroup>
|
||||||
<Compile Include="GUI\HookManager.cs" />
|
<ItemGroup>
|
||||||
<Compile Include="Main.cs" />
|
<Compile Update="Properties\AssemblyInfo.cs">
|
||||||
<Compile Include="Menus\CoopMenu.cs" />
|
|
||||||
<Compile Include="Menus\Sub\DebugMenu.cs" />
|
|
||||||
<Compile Include="Menus\Sub\DevToolMenu.cs" />
|
|
||||||
<Compile Include="Menus\Sub\ServersMenu.cs" />
|
|
||||||
<Compile Include="Menus\Sub\SettingsMenu.cs" />
|
|
||||||
<Compile Include="Networking\Chat.cs" />
|
|
||||||
<Compile Include="Networking\DownloadManager.cs" />
|
|
||||||
<Compile Include="Networking\HolePunch.cs" />
|
|
||||||
<Compile Include="Networking\Networking.cs" />
|
|
||||||
<Compile Include="Networking\Receive.cs" />
|
|
||||||
<Compile Include="Networking\Send.cs" />
|
|
||||||
<Compile Include="Networking\Statistics.cs" />
|
|
||||||
<Compile Include="PlayerList.cs" />
|
|
||||||
<Compile Include="Properties\AssemblyInfo.cs">
|
|
||||||
<AutoGen>True</AutoGen>
|
<AutoGen>True</AutoGen>
|
||||||
<DesignTime>True</DesignTime>
|
<DesignTime>True</DesignTime>
|
||||||
<DependentUpon>AssemblyInfo.tt</DependentUpon>
|
<DependentUpon>AssemblyInfo.tt</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Scripting\API.cs" />
|
|
||||||
<Compile Include="Scripting\BaseScript.cs" />
|
|
||||||
<Compile Include="Scripting\ClientScript.cs" />
|
|
||||||
<Compile Include="Scripting\Resources.cs" />
|
|
||||||
<Compile Include="Security.cs" />
|
|
||||||
<Compile Include="Settings.cs" />
|
|
||||||
<Compile Include="Sync\Entities\Ped\SyncedPed.Variables.cs" />
|
|
||||||
<Compile Include="Sync\Entities\Ped\SyncedPed.Animations.cs" />
|
|
||||||
<Compile Include="Sync\Entities\SyncedEntity.cs" />
|
|
||||||
<Compile Include="Sync\Entities\Ped\SyncedPed.cs" />
|
|
||||||
<Compile Include="Sync\Entities\SyncedProjectile.cs" />
|
|
||||||
<Compile Include="Sync\Entities\SyncedProp.cs" />
|
|
||||||
<Compile Include="Sync\Entities\Vehicle\SyncedVehicle.cs" />
|
|
||||||
<Compile Include="Sync\Entities\Vehicle\SyncedVehicle.Variables.cs" />
|
|
||||||
<Compile Include="Sync\EntityPool.cs" />
|
|
||||||
<Compile Include="Sync\SyncEvents.cs" />
|
|
||||||
<Compile Include="Sync\Voice.cs" />
|
|
||||||
<Compile Include="Util\Memory.cs" />
|
|
||||||
<Compile Include="Util\NativeCaller.cs" />
|
|
||||||
<Compile Include="Util\PedConfigFlags.cs" />
|
|
||||||
<Compile Include="Util\PedExtensions.cs" />
|
|
||||||
<Compile Include="Shared\Shared.cs" />
|
|
||||||
<Compile Include="Util\TaskType.cs" />
|
|
||||||
<Compile Include="Util\Util.cs" />
|
|
||||||
<Compile Include="Util\VehicleExtensions.cs" />
|
|
||||||
<Compile Include="Util\WeaponUtil.cs" />
|
|
||||||
<Compile Include="Util\Win32.cs" />
|
|
||||||
<Compile Include="WorldThread.cs" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="BitmapUtil, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="LemonUI.SHVDNC">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<HintPath>..\..\libs\LemonUI.SHVDNC.dll</HintPath>
|
||||||
<HintPath>..\..\libs\BitmapUtil.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="DXHook">
|
|
||||||
<HintPath>..\..\libs\DXHook\DXHook.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="ICSharpCode.SharpZipLib, Version=1.4.0.12, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\SharpZipLib.1.4.0\lib\netstandard2.0\ICSharpCode.SharpZipLib.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="LemonUI.SHVDN3">
|
|
||||||
<HintPath>..\..\libs\LemonUI.SHVDN3.dll</HintPath>
|
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Lidgren.Network">
|
<Reference Include="Lidgren.Network">
|
||||||
<HintPath>..\..\libs\Lidgren.Network.dll</HintPath>
|
<HintPath>..\..\libs\Lidgren.Network.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="ScriptHookVDotNetCore">
|
||||||
<Reference Include="NativeInvoker">
|
<HintPath>..\..\libs\ScriptHookVDotNetCore.dll</HintPath>
|
||||||
<HintPath>..\..\libs\NativeInvoker.dll</HintPath>
|
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="NAudio, Version=2.1.0.0, Culture=neutral, PublicKeyToken=e279aa5131008a41, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\NAudio.2.1.0\lib\net472\NAudio.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="NAudio.Asio, Version=2.1.0.0, Culture=neutral, PublicKeyToken=e279aa5131008a41, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\NAudio.Asio.2.1.0\lib\netstandard2.0\NAudio.Asio.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="NAudio.Core, Version=2.1.0.0, Culture=neutral, PublicKeyToken=e279aa5131008a41, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\NAudio.Core.2.1.0\lib\netstandard2.0\NAudio.Core.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="NAudio.Midi, Version=2.1.0.0, Culture=neutral, PublicKeyToken=e279aa5131008a41, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\NAudio.Midi.2.1.0\lib\netstandard2.0\NAudio.Midi.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="NAudio.Wasapi, Version=2.1.0.0, Culture=neutral, PublicKeyToken=e279aa5131008a41, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\NAudio.Wasapi.2.1.0\lib\netstandard2.0\NAudio.Wasapi.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="NAudio.WinForms, Version=2.1.0.0, Culture=neutral, PublicKeyToken=e279aa5131008a41, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\NAudio.WinForms.2.1.0\lib\net472\NAudio.WinForms.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="NAudio.WinMM, Version=2.1.0.0, Culture=neutral, PublicKeyToken=e279aa5131008a41, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\NAudio.WinMM.2.1.0\lib\netstandard2.0\NAudio.WinMM.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="RageCoop.Client.CefHost, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
|
||||||
<SpecificVersion>False</SpecificVersion>
|
|
||||||
<HintPath>..\..\bin\$(Configuration)\Client\SubProcess\ref\RageCoop.Client.CefHost.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="ScriptHookVDotNet">
|
|
||||||
<HintPath>..\..\libs\ScriptHookVDotNet.asi</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="ScriptHookVDotNet3, Version=3.5.1.0, Culture=neutral, processorArchitecture=MSIL">
|
|
||||||
<SpecificVersion>False</SpecificVersion>
|
|
||||||
<HintPath>..\..\libs\ScriptHookVDotNet3.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
|
||||||
<Reference Include="System.Windows.Forms" />
|
|
||||||
<Reference Include="System" />
|
|
||||||
<Reference Include="System.Drawing" />
|
|
||||||
<Reference Include="System.Drawing.Common, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\System.Drawing.Common.4.5.0\lib\net461\System.Drawing.Common.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Windows.Forms" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="..\..\.editorconfig">
|
<None Include="..\..\.editorconfig">
|
||||||
<Link>.editorconfig</Link>
|
<Link>.editorconfig</Link>
|
||||||
</None>
|
</None>
|
||||||
<None Include="app.config" />
|
|
||||||
<None Include="packages.config" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="icon.png">
|
<Content Include="icon.png">
|
||||||
@ -182,26 +60,23 @@
|
|||||||
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
|
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\Core\RageCoop.Core.csproj">
|
<ProjectReference Include="..\..\Core\RageCoop.Core.csproj" />
|
||||||
<Project>{cc2e8102-e568-4524-aa1f-f8e0f1cfe58a}</Project>
|
|
||||||
<Name>RageCoop.Core</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
<ProjectReference Include="..\Loader\RageCoop.Client.Loader.csproj">
|
|
||||||
<Project>{fc8cbdbb-6dc3-43af-b34d-092e476410a5}</Project>
|
|
||||||
<Name>RageCoop.Client.Loader</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup />
|
<ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<PackageReference Include="NAudio" Version="2.1.0" />
|
||||||
<PropertyGroup>
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||||
|
<PackageReference Include="SharpZipLib" Version="1.4.0" />
|
||||||
|
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="4.3.0" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Target Name="PostBuild" AfterTargets="PostBuildEvent" Condition="'$(SolutionDir)' != '*Undefined*' And '$(NoAotCompile)' != 'true'">
|
||||||
|
<Exec Command="dotnet publish "$(ProjectPath)" -o "$(OutDir)\native" -p:PublishAOT=true -r win-x64 " />
|
||||||
|
</Target>
|
||||||
|
<PropertyGroup Condition="'$(SolutionDir)' != '*Undefined*' AND '$(PublishAot)' != 'true'">
|
||||||
<PostBuildEvent Condition=" '$(DevEnvDir)' != '*Undefined*'">
|
<PostBuildEvent Condition=" '$(DevEnvDir)' != '*Undefined*'">
|
||||||
"$(DevEnvDir)TextTransform.exe" -a !!BuildConfiguration!$(Configuration) "$(ProjectDir)Properties\AssemblyInfo.tt"
|
"$(DevEnvDir)TextTransform.exe" -a !!BuildConfiguration!$(Configuration) "$(ProjectDir)Properties\AssemblyInfo.tt"
|
||||||
</PostBuildEvent>
|
</PostBuildEvent>
|
||||||
<PostBuildEvent Condition="'$(Configuration)' != 'API' AND '$(SolutionDir)' != '*Undefined*'">
|
<PostBuildEvent Condition="'$(Configuration)' != 'API'">
|
||||||
xcopy "$(SolutionDir)Client\Data" "..\Data" /i /s
|
xcopy "$(SolutionDir)Client\Data" "..\Data" /i /s /y
|
||||||
</PostBuildEvent>
|
</PostBuildEvent>
|
||||||
<PreBuildEvent Condition=" '$(SolutionDir)' != '*Undefined*'">
|
|
||||||
dotnet build -c $(Configuration) "$(SolutionDir)Client\CefHost\RageCoop.Client.CefHost.csproj"
|
|
||||||
</PreBuildEvent>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
@ -203,12 +203,6 @@ namespace RageCoop.Client.Scripting
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static Version CurrentVersion => Main.Version;
|
public static Version CurrentVersion => Main.Version;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Get a <see cref="Core.Logger" /> that RAGECOOP is currently using.
|
|
||||||
/// </summary>
|
|
||||||
/// <returns></returns>
|
|
||||||
public static Logger Logger => Main.Logger;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get all players indexed by their ID
|
/// Get all players indexed by their ID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -35,9 +35,9 @@ namespace RageCoop.Client.Scripting
|
|||||||
API.RegisterCustomEventHandler(CustomEvents.WeatherTimeSync, WeatherTimeSync);
|
API.RegisterCustomEventHandler(CustomEvents.WeatherTimeSync, WeatherTimeSync);
|
||||||
API.RegisterCustomEventHandler(CustomEvents.OnPlayerDied,
|
API.RegisterCustomEventHandler(CustomEvents.OnPlayerDied,
|
||||||
e => { Notification.Show($"~h~{e.Args[0]}~h~ died."); });
|
e => { Notification.Show($"~h~{e.Args[0]}~h~ died."); });
|
||||||
Task.Run(() =>
|
ThreadManager.CreateThread(() =>
|
||||||
{
|
{
|
||||||
while (true)
|
while (!Main.IsUnloading)
|
||||||
{
|
{
|
||||||
if (_isHost)
|
if (_isHost)
|
||||||
API.QueueAction(() =>
|
API.QueueAction(() =>
|
||||||
@ -48,7 +48,7 @@ namespace RageCoop.Client.Scripting
|
|||||||
var weather1 = default(int);
|
var weather1 = default(int);
|
||||||
var weather2 = default(int);
|
var weather2 = default(int);
|
||||||
var percent2 = default(float);
|
var percent2 = default(float);
|
||||||
Function.Call(Hash.GET_CURR_WEATHER_STATE, &weather1, &weather2, &percent2);
|
Call(GET_CURR_WEATHER_STATE, &weather1, &weather2, &percent2);
|
||||||
API.SendCustomEvent(CustomEvents.WeatherTimeSync, time.Hours, time.Minutes,
|
API.SendCustomEvent(CustomEvents.WeatherTimeSync, time.Hours, time.Minutes,
|
||||||
time.Seconds, weather1, weather2, percent2);
|
time.Seconds, weather1, weather2, percent2);
|
||||||
}
|
}
|
||||||
@ -56,13 +56,13 @@ namespace RageCoop.Client.Scripting
|
|||||||
|
|
||||||
Thread.Sleep(1000);
|
Thread.Sleep(1000);
|
||||||
}
|
}
|
||||||
});
|
},"BaseScript");
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void WeatherTimeSync(CustomEventReceivedArgs e)
|
private static void WeatherTimeSync(CustomEventReceivedArgs e)
|
||||||
{
|
{
|
||||||
World.CurrentTimeOfDay = new TimeSpan((int)e.Args[0], (int)e.Args[1], (int)e.Args[2]);
|
World.CurrentTimeOfDay = new TimeSpan((int)e.Args[0], (int)e.Args[1], (int)e.Args[2]);
|
||||||
Function.Call(Hash.SET_CURR_WEATHER_STATE, (int)e.Args[3], (int)e.Args[4], (float)e.Args[5]);
|
Call(SET_CURR_WEATHER_STATE, (int)e.Args[3], (int)e.Args[4], (float)e.Args[5]);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void SetDisplayNameTag(CustomEventReceivedArgs e)
|
private static void SetDisplayNameTag(CustomEventReceivedArgs e)
|
||||||
@ -193,7 +193,7 @@ namespace RageCoop.Client.Scripting
|
|||||||
|
|
||||||
if (returnType == TypeCode.Empty)
|
if (returnType == TypeCode.Empty)
|
||||||
{
|
{
|
||||||
Function.Call(hash, arguments.ToArray());
|
Call(hash, arguments.ToArray());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -205,59 +205,59 @@ namespace RageCoop.Client.Scripting
|
|||||||
{
|
{
|
||||||
case TypeCode.Boolean:
|
case TypeCode.Boolean:
|
||||||
API.SendCustomEvent(CustomEvents.NativeResponse, id,
|
API.SendCustomEvent(CustomEvents.NativeResponse, id,
|
||||||
Function.Call<bool>(hash, arguments.ToArray()));
|
Call<bool>(hash, arguments.ToArray()));
|
||||||
break;
|
break;
|
||||||
case TypeCode.Byte:
|
case TypeCode.Byte:
|
||||||
API.SendCustomEvent(CustomEvents.NativeResponse, id,
|
API.SendCustomEvent(CustomEvents.NativeResponse, id,
|
||||||
Function.Call<byte>(hash, arguments.ToArray()));
|
Call<byte>(hash, arguments.ToArray()));
|
||||||
break;
|
break;
|
||||||
case TypeCode.Char:
|
case TypeCode.Char:
|
||||||
API.SendCustomEvent(CustomEvents.NativeResponse, id,
|
API.SendCustomEvent(CustomEvents.NativeResponse, id,
|
||||||
Function.Call<char>(hash, arguments.ToArray()));
|
Call<char>(hash, arguments.ToArray()));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TypeCode.Single:
|
case TypeCode.Single:
|
||||||
API.SendCustomEvent(CustomEvents.NativeResponse, id,
|
API.SendCustomEvent(CustomEvents.NativeResponse, id,
|
||||||
Function.Call<float>(hash, arguments.ToArray()));
|
Call<float>(hash, arguments.ToArray()));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TypeCode.Double:
|
case TypeCode.Double:
|
||||||
API.SendCustomEvent(CustomEvents.NativeResponse, id,
|
API.SendCustomEvent(CustomEvents.NativeResponse, id,
|
||||||
Function.Call<double>(hash, arguments.ToArray()));
|
Call<double>(hash, arguments.ToArray()));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TypeCode.Int16:
|
case TypeCode.Int16:
|
||||||
API.SendCustomEvent(CustomEvents.NativeResponse, id,
|
API.SendCustomEvent(CustomEvents.NativeResponse, id,
|
||||||
Function.Call<short>(hash, arguments.ToArray()));
|
Call<short>(hash, arguments.ToArray()));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TypeCode.Int32:
|
case TypeCode.Int32:
|
||||||
API.SendCustomEvent(CustomEvents.NativeResponse, id, Function.Call<int>(hash, arguments.ToArray()));
|
API.SendCustomEvent(CustomEvents.NativeResponse, id, Call<int>(hash, arguments.ToArray()));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TypeCode.Int64:
|
case TypeCode.Int64:
|
||||||
API.SendCustomEvent(CustomEvents.NativeResponse, id,
|
API.SendCustomEvent(CustomEvents.NativeResponse, id,
|
||||||
Function.Call<long>(hash, arguments.ToArray()));
|
Call<long>(hash, arguments.ToArray()));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TypeCode.String:
|
case TypeCode.String:
|
||||||
API.SendCustomEvent(CustomEvents.NativeResponse, id,
|
API.SendCustomEvent(CustomEvents.NativeResponse, id,
|
||||||
Function.Call<string>(hash, arguments.ToArray()));
|
Call<string>(hash, arguments.ToArray()));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TypeCode.UInt16:
|
case TypeCode.UInt16:
|
||||||
API.SendCustomEvent(CustomEvents.NativeResponse, id,
|
API.SendCustomEvent(CustomEvents.NativeResponse, id,
|
||||||
Function.Call<ushort>(hash, arguments.ToArray()));
|
Call<ushort>(hash, arguments.ToArray()));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TypeCode.UInt32:
|
case TypeCode.UInt32:
|
||||||
API.SendCustomEvent(CustomEvents.NativeResponse, id,
|
API.SendCustomEvent(CustomEvents.NativeResponse, id,
|
||||||
Function.Call<uint>(hash, arguments.ToArray()));
|
Call<uint>(hash, arguments.ToArray()));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TypeCode.UInt64:
|
case TypeCode.UInt64:
|
||||||
API.SendCustomEvent(CustomEvents.NativeResponse, id,
|
API.SendCustomEvent(CustomEvents.NativeResponse, id,
|
||||||
Function.Call<ulong>(hash, arguments.ToArray()));
|
Call<ulong>(hash, arguments.ToArray()));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -288,7 +288,7 @@ namespace RageCoop.Client.Scripting
|
|||||||
case string stuff:
|
case string stuff:
|
||||||
return stuff;
|
return stuff;
|
||||||
default:
|
default:
|
||||||
return null;
|
return default;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,10 +4,6 @@ using RageCoop.Core.Scripting;
|
|||||||
|
|
||||||
namespace RageCoop.Client.Scripting
|
namespace RageCoop.Client.Scripting
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// Inherit from this class, constructor will be called automatically, but other scripts might have yet been loaded,
|
|
||||||
/// you should use <see cref="OnStart" />. to initiate your script.
|
|
||||||
/// </summary>
|
|
||||||
public abstract class ClientScript : Script
|
public abstract class ClientScript : Script
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -24,16 +20,5 @@ namespace RageCoop.Client.Scripting
|
|||||||
/// Eqivalent of <see cref="ClientResource.Logger" /> in <see cref="CurrentResource" />
|
/// Eqivalent of <see cref="ClientResource.Logger" /> in <see cref="CurrentResource" />
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Logger Logger => CurrentResource.Logger;
|
public Logger Logger => CurrentResource.Logger;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// This method would be called from main thread, right after all script constructors are invoked.
|
|
||||||
/// </summary>
|
|
||||||
public abstract void OnStart();
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// This method would be called from main thread right before the whole <see cref="System.AppDomain" /> is unloded but
|
|
||||||
/// prior to <see cref="GTA.Script.Aborted" />.
|
|
||||||
/// </summary>
|
|
||||||
public abstract void OnStop();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -5,10 +5,8 @@ using System.IO;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using ICSharpCode.SharpZipLib.Zip;
|
using ICSharpCode.SharpZipLib.Zip;
|
||||||
using RageCoop.Client.Loader;
|
|
||||||
using RageCoop.Core;
|
using RageCoop.Core;
|
||||||
using RageCoop.Core.Scripting;
|
using RageCoop.Core.Scripting;
|
||||||
using SHVDN;
|
|
||||||
|
|
||||||
namespace RageCoop.Client.Scripting
|
namespace RageCoop.Client.Scripting
|
||||||
{
|
{
|
||||||
@ -90,31 +88,19 @@ namespace RageCoop.Client.Scripting
|
|||||||
Directory.GetFiles(path, "*.dll", SearchOption.AllDirectories).Where(x => x.CanBeIgnored())
|
Directory.GetFiles(path, "*.dll", SearchOption.AllDirectories).Where(x => x.CanBeIgnored())
|
||||||
.ForEach(x => File.Delete(x));
|
.ForEach(x => File.Delete(x));
|
||||||
|
|
||||||
// Load it in main thread
|
// TODO Core.ScheduleLoad()...
|
||||||
API.QueueActionAndWait(() =>
|
|
||||||
{
|
|
||||||
Main.QueueToMainThreadAndWait(() =>
|
|
||||||
{
|
|
||||||
foreach (var res in LoadedResources)
|
|
||||||
Directory.GetFiles(res.Value.ScriptsDirectory, "*.dll", SearchOption.AllDirectories)
|
|
||||||
.ForEach(x => ScriptDomain.CurrentDomain.StartScripts(x));
|
|
||||||
SetupScripts();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Unload()
|
public void Unload()
|
||||||
{
|
{
|
||||||
StopScripts();
|
// TODO Core.ScheduleUnload()...
|
||||||
LoadedResources.Clear();
|
|
||||||
LoaderContext.RequestUnload();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private ClientResource Unpack(string zipPath, string dataFolderRoot)
|
private ClientResource Unpack(string zipPath, string dataFolderRoot)
|
||||||
{
|
{
|
||||||
var r = new ClientResource
|
var r = new ClientResource
|
||||||
{
|
{
|
||||||
Logger = API.Logger,
|
Logger = Logger,
|
||||||
Scripts = new List<ClientScript>(),
|
Scripts = new List<ClientScript>(),
|
||||||
Name = Path.GetFileNameWithoutExtension(zipPath),
|
Name = Path.GetFileNameWithoutExtension(zipPath),
|
||||||
DataFolder = Path.Combine(dataFolderRoot, Path.GetFileNameWithoutExtension(zipPath)),
|
DataFolder = Path.Combine(dataFolderRoot, Path.GetFileNameWithoutExtension(zipPath)),
|
||||||
@ -147,7 +133,7 @@ namespace RageCoop.Client.Scripting
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
API.Logger.Warning(
|
Logger.Warning(
|
||||||
$"Failed to delete API assembly: {file}. This may or may cause some unexpected behaviours.\n{ex}");
|
$"Failed to delete API assembly: {file}. This may or may cause some unexpected behaviours.\n{ex}");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -167,53 +153,5 @@ namespace RageCoop.Client.Scripting
|
|||||||
LoadedResources.TryAdd(r.Name, r);
|
LoadedResources.TryAdd(r.Name, r);
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetupScripts()
|
|
||||||
{
|
|
||||||
foreach (var s in GetClientScripts())
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
API.Logger.Debug("Starting script: " + s.GetType().FullName);
|
|
||||||
var script = (ClientScript)s;
|
|
||||||
if (LoadedResources.TryGetValue(Directory.GetParent(script.Filename).Name, out var r))
|
|
||||||
script.CurrentResource = r;
|
|
||||||
else
|
|
||||||
API.Logger.Warning("Failed to locate resource for script: " + script.Filename);
|
|
||||||
var res = script.CurrentResource;
|
|
||||||
script.CurrentFile = res?.Files.Values.Where(x =>
|
|
||||||
x.Name.ToLower() == script.Filename.Substring(res.ScriptsDirectory.Length + 1)
|
|
||||||
.Replace('\\', '/')).FirstOrDefault();
|
|
||||||
res?.Scripts.Add(script);
|
|
||||||
script.OnStart();
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
API.Logger.Error($"Failed to start {s.GetType().FullName}", ex);
|
|
||||||
}
|
|
||||||
|
|
||||||
API.Logger.Debug("Started script: " + s.GetType().FullName);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void StopScripts()
|
|
||||||
{
|
|
||||||
foreach (var s in GetClientScripts())
|
|
||||||
try
|
|
||||||
{
|
|
||||||
API.Logger.Debug("Stopping script: " + s.GetType().FullName);
|
|
||||||
((ClientScript)s).OnStop();
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
API.Logger.Error($"Failed to stop {s.GetType().FullName}", ex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static object[] GetClientScripts()
|
|
||||||
{
|
|
||||||
return ScriptDomain.CurrentDomain.RunningScripts.Where(x =>
|
|
||||||
x.ScriptInstance.GetType().IsScript(typeof(ClientScript))).Select(x => x.ScriptInstance).ToArray();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,5 +1,4 @@
|
|||||||
#undef DEBUG
|
|
||||||
using System.Windows.Forms;
|
|
||||||
|
|
||||||
namespace RageCoop.Client
|
namespace RageCoop.Client
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,11 @@
|
|||||||
using System.IO;
|
global using GTA;
|
||||||
|
global using GTA.Native;
|
||||||
|
global using static GTA.Native.Function;
|
||||||
|
global using static GTA.Native.Hash;
|
||||||
|
global using static RageCoop.Client.Shared;
|
||||||
|
global using Console = GTA.Console;
|
||||||
|
global using static SHVDN.PInvoke;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
namespace RageCoop.Client
|
namespace RageCoop.Client
|
||||||
{
|
{
|
||||||
|
@ -12,22 +12,22 @@ namespace RageCoop.Client
|
|||||||
|
|
||||||
if (speaking)
|
if (speaking)
|
||||||
{
|
{
|
||||||
Function.Call(Hash.PLAY_FACIAL_ANIM, MainPed.Handle, "mic_chatter", "mp_facial");
|
Call(PLAY_FACIAL_ANIM, MainPed.Handle, "mic_chatter", "mp_facial");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (MainPed.Gender)
|
switch (MainPed.Gender)
|
||||||
{
|
{
|
||||||
case Gender.Male:
|
case Gender.Male:
|
||||||
Function.Call(Hash.PLAY_FACIAL_ANIM, MainPed.Handle, "mood_normal_1",
|
Call(PLAY_FACIAL_ANIM, MainPed.Handle, "mood_normal_1",
|
||||||
"facials@gen_male@variations@normal");
|
"facials@gen_male@variations@normal");
|
||||||
break;
|
break;
|
||||||
case Gender.Female:
|
case Gender.Female:
|
||||||
Function.Call(Hash.PLAY_FACIAL_ANIM, MainPed.Handle, "mood_normal_1",
|
Call(PLAY_FACIAL_ANIM, MainPed.Handle, "mood_normal_1",
|
||||||
"facials@gen_female@variations@normal");
|
"facials@gen_female@variations@normal");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Function.Call(Hash.PLAY_FACIAL_ANIM, MainPed.Handle, "mood_normal_1",
|
Call(PLAY_FACIAL_ANIM, MainPed.Handle, "mood_normal_1",
|
||||||
"facials@mime@variations@normal");
|
"facials@mime@variations@normal");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -41,12 +41,12 @@ namespace RageCoop.Client
|
|||||||
if (ourAnim != null && animDict != null)
|
if (ourAnim != null && animDict != null)
|
||||||
{
|
{
|
||||||
var flag = AnimationFlags.Loop;
|
var flag = AnimationFlags.Loop;
|
||||||
if (!Function.Call<bool>(Hash.IS_ENTITY_PLAYING_ANIM, MainPed, animDict, ourAnim, 3))
|
if (!Call<bool>(IS_ENTITY_PLAYING_ANIM, MainPed, animDict, ourAnim, 3))
|
||||||
{
|
{
|
||||||
if (LoadAnim(animDict) == null) return;
|
if (LoadAnim(animDict) == null) return;
|
||||||
|
|
||||||
MainPed.Task.ClearAll();
|
MainPed.Task.ClearAll();
|
||||||
Function.Call(Hash.TASK_PLAY_ANIM, MainPed, animDict, ourAnim, 8f, 10f, -1, flag, -8f, 1, 1, 1);
|
Call(TASK_PLAY_ANIM, MainPed, animDict, ourAnim, 8f, 10f, -1, flag, -8f, 1, 1, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -149,9 +149,9 @@ namespace RageCoop.Client
|
|||||||
|
|
||||||
private string LoadAnim(string anim)
|
private string LoadAnim(string anim)
|
||||||
{
|
{
|
||||||
if (!Function.Call<bool>(Hash.HAS_ANIM_DICT_LOADED, anim))
|
if (!Call<bool>(HAS_ANIM_DICT_LOADED, anim))
|
||||||
{
|
{
|
||||||
Function.Call(Hash.REQUEST_ANIM_DICT, anim);
|
Call(REQUEST_ANIM_DICT, anim);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -208,13 +208,13 @@ namespace RageCoop.Client
|
|||||||
MainPed.IsFireProof = false;
|
MainPed.IsFireProof = false;
|
||||||
MainPed.IsExplosionProof = false;
|
MainPed.IsExplosionProof = false;
|
||||||
|
|
||||||
Function.Call(Hash.SET_PED_DROPS_WEAPONS_WHEN_DEAD, MainPed.Handle, false);
|
Call(SET_PED_DROPS_WEAPONS_WHEN_DEAD, MainPed.Handle, false);
|
||||||
Function.Call(Hash.SET_PED_CAN_BE_TARGETTED, MainPed.Handle, true);
|
Call(SET_PED_CAN_BE_TARGETTED, MainPed.Handle, true);
|
||||||
Function.Call(Hash.SET_PED_CAN_BE_TARGETTED_BY_PLAYER, MainPed.Handle, Game.Player, true);
|
Call(SET_PED_CAN_BE_TARGETTED_BY_PLAYER, MainPed.Handle, Game.Player, true);
|
||||||
Function.Call(Hash.SET_PED_GET_OUT_UPSIDE_DOWN_VEHICLE, MainPed.Handle, false);
|
Call(SET_PED_GET_OUT_UPSIDE_DOWN_VEHICLE, MainPed.Handle, false);
|
||||||
Function.Call(Hash.SET_CAN_ATTACK_FRIENDLY, MainPed.Handle, true, true);
|
Call(SET_CAN_ATTACK_FRIENDLY, MainPed.Handle, true, true);
|
||||||
// Function.Call(Hash._SET_PED_CAN_PLAY_INJURED_ANIMS, false);
|
// Call(_SET_PED_CAN_PLAY_INJURED_ANIMS, false);
|
||||||
Function.Call(Hash.SET_PED_CAN_EVASIVE_DIVE, MainPed.Handle, false);
|
Call(SET_PED_CAN_EVASIVE_DIVE, MainPed.Handle, false);
|
||||||
|
|
||||||
MainPed.SetConfigFlag((int)PedConfigFlags.CPED_CONFIG_FLAG_DrownsInWater, false);
|
MainPed.SetConfigFlag((int)PedConfigFlags.CPED_CONFIG_FLAG_DrownsInWater, false);
|
||||||
MainPed.SetConfigFlag((int)PedConfigFlags.CPED_CONFIG_FLAG_DisableHurt, true);
|
MainPed.SetConfigFlag((int)PedConfigFlags.CPED_CONFIG_FLAG_DisableHurt, true);
|
||||||
@ -244,7 +244,7 @@ namespace RageCoop.Client
|
|||||||
private void SetClothes()
|
private void SetClothes()
|
||||||
{
|
{
|
||||||
for (byte i = 0; i < 12; i++)
|
for (byte i = 0; i < 12; i++)
|
||||||
Function.Call(Hash.SET_PED_COMPONENT_VARIATION, MainPed.Handle, i, (int)Clothes[i],
|
Call(SET_PED_COMPONENT_VARIATION, MainPed.Handle, i, (int)Clothes[i],
|
||||||
(int)Clothes[i + 12], (int)Clothes[i + 24]);
|
(int)Clothes[i + 12], (int)Clothes[i + 24]);
|
||||||
_lastClothes = Clothes;
|
_lastClothes = Clothes;
|
||||||
}
|
}
|
||||||
@ -257,12 +257,12 @@ namespace RageCoop.Client
|
|||||||
MainPed.PositionNoOffset = Vector3.Lerp(MainPed.ReadPosition(), Position + Velocity, 0.5f);
|
MainPed.PositionNoOffset = Vector3.Lerp(MainPed.ReadPosition(), Position + Velocity, 0.5f);
|
||||||
MainPed.Quaternion = Rotation.ToQuaternion();
|
MainPed.Quaternion = Rotation.ToQuaternion();
|
||||||
|
|
||||||
if (!Function.Call<bool>(Hash.IS_ENTITY_PLAYING_ANIM, MainPed.Handle, "skydive@base", "free_idle", 3))
|
if (!Call<bool>(IS_ENTITY_PLAYING_ANIM, MainPed.Handle, "skydive@base", "free_idle", 3))
|
||||||
{
|
{
|
||||||
// Skip update if animation is not loaded
|
// Skip update if animation is not loaded
|
||||||
var dict = LoadAnim("skydive@base");
|
var dict = LoadAnim("skydive@base");
|
||||||
if (dict == null) return;
|
if (dict == null) return;
|
||||||
Function.Call(Hash.TASK_PLAY_ANIM, MainPed.Handle, dict, "free_idle", 8f, 10f, -1, 0, -8f, 1, 1, 1);
|
Call(TASK_PLAY_ANIM, MainPed.Handle, dict, "free_idle", 8f, 10f, -1, 0, -8f, 1, 1, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@ -293,12 +293,12 @@ namespace RageCoop.Client
|
|||||||
MainPed.PositionNoOffset = Vector3.Lerp(MainPed.ReadPosition(), Position + Velocity, 0.5f);
|
MainPed.PositionNoOffset = Vector3.Lerp(MainPed.ReadPosition(), Position + Velocity, 0.5f);
|
||||||
MainPed.Quaternion = Rotation.ToQuaternion();
|
MainPed.Quaternion = Rotation.ToQuaternion();
|
||||||
|
|
||||||
if (!Function.Call<bool>(Hash.IS_ENTITY_PLAYING_ANIM, MainPed.Handle, "skydive@parachute@first_person",
|
if (!Call<bool>(IS_ENTITY_PLAYING_ANIM, MainPed.Handle, "skydive@parachute@first_person",
|
||||||
"chute_idle_right", 3))
|
"chute_idle_right", 3))
|
||||||
{
|
{
|
||||||
var dict = LoadAnim("skydive@parachute@first_person");
|
var dict = LoadAnim("skydive@parachute@first_person");
|
||||||
if (dict == null) return;
|
if (dict == null) return;
|
||||||
Function.Call(Hash.TASK_PLAY_ANIM, MainPed, dict, "chute_idle_right", 8f, 10f, -1, 0, -8f, 1, 1, 1);
|
Call(TASK_PLAY_ANIM, MainPed, dict, "chute_idle_right", 8f, 10f, -1, 0, -8f, 1, 1, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@ -321,7 +321,7 @@ namespace RageCoop.Client
|
|||||||
_currentAnimation[1] = anim;
|
_currentAnimation[1] = anim;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Function.Call<bool>(Hash.IS_ENTITY_PLAYING_ANIM, MainPed.Handle, "laddersbase", anim, 3))
|
if (!Call<bool>(IS_ENTITY_PLAYING_ANIM, MainPed.Handle, "laddersbase", anim, 3))
|
||||||
MainPed.Task.PlayAnimation("laddersbase", anim, 8f, -1, AnimationFlags.Loop);
|
MainPed.Task.PlayAnimation("laddersbase", anim, 8f, -1, AnimationFlags.Loop);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -334,7 +334,7 @@ namespace RageCoop.Client
|
|||||||
_currentAnimation[1] = "base_left_hand_up";
|
_currentAnimation[1] = "base_left_hand_up";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Function.Call<bool>(Hash.IS_ENTITY_PLAYING_ANIM, MainPed.Handle, "laddersbase",
|
if (!Call<bool>(IS_ENTITY_PLAYING_ANIM, MainPed.Handle, "laddersbase",
|
||||||
"base_left_hand_up", 3))
|
"base_left_hand_up", 3))
|
||||||
MainPed.Task.PlayAnimation("laddersbase", "base_left_hand_up", 8f, -1, AnimationFlags.Loop);
|
MainPed.Task.PlayAnimation("laddersbase", "base_left_hand_up", 8f, -1, AnimationFlags.Loop);
|
||||||
}
|
}
|
||||||
@ -346,7 +346,7 @@ namespace RageCoop.Client
|
|||||||
_currentAnimation[1] = "climb_up";
|
_currentAnimation[1] = "climb_up";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Function.Call<bool>(Hash.IS_ENTITY_PLAYING_ANIM, MainPed.Handle, "laddersbase", "climb_up",
|
if (!Call<bool>(IS_ENTITY_PLAYING_ANIM, MainPed.Handle, "laddersbase", "climb_up",
|
||||||
3)) MainPed.Task.PlayAnimation("laddersbase", "climb_up", 8f, -1, AnimationFlags.Loop);
|
3)) MainPed.Task.PlayAnimation("laddersbase", "climb_up", 8f, -1, AnimationFlags.Loop);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -373,8 +373,8 @@ namespace RageCoop.Client
|
|||||||
if (!IsVaulting && MainPed.IsVaulting) MainPed.Task.ClearAllImmediately();
|
if (!IsVaulting && MainPed.IsVaulting) MainPed.Task.ClearAllImmediately();
|
||||||
|
|
||||||
if (IsOnFire && !MainPed.IsOnFire)
|
if (IsOnFire && !MainPed.IsOnFire)
|
||||||
Function.Call(Hash.START_ENTITY_FIRE, MainPed);
|
Call(START_ENTITY_FIRE, MainPed);
|
||||||
else if (!IsOnFire && MainPed.IsOnFire) Function.Call(Hash.STOP_ENTITY_FIRE, MainPed);
|
else if (!IsOnFire && MainPed.IsOnFire) Call(STOP_ENTITY_FIRE, MainPed);
|
||||||
|
|
||||||
if (IsJumping)
|
if (IsJumping)
|
||||||
{
|
{
|
||||||
@ -432,7 +432,7 @@ namespace RageCoop.Client
|
|||||||
}
|
}
|
||||||
else if (IsInCover)
|
else if (IsInCover)
|
||||||
{
|
{
|
||||||
if (!_lastInCover) Function.Call(Hash.TASK_STAY_IN_COVER, MainPed.Handle);
|
if (!_lastInCover) Call(TASK_STAY_IN_COVER, MainPed.Handle);
|
||||||
|
|
||||||
_lastInCover = true;
|
_lastInCover = true;
|
||||||
if (IsAiming)
|
if (IsAiming)
|
||||||
@ -476,16 +476,16 @@ namespace RageCoop.Client
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var model = Function.Call<uint>(Hash.GET_WEAPONTYPE_MODEL, CurrentWeapon);
|
var model = Call<uint>(GET_WEAPONTYPE_MODEL, CurrentWeapon);
|
||||||
if (!Function.Call<bool>(Hash.HAS_MODEL_LOADED, model))
|
if (!Call<bool>(HAS_MODEL_LOADED, model))
|
||||||
{
|
{
|
||||||
Function.Call(Hash.REQUEST_MODEL, model);
|
Call(REQUEST_MODEL, model);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (WeaponObj?.Exists() == true)
|
if (WeaponObj?.Exists() == true)
|
||||||
WeaponObj.Delete();
|
WeaponObj.Delete();
|
||||||
MainPed.Weapons.RemoveAll();
|
MainPed.Weapons.RemoveAll();
|
||||||
WeaponObj = Entity.FromHandle(Function.Call<int>(Hash.CREATE_WEAPON_OBJECT, CurrentWeapon, -1, Position.X, Position.Y, Position.Z, true, 0, 0));
|
WeaponObj = Entity.FromHandle(Call<int>(CREATE_WEAPON_OBJECT, CurrentWeapon, -1, Position.X, Position.Y, Position.Z, true, 0, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (compChanged)
|
if (compChanged)
|
||||||
@ -494,17 +494,17 @@ namespace RageCoop.Client
|
|||||||
{
|
{
|
||||||
if (comp.Value)
|
if (comp.Value)
|
||||||
{
|
{
|
||||||
Function.Call(Hash.GIVE_WEAPON_COMPONENT_TO_WEAPON_OBJECT, WeaponObj.Handle, comp.Key);
|
Call(GIVE_WEAPON_COMPONENT_TO_WEAPON_OBJECT, WeaponObj.Handle, comp.Key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_lastWeaponComponents = WeaponComponents;
|
_lastWeaponComponents = WeaponComponents;
|
||||||
}
|
}
|
||||||
Function.Call(Hash.GIVE_WEAPON_OBJECT_TO_PED, WeaponObj.Handle, MainPed.Handle);
|
Call(GIVE_WEAPON_OBJECT_TO_PED, WeaponObj.Handle, MainPed.Handle);
|
||||||
_lastWeaponHash = CurrentWeapon;
|
_lastWeaponHash = CurrentWeapon;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Function.Call<int>(Hash.GET_PED_WEAPON_TINT_INDEX, MainPed, CurrentWeapon) != WeaponTint)
|
if (Call<int>(GET_PED_WEAPON_TINT_INDEX, MainPed, CurrentWeapon) != WeaponTint)
|
||||||
Function.Call<int>(Hash.SET_PED_WEAPON_TINT_INDEX, MainPed, CurrentWeapon, WeaponTint);
|
Call<int>(SET_PED_WEAPON_TINT_INDEX, MainPed, CurrentWeapon, WeaponTint);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DisplayAiming()
|
private void DisplayAiming()
|
||||||
@ -512,7 +512,7 @@ namespace RageCoop.Client
|
|||||||
if (Velocity == default)
|
if (Velocity == default)
|
||||||
MainPed.Task.AimAt(AimCoords, 1000);
|
MainPed.Task.AimAt(AimCoords, 1000);
|
||||||
else
|
else
|
||||||
Function.Call(Hash.TASK_GO_TO_COORD_WHILE_AIMING_AT_COORD, MainPed.Handle,
|
Call(TASK_GO_TO_COORD_WHILE_AIMING_AT_COORD, MainPed.Handle,
|
||||||
Position.X + Velocity.X, Position.Y + Velocity.Y, Position.Z + Velocity.Z,
|
Position.X + Velocity.X, Position.Y + Velocity.Y, Position.Z + Velocity.Z,
|
||||||
AimCoords.X, AimCoords.Y, AimCoords.Z, 3f, false, 0x3F000000, 0x40800000, false, 512, false, 0);
|
AimCoords.X, AimCoords.Y, AimCoords.Z, 3f, false, 0x3F000000, 0x40800000, false, 512, false, 0);
|
||||||
SmoothTransition();
|
SmoothTransition();
|
||||||
@ -520,7 +520,7 @@ namespace RageCoop.Client
|
|||||||
|
|
||||||
private void WalkTo()
|
private void WalkTo()
|
||||||
{
|
{
|
||||||
Function.Call(Hash.SET_PED_STEALTH_MOVEMENT, MainPed, IsInStealthMode, 0);
|
Call(SET_PED_STEALTH_MOVEMENT, MainPed, IsInStealthMode, 0);
|
||||||
var predictPosition = Predict(Position) + Velocity;
|
var predictPosition = Predict(Position) + Velocity;
|
||||||
var range = predictPosition.DistanceToSquared(MainPed.ReadPosition());
|
var range = predictPosition.DistanceToSquared(MainPed.ReadPosition());
|
||||||
|
|
||||||
@ -533,7 +533,7 @@ namespace RageCoop.Client
|
|||||||
if (nrange > 1.0f) nrange = 1.0f;
|
if (nrange > 1.0f) nrange = 1.0f;
|
||||||
|
|
||||||
MainPed.Task.GoStraightTo(predictPosition);
|
MainPed.Task.GoStraightTo(predictPosition);
|
||||||
Function.Call(Hash.SET_PED_DESIRED_MOVE_BLEND_RATIO, MainPed.Handle, nrange);
|
Call(SET_PED_DESIRED_MOVE_BLEND_RATIO, MainPed.Handle, nrange);
|
||||||
}
|
}
|
||||||
|
|
||||||
_lastMoving = true;
|
_lastMoving = true;
|
||||||
@ -542,7 +542,7 @@ namespace RageCoop.Client
|
|||||||
if (!MainPed.IsRunning || range > 0.50f)
|
if (!MainPed.IsRunning || range > 0.50f)
|
||||||
{
|
{
|
||||||
MainPed.Task.RunTo(predictPosition, true);
|
MainPed.Task.RunTo(predictPosition, true);
|
||||||
Function.Call(Hash.SET_PED_DESIRED_MOVE_BLEND_RATIO, MainPed.Handle, 1.0f);
|
Call(SET_PED_DESIRED_MOVE_BLEND_RATIO, MainPed.Handle, 1.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
_lastMoving = true;
|
_lastMoving = true;
|
||||||
@ -550,10 +550,10 @@ namespace RageCoop.Client
|
|||||||
case 3:
|
case 3:
|
||||||
if (!MainPed.IsSprinting || range > 0.75f)
|
if (!MainPed.IsSprinting || range > 0.75f)
|
||||||
{
|
{
|
||||||
Function.Call(Hash.TASK_GO_STRAIGHT_TO_COORD, MainPed.Handle, predictPosition.X,
|
Call(TASK_GO_STRAIGHT_TO_COORD, MainPed.Handle, predictPosition.X,
|
||||||
predictPosition.Y, predictPosition.Z, 3.0f, -1, 0.0f, 0.0f);
|
predictPosition.Y, predictPosition.Z, 3.0f, -1, 0.0f, 0.0f);
|
||||||
Function.Call(Hash.SET_RUN_SPRINT_MULTIPLIER_FOR_PLAYER, MainPed.Handle, 1.49f);
|
Call(SET_RUN_SPRINT_MULTIPLIER_FOR_PLAYER, MainPed.Handle, 1.49f);
|
||||||
Function.Call(Hash.SET_PED_DESIRED_MOVE_BLEND_RATIO, MainPed.Handle, 1.0f);
|
Call(SET_PED_DESIRED_MOVE_BLEND_RATIO, MainPed.Handle, 1.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
_lastMoving = true;
|
_lastMoving = true;
|
||||||
@ -655,7 +655,7 @@ namespace RageCoop.Client
|
|||||||
(!MainPed.IsSittingInVehicle() && !MainPed.IsBeingJacked))
|
(!MainPed.IsSittingInVehicle() && !MainPed.IsBeingJacked))
|
||||||
MainPed.SetIntoVehicle(CurrentVehicle.MainVehicle, Seat);
|
MainPed.SetIntoVehicle(CurrentVehicle.MainVehicle, Seat);
|
||||||
if (MainPed.IsOnTurretSeat())
|
if (MainPed.IsOnTurretSeat())
|
||||||
Function.Call(Hash.TASK_VEHICLE_AIM_AT_COORD, MainPed.Handle, AimCoords.X, AimCoords.Y,
|
Call(TASK_VEHICLE_AIM_AT_COORD, MainPed.Handle, AimCoords.X, AimCoords.Y,
|
||||||
AimCoords.Z);
|
AimCoords.Z);
|
||||||
|
|
||||||
// Drive-by
|
// Drive-by
|
||||||
@ -663,12 +663,12 @@ namespace RageCoop.Client
|
|||||||
{
|
{
|
||||||
if (IsAiming)
|
if (IsAiming)
|
||||||
{
|
{
|
||||||
Function.Call(Hash.SET_DRIVEBY_TASK_TARGET, MainPed, 0, 0, AimCoords.X, AimCoords.Y,
|
Call(SET_DRIVEBY_TASK_TARGET, MainPed, 0, 0, AimCoords.X, AimCoords.Y,
|
||||||
AimCoords.Z);
|
AimCoords.Z);
|
||||||
if (!_lastDriveBy)
|
if (!_lastDriveBy)
|
||||||
{
|
{
|
||||||
_lastDriveBy = true;
|
_lastDriveBy = true;
|
||||||
Function.Call(Hash.TASK_DRIVE_BY, MainPed, 0, 0, AimCoords.X, AimCoords.Y, AimCoords.Z,
|
Call(TASK_DRIVE_BY, MainPed, 0, 0, AimCoords.X, AimCoords.Y, AimCoords.Z,
|
||||||
1, 100, 1, FiringPattern.SingleShot);
|
1, 100, 1, FiringPattern.SingleShot);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -125,7 +125,7 @@ namespace RageCoop.Client
|
|||||||
Position = (Owner.PacketTravelTime + 0.001f * LastSyncedStopWatch.ElapsedMilliseconds) * Shooter.Velocity +
|
Position = (Owner.PacketTravelTime + 0.001f * LastSyncedStopWatch.ElapsedMilliseconds) * Shooter.Velocity +
|
||||||
Position;
|
Position;
|
||||||
var end = Position + Velocity;
|
var end = Position + Velocity;
|
||||||
Function.Call(Hash.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY, Position.X, Position.Y, Position.Z,
|
Call(SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY, Position.X, Position.Y, Position.Z,
|
||||||
end.X, end.Y, end.Z, 0, 1, WeaponHash, owner?.Handle ?? 0, 1, 0, -1);
|
end.X, end.Y, end.Z, 0, 1, WeaponHash, owner?.Handle ?? 0, 1, 0, -1);
|
||||||
var ps = World.GetAllProjectiles();
|
var ps = World.GetAllProjectiles();
|
||||||
MainProjectile = ps[ps.Length - 1];
|
MainProjectile = ps[ps.Length - 1];
|
||||||
|
@ -48,11 +48,11 @@ namespace RageCoop.Client
|
|||||||
|
|
||||||
if (MainVehicle.IsOnFire)
|
if (MainVehicle.IsOnFire)
|
||||||
{
|
{
|
||||||
if (!Flags.HasVehFlag(VehicleDataFlags.IsOnFire)) Function.Call(Hash.STOP_ENTITY_FIRE, MainVehicle);
|
if (!Flags.HasVehFlag(VehicleDataFlags.IsOnFire)) Call(STOP_ENTITY_FIRE, MainVehicle);
|
||||||
}
|
}
|
||||||
else if (Flags.HasVehFlag(VehicleDataFlags.IsOnFire))
|
else if (Flags.HasVehFlag(VehicleDataFlags.IsOnFire))
|
||||||
{
|
{
|
||||||
Function.Call(Hash.START_ENTITY_FIRE, MainVehicle);
|
Call(START_ENTITY_FIRE, MainVehicle);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (EngineRunning != MainVehicle.IsEngineRunning) MainVehicle.IsEngineRunning = EngineRunning;
|
if (EngineRunning != MainVehicle.IsEngineRunning) MainVehicle.IsEngineRunning = EngineRunning;
|
||||||
@ -100,13 +100,13 @@ namespace RageCoop.Client
|
|||||||
if (!_lastTransformed)
|
if (!_lastTransformed)
|
||||||
{
|
{
|
||||||
_lastTransformed = true;
|
_lastTransformed = true;
|
||||||
Function.Call(Hash.TRANSFORM_TO_SUBMARINE, MainVehicle.Handle, false);
|
Call(TRANSFORM_TO_SUBMARINE, MainVehicle.Handle, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (_lastTransformed)
|
else if (_lastTransformed)
|
||||||
{
|
{
|
||||||
_lastTransformed = false;
|
_lastTransformed = false;
|
||||||
Function.Call(Hash.TRANSFORM_TO_CAR, MainVehicle.Handle, false);
|
Call(TRANSFORM_TO_CAR, MainVehicle.Handle, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (IsDeluxo)
|
else if (IsDeluxo)
|
||||||
@ -115,7 +115,7 @@ namespace RageCoop.Client
|
|||||||
if (IsDeluxoHovering) MainVehicle.SetDeluxoWingRatio(DeluxoWingRatio);
|
if (IsDeluxoHovering) MainVehicle.SetDeluxoWingRatio(DeluxoWingRatio);
|
||||||
}
|
}
|
||||||
|
|
||||||
Function.Call(Hash.SET_VEHICLE_BRAKE_LIGHTS, MainVehicle.Handle, BrakeLightsOn);
|
Call(SET_VEHICLE_BRAKE_LIGHTS, MainVehicle.Handle, BrakeLightsOn);
|
||||||
}
|
}
|
||||||
|
|
||||||
MainVehicle.LockStatus = LockStatus;
|
MainVehicle.LockStatus = LockStatus;
|
||||||
@ -125,7 +125,7 @@ namespace RageCoop.Client
|
|||||||
if (Flags.HasVehFlag(VehicleDataFlags.Repaired)) MainVehicle.Repair();
|
if (Flags.HasVehFlag(VehicleDataFlags.Repaired)) MainVehicle.Repair();
|
||||||
if (Colors != null && Colors != _lastVehicleColors)
|
if (Colors != null && Colors != _lastVehicleColors)
|
||||||
{
|
{
|
||||||
Function.Call(Hash.SET_VEHICLE_COLOURS, MainVehicle, Colors[0], Colors[1]);
|
Call(SET_VEHICLE_COLOURS, MainVehicle, Colors[0], Colors[1]);
|
||||||
|
|
||||||
_lastVehicleColors = Colors;
|
_lastVehicleColors = Colors;
|
||||||
}
|
}
|
||||||
@ -133,19 +133,19 @@ namespace RageCoop.Client
|
|||||||
MainVehicle.EngineHealth = EngineHealth;
|
MainVehicle.EngineHealth = EngineHealth;
|
||||||
if (Mods != null && !Mods.Compare(_lastVehicleMods))
|
if (Mods != null && !Mods.Compare(_lastVehicleMods))
|
||||||
{
|
{
|
||||||
Function.Call(Hash.SET_VEHICLE_MOD_KIT, MainVehicle, 0);
|
Call(SET_VEHICLE_MOD_KIT, MainVehicle, 0);
|
||||||
|
|
||||||
foreach (var mod in Mods) MainVehicle.Mods[(VehicleModType)mod.Key].Index = mod.Value;
|
foreach (var mod in Mods) MainVehicle.Mods[(VehicleModType)mod.Key].Index = mod.Value;
|
||||||
|
|
||||||
_lastVehicleMods = Mods;
|
_lastVehicleMods = Mods;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Function.Call<string>(Hash.GET_VEHICLE_NUMBER_PLATE_TEXT, MainVehicle) != LicensePlate)
|
if (Call<string>(GET_VEHICLE_NUMBER_PLATE_TEXT, MainVehicle) != LicensePlate)
|
||||||
Function.Call(Hash.SET_VEHICLE_NUMBER_PLATE_TEXT, MainVehicle, LicensePlate);
|
Call(SET_VEHICLE_NUMBER_PLATE_TEXT, MainVehicle, LicensePlate);
|
||||||
|
|
||||||
if (_lastLivery != Livery)
|
if (_lastLivery != Livery)
|
||||||
{
|
{
|
||||||
Function.Call(Hash.SET_VEHICLE_LIVERY, MainVehicle, Livery);
|
Call(SET_VEHICLE_LIVERY, MainVehicle, Livery);
|
||||||
_lastLivery = Livery;
|
_lastLivery = Livery;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -295,7 +295,7 @@ namespace RageCoop.Client
|
|||||||
private void StartPedalingAnim(bool fast)
|
private void StartPedalingAnim(bool fast)
|
||||||
{
|
{
|
||||||
MainVehicle.Driver?.Task.PlayAnimation(PedalingAnimDict(), PedalingAnimName(fast), 8.0f, -8.0f, -1,
|
MainVehicle.Driver?.Task.PlayAnimation(PedalingAnimDict(), PedalingAnimName(fast), 8.0f, -8.0f, -1,
|
||||||
AnimationFlags.Loop | AnimationFlags.AllowRotation, 1.0f);
|
AnimationFlags.Loop | AnimationFlags.Secondary, 1.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void StopPedalingAnim(bool fast)
|
private void StopPedalingAnim(bool fast)
|
||||||
|
@ -100,7 +100,7 @@ namespace RageCoop.Client
|
|||||||
{
|
{
|
||||||
var p = Game.Player.Character;
|
var p = Game.Player.Character;
|
||||||
// var clipset=p.Gender==Gender.Male? "MOVE_M@TOUGH_GUY@" : "MOVE_F@TOUGH_GUY@";
|
// var clipset=p.Gender==Gender.Male? "MOVE_M@TOUGH_GUY@" : "MOVE_F@TOUGH_GUY@";
|
||||||
// Function.Call(Hash.SET_PED_MOVEMENT_CLIPSET,p,clipset,1f);
|
// Call(SET_PED_MOVEMENT_CLIPSET,p,clipset,1f);
|
||||||
var player = GetPedByID(Main.LocalPlayerID);
|
var player = GetPedByID(Main.LocalPlayerID);
|
||||||
if (player == null)
|
if (player == null)
|
||||||
{
|
{
|
||||||
@ -297,19 +297,23 @@ namespace RageCoop.Client
|
|||||||
public static void DoSync()
|
public static void DoSync()
|
||||||
{
|
{
|
||||||
UpdateTargets();
|
UpdateTargets();
|
||||||
|
|
||||||
#if BENCHMARK
|
#if BENCHMARK
|
||||||
PerfCounter.Restart();
|
PerfCounter.Restart();
|
||||||
Debug.TimeStamps[TimeStamp.CheckProjectiles] = PerfCounter.ElapsedTicks;
|
Debug.TimeStamps[TimeStamp.CheckProjectiles] = PerfCounter.ElapsedTicks;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
var allPeds = World.GetAllPeds();
|
var allPeds = World.GetAllPeds();
|
||||||
var allVehicles = World.GetAllVehicles();
|
var allVehicles = World.GetAllVehicles();
|
||||||
var allProjectiles = World.GetAllProjectiles();
|
var allProjectiles = World.GetAllProjectiles();
|
||||||
vehStatesPerFrame = allVehicles.Length * 2 / (int)Game.FPS + 1;
|
vehStatesPerFrame = allVehicles.Length * 2 / (int)Main.FPS + 1;
|
||||||
pedStatesPerFrame = allPeds.Length * 2 / (int)Game.FPS + 1;
|
pedStatesPerFrame = allPeds.Length * 2 / (int)Main.FPS + 1;
|
||||||
|
|
||||||
#if BENCHMARK
|
#if BENCHMARK
|
||||||
Debug.TimeStamps[TimeStamp.GetAllEntities] = PerfCounter.ElapsedTicks;
|
Debug.TimeStamps[TimeStamp.GetAllEntities] = PerfCounter.ElapsedTicks;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
lock (ProjectilesLock)
|
lock (ProjectilesLock)
|
||||||
{
|
{
|
||||||
foreach (var p in allProjectiles)
|
foreach (var p in allProjectiles)
|
||||||
@ -338,6 +342,7 @@ namespace RageCoop.Client
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
i = -1;
|
i = -1;
|
||||||
|
|
||||||
lock (PedsLock)
|
lock (PedsLock)
|
||||||
@ -514,8 +519,8 @@ namespace RageCoop.Client
|
|||||||
|
|
||||||
private static void SetBudget(int b)
|
private static void SetBudget(int b)
|
||||||
{
|
{
|
||||||
Function.Call(Hash.SET_PED_POPULATION_BUDGET, b); // 0 - 3
|
Call(SET_PED_POPULATION_BUDGET, b); // 0 - 3
|
||||||
Function.Call(Hash.SET_VEHICLE_POPULATION_BUDGET, b); // 0 - 3
|
Call(SET_VEHICLE_POPULATION_BUDGET, b); // 0 - 3
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string DumpDebug()
|
public static string DumpDebug()
|
||||||
|
@ -5,6 +5,7 @@ namespace RageCoop.Client
|
|||||||
{
|
{
|
||||||
internal static class Voice
|
internal static class Voice
|
||||||
{
|
{
|
||||||
|
private static bool _stopping = false;
|
||||||
private static WaveInEvent _waveIn;
|
private static WaveInEvent _waveIn;
|
||||||
|
|
||||||
private static readonly BufferedWaveProvider _waveProvider =
|
private static readonly BufferedWaveProvider _waveProvider =
|
||||||
@ -30,7 +31,8 @@ namespace RageCoop.Client
|
|||||||
|
|
||||||
if (_thread != null && _thread.IsAlive)
|
if (_thread != null && _thread.IsAlive)
|
||||||
{
|
{
|
||||||
_thread.Abort();
|
_stopping = true;
|
||||||
|
_thread.Join();
|
||||||
_thread = null;
|
_thread = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -51,9 +53,9 @@ namespace RageCoop.Client
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// I tried without thread but the game will lag without
|
// I tried without thread but the game will lag without
|
||||||
_thread = new Thread(() =>
|
_thread = ThreadManager.CreateThread(() =>
|
||||||
{
|
{
|
||||||
while (true)
|
while (!_stopping && !Main.IsUnloading)
|
||||||
using (var wo = new WaveOutEvent())
|
using (var wo = new WaveOutEvent())
|
||||||
{
|
{
|
||||||
wo.Init(_waveProvider);
|
wo.Init(_waveProvider);
|
||||||
@ -61,8 +63,7 @@ namespace RageCoop.Client
|
|||||||
|
|
||||||
while (wo.PlaybackState == PlaybackState.Playing) Thread.Sleep(100);
|
while (wo.PlaybackState == PlaybackState.Playing) Thread.Sleep(100);
|
||||||
}
|
}
|
||||||
});
|
},"Voice");
|
||||||
_thread.Start();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void StartRecording()
|
public static void StartRecording()
|
||||||
|
77
Client/Scripts/ThreadManager.cs
Normal file
77
Client/Scripts/ThreadManager.cs
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
using RageCoop.Client.Scripting;
|
||||||
|
using RageCoop.Core;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading;
|
||||||
|
|
||||||
|
namespace RageCoop.Client
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Needed to properly stop all thread when the module unloads
|
||||||
|
/// </summary>
|
||||||
|
internal static class ThreadManager
|
||||||
|
{
|
||||||
|
private static List<Thread> _threads = new();
|
||||||
|
private static Thread _watcher = new(() => _removeStopped());
|
||||||
|
private static void _removeStopped()
|
||||||
|
{
|
||||||
|
while (!Main.IsUnloading)
|
||||||
|
{
|
||||||
|
lock (_threads)
|
||||||
|
{
|
||||||
|
_threads.RemoveAll(t => !t.IsAlive);
|
||||||
|
}
|
||||||
|
Thread.Sleep(1000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static Thread CreateThread(Action callback, string name = "CoopThread", bool startNow = true)
|
||||||
|
{
|
||||||
|
lock (_threads)
|
||||||
|
{
|
||||||
|
var created = new Thread(() =>
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
catch (ThreadInterruptedException) { }
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Main.Logger.Error($"Unhandled exception caught in thread {Environment.CurrentManagedThreadId}", ex);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
Main.Logger.Debug($"Thread stopped: " + Environment.CurrentManagedThreadId);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
created.Name = name;
|
||||||
|
Main.Logger.Debug($"Thread created: {name}, id: {created.ManagedThreadId}");
|
||||||
|
_threads.Add(created);
|
||||||
|
if (startNow) created.Start();
|
||||||
|
return created;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void OnUnload()
|
||||||
|
{
|
||||||
|
lock (_threads)
|
||||||
|
{
|
||||||
|
foreach (var thread in _threads)
|
||||||
|
{
|
||||||
|
if (thread.IsAlive)
|
||||||
|
{
|
||||||
|
Main.Logger.Debug($"Waiting for thread {thread.ManagedThreadId} to stop");
|
||||||
|
// thread.Interrupt(); PlatformNotSupportedException ?
|
||||||
|
thread.Join();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_threads.Clear();
|
||||||
|
_threads = null;
|
||||||
|
_watcher.Join();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
7
Client/Scripts/Trimming.xml
Normal file
7
Client/Scripts/Trimming.xml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<linker>
|
||||||
|
<assembly fullname="RageCoop.Client" preserve="all" />
|
||||||
|
<assembly fullname="RageCoop.Core" preserve="all" />
|
||||||
|
<assembly fullname="System.Collections">
|
||||||
|
<type fullname="System.Collections.Generic.List`1" preserve="all" />
|
||||||
|
</assembly>
|
||||||
|
</linker>
|
@ -4,7 +4,7 @@ using System.Runtime.InteropServices;
|
|||||||
using GTA;
|
using GTA;
|
||||||
using GTA.Math;
|
using GTA.Math;
|
||||||
using RageCoop.Core;
|
using RageCoop.Core;
|
||||||
using SHVDN;
|
using NativeMemory = SHVDN.NativeMemory;
|
||||||
|
|
||||||
namespace RageCoop.Client
|
namespace RageCoop.Client
|
||||||
{
|
{
|
||||||
|
@ -93,7 +93,7 @@ namespace RageCoop.Client
|
|||||||
var num1 = new OutputArgument();
|
var num1 = new OutputArgument();
|
||||||
var num2 = new OutputArgument();
|
var num2 = new OutputArgument();
|
||||||
|
|
||||||
if (!Function.Call<bool>(Hash.GET_SCREEN_COORD_FROM_WORLD_COORD, worldCoords.X, worldCoords.Y,
|
if (!Call<bool>(GET_SCREEN_COORD_FROM_WORLD_COORD, worldCoords.X, worldCoords.Y,
|
||||||
worldCoords.Z, num1, num2))
|
worldCoords.Z, num1, num2))
|
||||||
{
|
{
|
||||||
screenCoords = new Vector2();
|
screenCoords = new Vector2();
|
||||||
@ -106,13 +106,13 @@ namespace RageCoop.Client
|
|||||||
|
|
||||||
public static void StayInCover(this Ped p)
|
public static void StayInCover(this Ped p)
|
||||||
{
|
{
|
||||||
Function.Call(Hash.TASK_STAY_IN_COVER, p);
|
Call(TASK_STAY_IN_COVER, p);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool IsTurretSeat(this Vehicle veh, int seat)
|
public static bool IsTurretSeat(this Vehicle veh, int seat)
|
||||||
{
|
{
|
||||||
if (Function.Call<bool>(Hash.IS_TURRET_SEAT, veh, seat)) return true;
|
if (Call<bool>(IS_TURRET_SEAT, veh, seat)) return true;
|
||||||
if (!Function.Call<bool>(Hash.DOES_VEHICLE_HAVE_WEAPONS, veh.Handle)) return false;
|
if (!Call<bool>(DOES_VEHICLE_HAVE_WEAPONS, veh.Handle)) return false;
|
||||||
|
|
||||||
switch (seat)
|
switch (seat)
|
||||||
{
|
{
|
||||||
@ -177,9 +177,9 @@ namespace RageCoop.Client
|
|||||||
var result = new byte[36];
|
var result = new byte[36];
|
||||||
for (byte i = 0; i < 12; i++)
|
for (byte i = 0; i < 12; i++)
|
||||||
{
|
{
|
||||||
result[i] = (byte)Function.Call<short>(Hash.GET_PED_DRAWABLE_VARIATION, ped.Handle, i);
|
result[i] = (byte)Call<short>(GET_PED_DRAWABLE_VARIATION, ped.Handle, i);
|
||||||
result[i + 12] = (byte)Function.Call<short>(Hash.GET_PED_TEXTURE_VARIATION, ped.Handle, i);
|
result[i + 12] = (byte)Call<short>(GET_PED_TEXTURE_VARIATION, ped.Handle, i);
|
||||||
result[i + 24] = (byte)Function.Call<short>(Hash.GET_PED_PALETTE_VARIATION, ped.Handle, i);
|
result[i + 24] = (byte)Call<short>(GET_PED_PALETTE_VARIATION, ped.Handle, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
@ -214,13 +214,13 @@ namespace RageCoop.Client
|
|||||||
{
|
{
|
||||||
flags |= PedDataFlags.IsInCover;
|
flags |= PedDataFlags.IsInCover;
|
||||||
if (ped.IsInCoverFacingLeft) flags |= PedDataFlags.IsInCover;
|
if (ped.IsInCoverFacingLeft) flags |= PedDataFlags.IsInCover;
|
||||||
if (!Function.Call<bool>(Hash.IS_PED_IN_HIGH_COVER, ped)) flags |= PedDataFlags.IsInLowCover;
|
if (!Call<bool>(IS_PED_IN_HIGH_COVER, ped)) flags |= PedDataFlags.IsInLowCover;
|
||||||
if (ped.IsTaskActive(TaskType.CTaskAimGunBlindFire)) flags |= PedDataFlags.IsBlindFiring;
|
if (ped.IsTaskActive(TaskType.CTaskAimGunBlindFire)) flags |= PedDataFlags.IsBlindFiring;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ped.IsInvincible) flags |= PedDataFlags.IsInvincible;
|
if (ped.IsInvincible) flags |= PedDataFlags.IsInvincible;
|
||||||
|
|
||||||
if (Function.Call<bool>(Hash.GET_PED_STEALTH_MOVEMENT, ped)) flags |= PedDataFlags.IsInStealthMode;
|
if (Call<bool>(GET_PED_STEALTH_MOVEMENT, ped)) flags |= PedDataFlags.IsInStealthMode;
|
||||||
|
|
||||||
|
|
||||||
return flags;
|
return flags;
|
||||||
@ -315,32 +315,29 @@ namespace RageCoop.Client
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static Dictionary<string, int> _vehicleDoors=new()
|
||||||
|
{
|
||||||
|
{ "door_dside_f", -1 },
|
||||||
|
{ "door_pside_f", 0 },
|
||||||
|
{ "door_dside_r", 1 },
|
||||||
|
{ "door_pside_r", 2 }
|
||||||
|
};
|
||||||
public static VehicleSeat GetNearestSeat(this Ped ped, Vehicle veh, float distanceToignoreDoors = 50f)
|
public static VehicleSeat GetNearestSeat(this Ped ped, Vehicle veh, float distanceToignoreDoors = 50f)
|
||||||
{
|
{
|
||||||
var num = 99f;
|
var num = 99f;
|
||||||
var result = -2;
|
var result = -2;
|
||||||
var dictionary = new Dictionary<string, int>();
|
foreach (var text in _vehicleDoors.Keys)
|
||||||
dictionary.Add("door_dside_f", -1);
|
|
||||||
dictionary.Add("door_pside_f", 0);
|
|
||||||
dictionary.Add("door_dside_r", 1);
|
|
||||||
dictionary.Add("door_pside_r", 2);
|
|
||||||
foreach (var text in dictionary.Keys)
|
|
||||||
{
|
{
|
||||||
var flag = veh.Bones[text].Position != Vector3.Zero;
|
var flag = veh.Bones[text].Position != Vector3.Zero;
|
||||||
if (flag)
|
if (flag)
|
||||||
{
|
{
|
||||||
var num2 = ped.Position.DistanceTo(Function.Call<Vector3>(Hash.GET_WORLD_POSITION_OF_ENTITY_BONE,
|
var num2 = ped.Position.DistanceTo(Call<Vector3>(GET_WORLD_POSITION_OF_ENTITY_BONE, veh, veh.Bones[text].Index));
|
||||||
new InputArgument[]
|
|
||||||
{
|
|
||||||
veh,
|
|
||||||
veh.Bones[text].Index
|
|
||||||
}));
|
|
||||||
var flag2 = num2 < distanceToignoreDoors && num2 < num &&
|
var flag2 = num2 < distanceToignoreDoors && num2 < num &&
|
||||||
IsSeatUsableByPed(ped, veh, dictionary[text]);
|
IsSeatUsableByPed(ped, veh, _vehicleDoors[text]);
|
||||||
if (flag2)
|
if (flag2)
|
||||||
{
|
{
|
||||||
num = num2;
|
num = num2;
|
||||||
result = dictionary[text];
|
result = _vehicleDoors[text];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -366,11 +363,7 @@ namespace RageCoop.Client
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var num = Function.Call<int>(Hash.GET_RELATIONSHIP_BETWEEN_PEDS, new InputArgument[]
|
var num = Call<int>(GET_RELATIONSHIP_BETWEEN_PEDS, ped, veh.GetPedOnSeat(seat));
|
||||||
{
|
|
||||||
ped,
|
|
||||||
veh.GetPedOnSeat(seat)
|
|
||||||
});
|
|
||||||
var flag2 = num > 2;
|
var flag2 = num > 2;
|
||||||
if (flag2) result = true;
|
if (flag2) result = true;
|
||||||
}
|
}
|
||||||
@ -381,7 +374,7 @@ namespace RageCoop.Client
|
|||||||
|
|
||||||
public static bool IsTaskActive(this Ped p, TaskType task)
|
public static bool IsTaskActive(this Ped p, TaskType task)
|
||||||
{
|
{
|
||||||
return Function.Call<bool>(Hash.GET_IS_TASK_ACTIVE, p.Handle, task);
|
return Call<bool>(GET_IS_TASK_ACTIVE, p.Handle, task);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Vector3 GetAimCoord(this Ped p)
|
public static Vector3 GetAimCoord(this Ped p)
|
||||||
@ -408,7 +401,7 @@ namespace RageCoop.Client
|
|||||||
|
|
||||||
public static Vector3 GetLookingCoord(this Ped p)
|
public static Vector3 GetLookingCoord(this Ped p)
|
||||||
{
|
{
|
||||||
if (p == Main.P && Function.Call<int>(Hash.GET_FOLLOW_PED_CAM_VIEW_MODE) == 4)
|
if (p == Main.P && Call<int>(GET_FOLLOW_PED_CAM_VIEW_MODE) == 4)
|
||||||
return RaycastEverything(default);
|
return RaycastEverything(default);
|
||||||
EntityBone b = p.Bones[Bone.FacialForehead];
|
EntityBone b = p.Bones[Bone.FacialForehead];
|
||||||
var v = b.UpVector.Normalized;
|
var v = b.UpVector.Normalized;
|
||||||
@ -417,7 +410,7 @@ namespace RageCoop.Client
|
|||||||
|
|
||||||
public static VehicleSeat GetSeatTryingToEnter(this Ped p)
|
public static VehicleSeat GetSeatTryingToEnter(this Ped p)
|
||||||
{
|
{
|
||||||
return (VehicleSeat)Function.Call<int>(Hash.GET_SEAT_PED_IS_TRYING_TO_ENTER, p);
|
return (VehicleSeat)Call<int>(GET_SEAT_PED_IS_TRYING_TO_ENTER, p);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -67,23 +67,6 @@ namespace RageCoop.Client
|
|||||||
return b.ForwardVector.ToEulerRotation(b.UpVector);
|
return b.ForwardVector.ToEulerRotation(b.UpVector);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void StartUpCheck()
|
|
||||||
{
|
|
||||||
if (AppDomain.CurrentDomain.GetData("RageCoop.Client.LoaderContext") == null)
|
|
||||||
{
|
|
||||||
var error = "Client not loaded with loader, please re-install using the installer to fix this issue";
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Notification.Show("~r~" + error);
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
throw new Exception(error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void DrawTextFromCoord(Vector3 coord, string text, float scale = 0.5f, Point offset = default)
|
public static void DrawTextFromCoord(Vector3 coord, string text, float scale = 0.5f, Point offset = default)
|
||||||
{
|
{
|
||||||
Point toDraw = default;
|
Point toDraw = default;
|
||||||
@ -106,7 +89,7 @@ namespace RageCoop.Client
|
|||||||
unsafe
|
unsafe
|
||||||
{
|
{
|
||||||
var res = ResolutionMaintainRatio;
|
var res = ResolutionMaintainRatio;
|
||||||
if (Function.Call<bool>(Hash.GET_SCREEN_COORD_FROM_WORLD_COORD, pos.X, pos.Y, pos.Z, &x, &y))
|
if (Call<bool>(GET_SCREEN_COORD_FROM_WORLD_COORD, pos.X, pos.Y, pos.Z, &x, &y))
|
||||||
{
|
{
|
||||||
screenPos = new Point((int)(res.Width * x), (int)(y * 1080));
|
screenPos = new Point((int)(res.Width * x), (int)(y * 1080));
|
||||||
return true;
|
return true;
|
||||||
@ -157,28 +140,28 @@ namespace RageCoop.Client
|
|||||||
public static Vehicle CreateVehicle(Model model, Vector3 position, float heading = 0f)
|
public static Vehicle CreateVehicle(Model model, Vector3 position, float heading = 0f)
|
||||||
{
|
{
|
||||||
if (!model.IsLoaded) return null;
|
if (!model.IsLoaded) return null;
|
||||||
return (Vehicle)Entity.FromHandle(Function.Call<int>(Hash.CREATE_VEHICLE, model.Hash, position.X,
|
return (Vehicle)Entity.FromHandle(Call<int>(CREATE_VEHICLE, model.Hash, position.X,
|
||||||
position.Y, position.Z, heading, false, false));
|
position.Y, position.Z, heading, false, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Ped CreatePed(Model model, Vector3 position, float heading = 0f)
|
public static Ped CreatePed(Model model, Vector3 position, float heading = 0f)
|
||||||
{
|
{
|
||||||
if (!model.IsLoaded) return null;
|
if (!model.IsLoaded) return null;
|
||||||
return (Ped)Entity.FromHandle(Function.Call<int>(Hash.CREATE_PED, 26, model.Hash, position.X, position.Y,
|
return (Ped)Entity.FromHandle(Call<int>(CREATE_PED, 26, model.Hash, position.X, position.Y,
|
||||||
position.Z, heading, false, false));
|
position.Z, heading, false, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void SetOnFire(this Entity e, bool toggle)
|
public static void SetOnFire(this Entity e, bool toggle)
|
||||||
{
|
{
|
||||||
if (toggle)
|
if (toggle)
|
||||||
Function.Call(Hash.START_ENTITY_FIRE, e.Handle);
|
Call(START_ENTITY_FIRE, e.Handle);
|
||||||
else
|
else
|
||||||
Function.Call(Hash.STOP_ENTITY_FIRE, e.Handle);
|
Call(STOP_ENTITY_FIRE, e.Handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void SetFrozen(this Entity e, bool toggle)
|
public static void SetFrozen(this Entity e, bool toggle)
|
||||||
{
|
{
|
||||||
Function.Call(Hash.FREEZE_ENTITY_POSITION, e, toggle);
|
Call(FREEZE_ENTITY_POSITION, e, toggle);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static SyncedPed GetSyncEntity(this Ped p)
|
public static SyncedPed GetSyncEntity(this Ped p)
|
||||||
@ -200,18 +183,18 @@ namespace RageCoop.Client
|
|||||||
public static void ApplyForce(this Entity e, int boneIndex, Vector3 direction, Vector3 rotation = default,
|
public static void ApplyForce(this Entity e, int boneIndex, Vector3 direction, Vector3 rotation = default,
|
||||||
ForceType forceType = ForceType.MaxForceRot2)
|
ForceType forceType = ForceType.MaxForceRot2)
|
||||||
{
|
{
|
||||||
Function.Call(Hash.APPLY_FORCE_TO_ENTITY, e.Handle, forceType, direction.X, direction.Y, direction.Z,
|
Call(APPLY_FORCE_TO_ENTITY, e.Handle, forceType, direction.X, direction.Y, direction.Z,
|
||||||
rotation.X, rotation.Y, rotation.Z, boneIndex, false, true, true, false, true);
|
rotation.X, rotation.Y, rotation.Z, boneIndex, false, true, true, false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static byte GetPlayerRadioIndex()
|
public static byte GetPlayerRadioIndex()
|
||||||
{
|
{
|
||||||
return (byte)Function.Call<int>(Hash.GET_PLAYER_RADIO_STATION_INDEX);
|
return (byte)Call<int>(GET_PLAYER_RADIO_STATION_INDEX);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void SetPlayerRadioIndex(int index)
|
public static void SetPlayerRadioIndex(int index)
|
||||||
{
|
{
|
||||||
Function.Call(Hash.SET_RADIO_TO_STATION_INDEX, index);
|
Call(SET_RADIO_TO_STATION_INDEX, index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -27,9 +27,9 @@ namespace RageCoop.Client
|
|||||||
|
|
||||||
if (veh.IsDead) flags |= VehicleDataFlags.IsDead;
|
if (veh.IsDead) flags |= VehicleDataFlags.IsDead;
|
||||||
|
|
||||||
if (Function.Call<bool>(Hash.IS_HORN_ACTIVE, veh.Handle)) flags |= VehicleDataFlags.IsHornActive;
|
if (Call<bool>(IS_HORN_ACTIVE, veh.Handle)) flags |= VehicleDataFlags.IsHornActive;
|
||||||
|
|
||||||
if (v.IsSubmarineCar && Function.Call<bool>(Hash.IS_VEHICLE_IN_SUBMARINE_MODE, veh.Handle))
|
if (v.IsSubmarineCar && Call<bool>(IS_VEHICLE_IN_SUBMARINE_MODE, veh.Handle))
|
||||||
flags |= VehicleDataFlags.IsTransformed;
|
flags |= VehicleDataFlags.IsTransformed;
|
||||||
|
|
||||||
if (v.IsAircraft) flags |= VehicleDataFlags.IsAircraft;
|
if (v.IsAircraft) flags |= VehicleDataFlags.IsAircraft;
|
||||||
@ -150,7 +150,7 @@ namespace RageCoop.Client
|
|||||||
|
|
||||||
public static void SetDeluxoHoverState(this Vehicle deluxo, bool hover)
|
public static void SetDeluxoHoverState(this Vehicle deluxo, bool hover)
|
||||||
{
|
{
|
||||||
Function.Call(Hash.SET_SPECIAL_FLIGHT_MODE_TARGET_RATIO, deluxo, hover ? 1f : 0f);
|
Call(SET_SPECIAL_FLIGHT_MODE_TARGET_RATIO, deluxo, hover ? 1f : 0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool IsDeluxoHovering(this Vehicle deluxo)
|
public static bool IsDeluxoHovering(this Vehicle deluxo)
|
||||||
@ -160,7 +160,7 @@ namespace RageCoop.Client
|
|||||||
|
|
||||||
public static void SetDeluxoWingRatio(this Vehicle v, float ratio)
|
public static void SetDeluxoWingRatio(this Vehicle v, float ratio)
|
||||||
{
|
{
|
||||||
Function.Call(Hash.SET_HOVER_MODE_WING_RATIO, v, ratio);
|
Call(SET_HOVER_MODE_WING_RATIO, v, ratio);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static float GetDeluxoWingRatio(this Vehicle v)
|
public static float GetDeluxoWingRatio(this Vehicle v)
|
||||||
@ -170,7 +170,7 @@ namespace RageCoop.Client
|
|||||||
|
|
||||||
public static float GetNozzleAngel(this Vehicle plane)
|
public static float GetNozzleAngel(this Vehicle plane)
|
||||||
{
|
{
|
||||||
return Function.Call<float>(Hash.GET_VEHICLE_FLIGHT_NOZZLE_POSITION, plane);
|
return Call<float>(GET_VEHICLE_FLIGHT_NOZZLE_POSITION, plane);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool HasNozzle(this Vehicle v)
|
public static bool HasNozzle(this Vehicle v)
|
||||||
@ -199,7 +199,7 @@ namespace RageCoop.Client
|
|||||||
|
|
||||||
public static void SetNozzleAngel(this Vehicle plane, float ratio)
|
public static void SetNozzleAngel(this Vehicle plane, float ratio)
|
||||||
{
|
{
|
||||||
Function.Call(Hash.SET_VEHICLE_FLIGHT_NOZZLE_POSITION, plane, ratio);
|
Call(SET_VEHICLE_FLIGHT_NOZZLE_POSITION, plane, ratio);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -6,7 +6,6 @@ using GTA.Native;
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using RageCoop.Client.Scripting;
|
using RageCoop.Client.Scripting;
|
||||||
using RageCoop.Core;
|
using RageCoop.Core;
|
||||||
using static RageCoop.Client.Shared;
|
|
||||||
|
|
||||||
namespace RageCoop.Client
|
namespace RageCoop.Client
|
||||||
{
|
{
|
||||||
@ -35,7 +34,7 @@ namespace RageCoop.Client
|
|||||||
if (File.Exists(WeaponFixDataPath))
|
if (File.Exists(WeaponFixDataPath))
|
||||||
WeaponFix = JsonConvert.DeserializeObject<WeaponFix>(File.ReadAllText(WeaponFixDataPath));
|
WeaponFix = JsonConvert.DeserializeObject<WeaponFix>(File.ReadAllText(WeaponFixDataPath));
|
||||||
else
|
else
|
||||||
API.Logger.Warning("Weapon fix data not found");
|
Main.Logger.Warning("Weapon fix data not found");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void DumpWeaponFix(string path)
|
public static void DumpWeaponFix(string path)
|
||||||
@ -47,14 +46,14 @@ namespace RageCoop.Client
|
|||||||
var fix = new WeaponFix();
|
var fix = new WeaponFix();
|
||||||
foreach (var w in Weapons)
|
foreach (var w in Weapons)
|
||||||
{
|
{
|
||||||
Console.Info("Testing " + w.Value.Name);
|
Console.PrintInfo("Testing " + w.Value.Name);
|
||||||
if (w.Value.FireType != "PROJECTILE")
|
if (w.Value.FireType != "PROJECTILE")
|
||||||
{
|
{
|
||||||
var asset = new WeaponAsset(w.Key);
|
var asset = new WeaponAsset(w.Key);
|
||||||
asset.Request(1000);
|
asset.Request(1000);
|
||||||
World.ShootBullet(pos, pos + Vector3.WorldUp, P, asset, 0, 1000);
|
World.ShootBullet(pos, pos + Vector3.WorldUp, P, asset, 0, 1000);
|
||||||
if (!Function.Call<bool>(Hash.IS_BULLET_IN_AREA, pos.X, pos.Y, pos.Z, 10f, true) &&
|
if (!Call<bool>(IS_BULLET_IN_AREA, pos.X, pos.Y, pos.Z, 10f, true) &&
|
||||||
!Function.Call<bool>(Hash.IS_PROJECTILE_IN_AREA, pos.X - 10, pos.Y - 10, pos.Z - 10, pos.X + 10,
|
!Call<bool>(IS_PROJECTILE_IN_AREA, pos.X - 10, pos.Y - 10, pos.Z - 10, pos.X + 10,
|
||||||
pos.Y + 10, pos.Z + 10, true))
|
pos.Y + 10, pos.Z + 10, true))
|
||||||
switch (w.Value.DamageType)
|
switch (w.Value.DamageType)
|
||||||
{
|
{
|
||||||
@ -112,7 +111,7 @@ namespace RageCoop.Client
|
|||||||
public static float GetWeaponDamage(this Ped P, uint hash)
|
public static float GetWeaponDamage(this Ped P, uint hash)
|
||||||
{
|
{
|
||||||
var comp = P.Weapons.Current.Components.GetSuppressorComponent();
|
var comp = P.Weapons.Current.Components.GetSuppressorComponent();
|
||||||
return Function.Call<float>(Hash.GET_WEAPON_DAMAGE, hash,
|
return Call<float>(GET_WEAPON_DAMAGE, hash,
|
||||||
comp.Active ? comp.ComponentHash : WeaponComponentHash.Invalid);
|
comp.Active ? comp.ComponentHash : WeaponComponentHash.Invalid);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -194,7 +193,7 @@ namespace RageCoop.Client
|
|||||||
|
|
||||||
public static WeaponGroup GetWeaponGroup(this WeaponHash hash)
|
public static WeaponGroup GetWeaponGroup(this WeaponHash hash)
|
||||||
{
|
{
|
||||||
return Function.Call<WeaponGroup>(Hash.GET_WEAPONTYPE_GROUP, hash);
|
return Call<WeaponGroup>(GET_WEAPONTYPE_GROUP, hash);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -12,8 +12,7 @@ namespace RageCoop.Client
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Don't use it!
|
/// Don't use it!
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[ScriptAttributes(Author = "RageCoop", NoDefaultInstance = false,
|
[ScriptAttributes(Author = "RageCoop", SupportURL = "https://github.com/RAGECOOP/RAGECOOP-V")]
|
||||||
SupportURL = "https://github.com/RAGECOOP/RAGECOOP-V")]
|
|
||||||
internal class WorldThread : Script
|
internal class WorldThread : Script
|
||||||
{
|
{
|
||||||
public static Script Instance;
|
public static Script Instance;
|
||||||
@ -26,14 +25,22 @@ namespace RageCoop.Client
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public WorldThread()
|
public WorldThread()
|
||||||
{
|
{
|
||||||
Util.StartUpCheck();
|
|
||||||
Instance = this;
|
Instance = this;
|
||||||
Tick += OnTick;
|
Aborted += (e) => { DoQueuedActions(); ChangeTraffic(true); };
|
||||||
Aborted += (sender, e) => { ChangeTraffic(true); };
|
|
||||||
}
|
}
|
||||||
|
protected override void OnStart()
|
||||||
private void OnTick(object sender, EventArgs e)
|
|
||||||
{
|
{
|
||||||
|
base.OnStart();
|
||||||
|
while(Game.IsLoading)
|
||||||
|
Yield();
|
||||||
|
|
||||||
|
Notification.Show(NotificationIcon.AllPlayersConf, "RAGECOOP", "Welcome!",
|
||||||
|
$"Press ~g~{Main.Settings.MenuKey}~s~ to open the menu.");
|
||||||
|
}
|
||||||
|
protected override void OnTick()
|
||||||
|
{
|
||||||
|
base.OnTick();
|
||||||
|
|
||||||
if (Game.IsLoading) return;
|
if (Game.IsLoading) return;
|
||||||
|
|
||||||
try
|
try
|
||||||
@ -53,13 +60,13 @@ namespace RageCoop.Client
|
|||||||
if (Main.Settings.DisableAlternatePause) Game.DisableControlThisFrame(Control.FrontendPauseAlternate);
|
if (Main.Settings.DisableAlternatePause) Game.DisableControlThisFrame(Control.FrontendPauseAlternate);
|
||||||
// Sets a value that determines how aggressive the ocean waves will be.
|
// Sets a value that determines how aggressive the ocean waves will be.
|
||||||
// Values of 2.0 or more make for very aggressive waves like you see during a thunderstorm.
|
// Values of 2.0 or more make for very aggressive waves like you see during a thunderstorm.
|
||||||
Function.Call(Hash.SET_DEEP_OCEAN_SCALER, 0.0f); // Works only ~200 meters around the player
|
Call(SET_DEEP_OCEAN_SCALER, 0.0f); // Works only ~200 meters around the player
|
||||||
|
|
||||||
if (Main.Settings.ShowEntityOwnerName)
|
if (Main.Settings.ShowEntityOwnerName)
|
||||||
unsafe
|
unsafe
|
||||||
{
|
{
|
||||||
int handle;
|
int handle;
|
||||||
if (Function.Call<bool>(Hash.GET_ENTITY_PLAYER_IS_FREE_AIMING_AT, 0, &handle))
|
if (Call<bool>(GET_ENTITY_PLAYER_IS_FREE_AIMING_AT, 0, &handle))
|
||||||
{
|
{
|
||||||
var entity = Entity.FromHandle(handle);
|
var entity = Entity.FromHandle(handle);
|
||||||
if (entity != null)
|
if (entity != null)
|
||||||
@ -76,13 +83,13 @@ namespace RageCoop.Client
|
|||||||
|
|
||||||
if (!_trafficEnabled)
|
if (!_trafficEnabled)
|
||||||
{
|
{
|
||||||
Function.Call(Hash.SET_VEHICLE_POPULATION_BUDGET, 0);
|
Call(SET_VEHICLE_POPULATION_BUDGET, 0);
|
||||||
Function.Call(Hash.SET_PED_POPULATION_BUDGET, 0);
|
Call(SET_PED_POPULATION_BUDGET, 0);
|
||||||
Function.Call(Hash.SET_VEHICLE_DENSITY_MULTIPLIER_THIS_FRAME, 0f);
|
Call(SET_VEHICLE_DENSITY_MULTIPLIER_THIS_FRAME, 0f);
|
||||||
Function.Call(Hash.SET_RANDOM_VEHICLE_DENSITY_MULTIPLIER_THIS_FRAME, 0f);
|
Call(SET_RANDOM_VEHICLE_DENSITY_MULTIPLIER_THIS_FRAME, 0f);
|
||||||
Function.Call(Hash.SET_PARKED_VEHICLE_DENSITY_MULTIPLIER_THIS_FRAME, 0f);
|
Call(SET_PARKED_VEHICLE_DENSITY_MULTIPLIER_THIS_FRAME, 0f);
|
||||||
Function.Call(Hash.SUPPRESS_SHOCKING_EVENTS_NEXT_FRAME);
|
Call(SUPPRESS_SHOCKING_EVENTS_NEXT_FRAME);
|
||||||
Function.Call(Hash.SUPPRESS_AGITATION_EVENTS_NEXT_FRAME);
|
Call(SUPPRESS_AGITATION_EVENTS_NEXT_FRAME);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -96,35 +103,35 @@ namespace RageCoop.Client
|
|||||||
{
|
{
|
||||||
if (enable)
|
if (enable)
|
||||||
{
|
{
|
||||||
Function.Call(Hash.REMOVE_SCENARIO_BLOCKING_AREAS);
|
Call(REMOVE_SCENARIO_BLOCKING_AREAS);
|
||||||
Function.Call(Hash.SET_CREATE_RANDOM_COPS, true);
|
Call(SET_CREATE_RANDOM_COPS, true);
|
||||||
Function.Call(Hash.SET_RANDOM_TRAINS, true);
|
Call(SET_RANDOM_TRAINS, true);
|
||||||
Function.Call(Hash.SET_RANDOM_BOATS, true);
|
Call(SET_RANDOM_BOATS, true);
|
||||||
Function.Call(Hash.SET_GARBAGE_TRUCKS, true);
|
Call(SET_GARBAGE_TRUCKS, true);
|
||||||
Function.Call(Hash.SET_PED_POPULATION_BUDGET, 3); // 0 - 3
|
Call(SET_PED_POPULATION_BUDGET, 3); // 0 - 3
|
||||||
Function.Call(Hash.SET_VEHICLE_POPULATION_BUDGET, 3); // 0 - 3
|
Call(SET_VEHICLE_POPULATION_BUDGET, 3); // 0 - 3
|
||||||
Function.Call(Hash.SET_ALL_VEHICLE_GENERATORS_ACTIVE);
|
Call(SET_ALL_VEHICLE_GENERATORS_ACTIVE);
|
||||||
Function.Call(Hash.SET_ALL_LOW_PRIORITY_VEHICLE_GENERATORS_ACTIVE, true);
|
Call(SET_ALL_LOW_PRIORITY_VEHICLE_GENERATORS_ACTIVE, true);
|
||||||
Function.Call(Hash.SET_NUMBER_OF_PARKED_VEHICLES, -1);
|
Call(SET_NUMBER_OF_PARKED_VEHICLES, -1);
|
||||||
Function.Call(Hash.SET_DISTANT_CARS_ENABLED, true);
|
Call(SET_DISTANT_CARS_ENABLED, true);
|
||||||
Function.Call(Hash.DISABLE_VEHICLE_DISTANTLIGHTS, false);
|
Call(DISABLE_VEHICLE_DISTANTLIGHTS, false);
|
||||||
}
|
}
|
||||||
else if (Networking.IsOnServer)
|
else if (Networking.IsOnServer)
|
||||||
{
|
{
|
||||||
Function.Call(Hash.ADD_SCENARIO_BLOCKING_AREA, -10000.0f, -10000.0f, -1000.0f, 10000.0f, 10000.0f,
|
Call(ADD_SCENARIO_BLOCKING_AREA, -10000.0f, -10000.0f, -1000.0f, 10000.0f, 10000.0f,
|
||||||
1000.0f, 0, 1, 1, 1);
|
1000.0f, 0, 1, 1, 1);
|
||||||
Function.Call(Hash.SET_CREATE_RANDOM_COPS, false);
|
Call(SET_CREATE_RANDOM_COPS, false);
|
||||||
Function.Call(Hash.SET_RANDOM_TRAINS, false);
|
Call(SET_RANDOM_TRAINS, false);
|
||||||
Function.Call(Hash.SET_RANDOM_BOATS, false);
|
Call(SET_RANDOM_BOATS, false);
|
||||||
Function.Call(Hash.SET_GARBAGE_TRUCKS, false);
|
Call(SET_GARBAGE_TRUCKS, false);
|
||||||
Function.Call(Hash.DELETE_ALL_TRAINS);
|
Call(DELETE_ALL_TRAINS);
|
||||||
Function.Call(Hash.SET_PED_POPULATION_BUDGET, 0);
|
Call(SET_PED_POPULATION_BUDGET, 0);
|
||||||
Function.Call(Hash.SET_VEHICLE_POPULATION_BUDGET, 0);
|
Call(SET_VEHICLE_POPULATION_BUDGET, 0);
|
||||||
Function.Call(Hash.SET_ALL_LOW_PRIORITY_VEHICLE_GENERATORS_ACTIVE, false);
|
Call(SET_ALL_LOW_PRIORITY_VEHICLE_GENERATORS_ACTIVE, false);
|
||||||
Function.Call(Hash.SET_FAR_DRAW_VEHICLES, false);
|
Call(SET_FAR_DRAW_VEHICLES, false);
|
||||||
Function.Call(Hash.SET_NUMBER_OF_PARKED_VEHICLES, 0);
|
Call(SET_NUMBER_OF_PARKED_VEHICLES, 0);
|
||||||
Function.Call(Hash.SET_DISTANT_CARS_ENABLED, false);
|
Call(SET_DISTANT_CARS_ENABLED, false);
|
||||||
Function.Call(Hash.DISABLE_VEHICLE_DISTANTLIGHTS, true);
|
Call(DISABLE_VEHICLE_DISTANTLIGHTS, true);
|
||||||
foreach (var ped in World.GetAllPeds())
|
foreach (var ped in World.GetAllPeds())
|
||||||
{
|
{
|
||||||
if (ped == Game.Player.Character) continue;
|
if (ped == Game.Player.Character) continue;
|
||||||
|
@ -1,73 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
|
|
||||||
<packages>
|
|
||||||
<package id="Microsoft.CSharp" version="4.7.0" targetFramework="net48" />
|
|
||||||
<package id="Microsoft.Extensions.ObjectPool" version="6.0.8" targetFramework="net48" />
|
|
||||||
<package id="Microsoft.NETCore.Platforms" version="1.1.0" targetFramework="net48" />
|
|
||||||
<package id="Microsoft.Win32.Primitives" version="4.3.0" targetFramework="net48" />
|
|
||||||
<package id="Microsoft.Win32.Registry" version="4.7.0" targetFramework="net481" />
|
|
||||||
<package id="NativeInvoker" version="1.0.0.1" targetFramework="net48" />
|
|
||||||
<package id="NAudio" version="2.1.0" targetFramework="net48" />
|
|
||||||
<package id="NAudio.Asio" version="2.1.0" targetFramework="net48" />
|
|
||||||
<package id="NAudio.Core" version="2.1.0" targetFramework="net48" />
|
|
||||||
<package id="NAudio.Midi" version="2.1.0" targetFramework="net48" />
|
|
||||||
<package id="NAudio.Wasapi" version="2.1.0" targetFramework="net48" />
|
|
||||||
<package id="NAudio.WinForms" version="2.1.0" targetFramework="net48" />
|
|
||||||
<package id="NAudio.WinMM" version="2.1.0" targetFramework="net48" />
|
|
||||||
<package id="NETStandard.Library" version="1.6.1" targetFramework="net48" />
|
|
||||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
|
|
||||||
<package id="ScriptHookVDotNet3" version="3.5.1" targetFramework="net48" />
|
|
||||||
<package id="SharpZipLib" version="1.4.0" targetFramework="net48" />
|
|
||||||
<package id="System.AppContext" version="4.3.0" targetFramework="net48" />
|
|
||||||
<package id="System.Buffers" version="4.5.1" targetFramework="net48" />
|
|
||||||
<package id="System.Collections" version="4.3.0" targetFramework="net48" />
|
|
||||||
<package id="System.Collections.Concurrent" version="4.3.0" targetFramework="net48" />
|
|
||||||
<package id="System.Console" version="4.3.0" targetFramework="net48" />
|
|
||||||
<package id="System.Data.DataSetExtensions" version="4.5.0" targetFramework="net48" />
|
|
||||||
<package id="System.Diagnostics.Debug" version="4.3.0" targetFramework="net48" />
|
|
||||||
<package id="System.Diagnostics.DiagnosticSource" version="4.3.0" targetFramework="net48" />
|
|
||||||
<package id="System.Diagnostics.Tools" version="4.3.0" targetFramework="net48" />
|
|
||||||
<package id="System.Diagnostics.Tracing" version="4.3.0" targetFramework="net48" />
|
|
||||||
<package id="System.Drawing.Common" version="4.5.0" targetFramework="net48" />
|
|
||||||
<package id="System.Globalization" version="4.3.0" targetFramework="net48" />
|
|
||||||
<package id="System.Globalization.Calendars" version="4.3.0" targetFramework="net48" />
|
|
||||||
<package id="System.IO" version="4.3.0" targetFramework="net48" />
|
|
||||||
<package id="System.IO.Compression" version="4.3.0" targetFramework="net48" />
|
|
||||||
<package id="System.IO.Compression.ZipFile" version="4.3.0" targetFramework="net48" />
|
|
||||||
<package id="System.IO.FileSystem" version="4.3.0" targetFramework="net48" />
|
|
||||||
<package id="System.IO.FileSystem.Primitives" version="4.3.0" targetFramework="net48" />
|
|
||||||
<package id="System.Linq" version="4.3.0" targetFramework="net48" />
|
|
||||||
<package id="System.Linq.Expressions" version="4.3.0" targetFramework="net48" />
|
|
||||||
<package id="System.Memory" version="4.5.5" targetFramework="net48" />
|
|
||||||
<package id="System.Net.Http" version="4.3.0" targetFramework="net48" />
|
|
||||||
<package id="System.Net.Primitives" version="4.3.0" targetFramework="net48" />
|
|
||||||
<package id="System.Net.Sockets" version="4.3.0" targetFramework="net48" />
|
|
||||||
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net48" />
|
|
||||||
<package id="System.ObjectModel" version="4.3.0" targetFramework="net48" />
|
|
||||||
<package id="System.Reflection" version="4.3.0" targetFramework="net48" />
|
|
||||||
<package id="System.Reflection.Extensions" version="4.3.0" targetFramework="net48" />
|
|
||||||
<package id="System.Reflection.Primitives" version="4.3.0" targetFramework="net48" />
|
|
||||||
<package id="System.Resources.ResourceManager" version="4.3.0" targetFramework="net48" />
|
|
||||||
<package id="System.Runtime" version="4.3.0" targetFramework="net48" />
|
|
||||||
<package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" targetFramework="net48" />
|
|
||||||
<package id="System.Runtime.Extensions" version="4.3.0" targetFramework="net48" />
|
|
||||||
<package id="System.Runtime.Handles" version="4.3.0" targetFramework="net48" />
|
|
||||||
<package id="System.Runtime.InteropServices" version="4.3.0" targetFramework="net48" />
|
|
||||||
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net48" />
|
|
||||||
<package id="System.Runtime.Numerics" version="4.3.0" targetFramework="net48" />
|
|
||||||
<package id="System.Security.AccessControl" version="4.7.0" targetFramework="net481" />
|
|
||||||
<package id="System.Security.Cryptography.Algorithms" version="4.3.0" targetFramework="net48" />
|
|
||||||
<package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net48" />
|
|
||||||
<package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net48" />
|
|
||||||
<package id="System.Security.Cryptography.X509Certificates" version="4.3.0" targetFramework="net48" />
|
|
||||||
<package id="System.Security.Principal.Windows" version="4.7.0" targetFramework="net481" />
|
|
||||||
<package id="System.Text.Encoding" version="4.3.0" targetFramework="net48" />
|
|
||||||
<package id="System.Text.Encoding.Extensions" version="4.3.0" targetFramework="net48" />
|
|
||||||
<package id="System.Text.RegularExpressions" version="4.3.0" targetFramework="net48" />
|
|
||||||
<package id="System.Threading" version="4.3.0" targetFramework="net48" />
|
|
||||||
<package id="System.Threading.Tasks" version="4.3.0" targetFramework="net48" />
|
|
||||||
<package id="System.Threading.Tasks.Extensions" version="4.5.2" targetFramework="net48" />
|
|
||||||
<package id="System.Threading.Timer" version="4.3.0" targetFramework="net48" />
|
|
||||||
<package id="System.Xml.ReaderWriter" version="4.3.0" targetFramework="net48" />
|
|
||||||
<package id="System.Xml.XDocument" version="4.3.0" targetFramework="net48" />
|
|
||||||
</packages>
|
|
35955
Client/Scripts/upgrade-assistant.clef
Normal file
35955
Client/Scripts/upgrade-assistant.clef
Normal file
File diff suppressed because it is too large
Load Diff
@ -90,29 +90,6 @@ namespace RageCoop.Core
|
|||||||
.Select(s => s[random.Next(s.Length)]).ToArray());
|
.Select(s => s[random.Next(s.Length)]).ToArray());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void GetDependencies(Assembly assembly, ref HashSet<string> existing)
|
|
||||||
{
|
|
||||||
if (assembly.FullName.StartsWith("System")) return;
|
|
||||||
foreach (var name in assembly.GetReferencedAssemblies())
|
|
||||||
{
|
|
||||||
if (name.FullName.StartsWith("System")) continue;
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var asm = Assembly.Load(name);
|
|
||||||
GetDependencies(asm, ref existing);
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!existing.Contains(assembly.FullName))
|
|
||||||
{
|
|
||||||
Console.WriteLine(assembly.FullName);
|
|
||||||
existing.Add(assembly.FullName);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Version GetLatestVersion(string branch = "dev-nightly")
|
public static Version GetLatestVersion(string branch = "dev-nightly")
|
||||||
{
|
{
|
||||||
var url =
|
var url =
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
using System.Net.Http;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
||||||
namespace RageCoop.Core
|
namespace RageCoop.Core
|
||||||
@ -33,8 +34,8 @@ namespace RageCoop.Core
|
|||||||
SecurityProtocolType.Tls;
|
SecurityProtocolType.Tls;
|
||||||
ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };
|
ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };
|
||||||
|
|
||||||
var client = new WebClient();
|
var client = new HttpClient();
|
||||||
return client.DownloadString(url);
|
return client.GetStringAsync(url).GetAwaiter().GetResult();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,7 +1,8 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>netstandard2.0</TargetFrameworks>
|
<NoWarn>1701;1702;CS1591</NoWarn>
|
||||||
|
<TargetFrameworks>net7.0</TargetFrameworks>
|
||||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||||
<AssemblyVersion>0.1</AssemblyVersion>
|
<AssemblyVersion>0.1</AssemblyVersion>
|
||||||
<FileVersion>0.1</FileVersion>
|
<FileVersion>0.1</FileVersion>
|
||||||
@ -18,43 +19,18 @@
|
|||||||
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
|
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
|
||||||
<ProduceOnlyReferenceAssembly>true</ProduceOnlyReferenceAssembly>
|
<ProduceOnlyReferenceAssembly>true</ProduceOnlyReferenceAssembly>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net6.0|AnyCPU'">
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net6.0|AnyCPU'">
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|netstandard2.0|AnyCPU'">
|
|
||||||
<NoWarn>1701;1702;1591</NoWarn>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|netstandard2.0|AnyCPU'">
|
|
||||||
<NoWarn>1701;1702;1591</NoWarn>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Costura.Fody" Version="5.7.0">
|
|
||||||
<PrivateAssets>all</PrivateAssets>
|
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Fody" Version="6.6.3">
|
|
||||||
<PrivateAssets>all</PrivateAssets>
|
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Microsoft.Extensions.ObjectPool" Version="6.0.8" />
|
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||||
<PackageReference Include="SharpZipLib" Version="1.4.0" />
|
<PackageReference Include="SharpZipLib" Version="1.4.0" />
|
||||||
<PackageReference Include="System.Buffers" Version="4.5.1" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Lidgren.Network">
|
<Reference Include="Lidgren.Network">
|
||||||
<HintPath>..\libs\Lidgren.Network.dll</HintPath>
|
<HintPath>..\libs\Lidgren.Network.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="ScriptHookVDotNet3">
|
<Reference Include="ScriptHookVDotNetCore">
|
||||||
<HintPath>..\libs\ScriptHookVDotNet3.dll</HintPath>
|
<HintPath>..\libs\ScriptHookVDotNetCore.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
@ -7,22 +7,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RageCoop.Server", "Server\R
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RageCoop.Core", "Core\RageCoop.Core.csproj", "{CC2E8102-E568-4524-AA1F-F8E0F1CFE58A}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RageCoop.Core", "Core\RageCoop.Core.csproj", "{CC2E8102-E568-4524-AA1F-F8E0F1CFE58A}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RageCoop.Client", "Client\Scripts\RageCoop.Client.csproj", "{EF56D109-1F22-43E0-9DFF-CFCFB94E0681}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RageCoop.Client", "Client\Scripts\RageCoop.Client.csproj", "{EF56D109-1F22-43E0-9DFF-CFCFB94E0681}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RageCoop.Client.Installer", "Client\Installer\RageCoop.Client.Installer.csproj", "{576D8610-0C28-4B60-BE2B-8657EA7CEE1B}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RageCoop.Client.Installer", "Client\Installer\RageCoop.Client.Installer.csproj", "{576D8610-0C28-4B60-BE2B-8657EA7CEE1B}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RageCoop.Client.Loader", "Client\Loader\RageCoop.Client.Loader.csproj", "{FC8CBDBB-6DC3-43AF-B34D-092E476410A5}"
|
|
||||||
EndProject
|
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Client", "Client", "{531656CF-7269-488D-B042-741BC96C3941}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Client", "Client", "{531656CF-7269-488D-B042-741BC96C3941}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{12E29AB7-74C4-4250-8975-C02D7FFC2D7B}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{12E29AB7-74C4-4250-8975-C02D7FFC2D7B}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RageCoop.Client.CefHost", "Client\CefHost\RageCoop.Client.CefHost.csproj", "{BA750E08-5E41-4B56-8AD5-875716D2CCEA}"
|
|
||||||
EndProject
|
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{70A1F09D-648D-4C8B-8947-E920B1A587A3}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{70A1F09D-648D-4C8B-8947-E920B1A587A3}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CefTest", "Tools\CefTest\CefTest.csproj", "{874944F4-2D01-4423-B55C-C651CCBA6630}"
|
|
||||||
EndProject
|
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DataDumper", "Tools\DataDumper\DataDumper.csproj", "{6387D897-09AF-4464-B440-80438E3BB8D0}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DataDumper", "Tools\DataDumper\DataDumper.csproj", "{6387D897-09AF-4464-B440-80438E3BB8D0}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
@ -83,42 +77,6 @@ Global
|
|||||||
{576D8610-0C28-4B60-BE2B-8657EA7CEE1B}.Release|Any CPU.Build.0 = Release|Any CPU
|
{576D8610-0C28-4B60-BE2B-8657EA7CEE1B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{576D8610-0C28-4B60-BE2B-8657EA7CEE1B}.Release|x64.ActiveCfg = Release|Any CPU
|
{576D8610-0C28-4B60-BE2B-8657EA7CEE1B}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
{576D8610-0C28-4B60-BE2B-8657EA7CEE1B}.Release|x64.Build.0 = Release|Any CPU
|
{576D8610-0C28-4B60-BE2B-8657EA7CEE1B}.Release|x64.Build.0 = Release|Any CPU
|
||||||
{FC8CBDBB-6DC3-43AF-B34D-092E476410A5}.API|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{FC8CBDBB-6DC3-43AF-B34D-092E476410A5}.API|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{FC8CBDBB-6DC3-43AF-B34D-092E476410A5}.API|x64.ActiveCfg = Release|Any CPU
|
|
||||||
{FC8CBDBB-6DC3-43AF-B34D-092E476410A5}.API|x64.Build.0 = Release|Any CPU
|
|
||||||
{FC8CBDBB-6DC3-43AF-B34D-092E476410A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{FC8CBDBB-6DC3-43AF-B34D-092E476410A5}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{FC8CBDBB-6DC3-43AF-B34D-092E476410A5}.Debug|x64.ActiveCfg = Debug|Any CPU
|
|
||||||
{FC8CBDBB-6DC3-43AF-B34D-092E476410A5}.Debug|x64.Build.0 = Debug|Any CPU
|
|
||||||
{FC8CBDBB-6DC3-43AF-B34D-092E476410A5}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{FC8CBDBB-6DC3-43AF-B34D-092E476410A5}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{FC8CBDBB-6DC3-43AF-B34D-092E476410A5}.Release|x64.ActiveCfg = Release|Any CPU
|
|
||||||
{FC8CBDBB-6DC3-43AF-B34D-092E476410A5}.Release|x64.Build.0 = Release|Any CPU
|
|
||||||
{BA750E08-5E41-4B56-8AD5-875716D2CCEA}.API|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{BA750E08-5E41-4B56-8AD5-875716D2CCEA}.API|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{BA750E08-5E41-4B56-8AD5-875716D2CCEA}.API|x64.ActiveCfg = Release|Any CPU
|
|
||||||
{BA750E08-5E41-4B56-8AD5-875716D2CCEA}.API|x64.Build.0 = Release|Any CPU
|
|
||||||
{BA750E08-5E41-4B56-8AD5-875716D2CCEA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{BA750E08-5E41-4B56-8AD5-875716D2CCEA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{BA750E08-5E41-4B56-8AD5-875716D2CCEA}.Debug|x64.ActiveCfg = Debug|Any CPU
|
|
||||||
{BA750E08-5E41-4B56-8AD5-875716D2CCEA}.Debug|x64.Build.0 = Debug|Any CPU
|
|
||||||
{BA750E08-5E41-4B56-8AD5-875716D2CCEA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{BA750E08-5E41-4B56-8AD5-875716D2CCEA}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{BA750E08-5E41-4B56-8AD5-875716D2CCEA}.Release|x64.ActiveCfg = Release|Any CPU
|
|
||||||
{BA750E08-5E41-4B56-8AD5-875716D2CCEA}.Release|x64.Build.0 = Release|Any CPU
|
|
||||||
{874944F4-2D01-4423-B55C-C651CCBA6630}.API|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{874944F4-2D01-4423-B55C-C651CCBA6630}.API|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{874944F4-2D01-4423-B55C-C651CCBA6630}.API|x64.ActiveCfg = Debug|Any CPU
|
|
||||||
{874944F4-2D01-4423-B55C-C651CCBA6630}.API|x64.Build.0 = Debug|Any CPU
|
|
||||||
{874944F4-2D01-4423-B55C-C651CCBA6630}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{874944F4-2D01-4423-B55C-C651CCBA6630}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{874944F4-2D01-4423-B55C-C651CCBA6630}.Debug|x64.ActiveCfg = Debug|Any CPU
|
|
||||||
{874944F4-2D01-4423-B55C-C651CCBA6630}.Debug|x64.Build.0 = Debug|Any CPU
|
|
||||||
{874944F4-2D01-4423-B55C-C651CCBA6630}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{874944F4-2D01-4423-B55C-C651CCBA6630}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{874944F4-2D01-4423-B55C-C651CCBA6630}.Release|x64.ActiveCfg = Release|Any CPU
|
|
||||||
{874944F4-2D01-4423-B55C-C651CCBA6630}.Release|x64.Build.0 = Release|Any CPU
|
|
||||||
{6387D897-09AF-4464-B440-80438E3BB8D0}.API|Any CPU.ActiveCfg = Debug|Any CPU
|
{6387D897-09AF-4464-B440-80438E3BB8D0}.API|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{6387D897-09AF-4464-B440-80438E3BB8D0}.API|Any CPU.Build.0 = Debug|Any CPU
|
{6387D897-09AF-4464-B440-80438E3BB8D0}.API|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{6387D897-09AF-4464-B440-80438E3BB8D0}.API|x64.ActiveCfg = Debug|Any CPU
|
{6387D897-09AF-4464-B440-80438E3BB8D0}.API|x64.ActiveCfg = Debug|Any CPU
|
||||||
@ -138,9 +96,6 @@ Global
|
|||||||
GlobalSection(NestedProjects) = preSolution
|
GlobalSection(NestedProjects) = preSolution
|
||||||
{EF56D109-1F22-43E0-9DFF-CFCFB94E0681} = {531656CF-7269-488D-B042-741BC96C3941}
|
{EF56D109-1F22-43E0-9DFF-CFCFB94E0681} = {531656CF-7269-488D-B042-741BC96C3941}
|
||||||
{576D8610-0C28-4B60-BE2B-8657EA7CEE1B} = {531656CF-7269-488D-B042-741BC96C3941}
|
{576D8610-0C28-4B60-BE2B-8657EA7CEE1B} = {531656CF-7269-488D-B042-741BC96C3941}
|
||||||
{FC8CBDBB-6DC3-43AF-B34D-092E476410A5} = {531656CF-7269-488D-B042-741BC96C3941}
|
|
||||||
{BA750E08-5E41-4B56-8AD5-875716D2CCEA} = {531656CF-7269-488D-B042-741BC96C3941}
|
|
||||||
{874944F4-2D01-4423-B55C-C651CCBA6630} = {70A1F09D-648D-4C8B-8947-E920B1A587A3}
|
|
||||||
{6387D897-09AF-4464-B440-80438E3BB8D0} = {70A1F09D-648D-4C8B-8947-E920B1A587A3}
|
{6387D897-09AF-4464-B440-80438E3BB8D0} = {70A1F09D-648D-4C8B-8947-E920B1A587A3}
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
@ -15,7 +15,7 @@ using System.Resources;
|
|||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
// Version information
|
// Version information
|
||||||
[assembly: AssemblyVersion("1.6.0.24")]
|
[assembly: AssemblyVersion("1.6.0.25")]
|
||||||
[assembly: AssemblyFileVersion("1.6.0.24")]
|
[assembly: AssemblyFileVersion("1.6.0.25")]
|
||||||
[assembly: NeutralResourcesLanguageAttribute( "en-US" )]
|
[assembly: NeutralResourcesLanguageAttribute( "en-US" )]
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Costura.Fody" Version="5.7.0">
|
<PackageReference Include="Costura.Fody" Version="5.7.0">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>compile; runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="DiscUtils.Iso9660" Version="0.16.13" />
|
<PackageReference Include="DiscUtils.Iso9660" Version="0.16.13" />
|
||||||
<PackageReference Include="Fody" Version="6.6.3">
|
<PackageReference Include="Fody" Version="6.6.3">
|
||||||
@ -76,8 +76,8 @@
|
|||||||
<Reference Include="Lidgren.Network">
|
<Reference Include="Lidgren.Network">
|
||||||
<HintPath>..\libs\Lidgren.Network.dll</HintPath>
|
<HintPath>..\libs\Lidgren.Network.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="ScriptHookVDotNet3">
|
<Reference Include="ScriptHookVDotNetCore">
|
||||||
<HintPath>..\libs\ScriptHookVDotNet3.dll</HintPath>
|
<HintPath>..\libs\ScriptHookVDotNetCore.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
@ -101,8 +101,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<Target Name="PostBuild" AfterTargets="PostBuildEvent" Condition=" '$(DevEnvDir)' != '*Undefined*'">
|
<Target Name="PostBuild" AfterTargets="PostBuildEvent" Condition=" '$(DevEnvDir)' != '*Undefined*'">
|
||||||
<Exec
|
<Exec Command=""$(DevEnvDir)TextTransform.exe" -a !!BuildConfiguration!$(Configuration) "$(ProjectDir)Properties\AssemblyInfo.tt"" />
|
||||||
Command=""$(DevEnvDir)TextTransform.exe" -a !!BuildConfiguration!$(Configuration) "$(ProjectDir)Properties\AssemblyInfo.tt"" />
|
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
<NoAotCompile>true</NoAotCompile>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<OutDir>..\..\bin\Tools\DataDumper</OutDir>
|
<OutDir>..\..\bin\Tools\DataDumper</OutDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
Binary file not shown.
Binary file not shown.
@ -1,86 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
<doc>
|
|
||||||
<assembly>
|
|
||||||
<name>BitmapUtil</name>
|
|
||||||
</assembly>
|
|
||||||
<members>
|
|
||||||
<member name="M:BitmapUtil.BitmapInfo.ToBitmap(System.Drawing.Imaging.PixelFormat)">
|
|
||||||
<summary>
|
|
||||||
Get a bitmap that use <see cref="F:BitmapUtil.BitmapInfo.Scan0"/> as the back buffer
|
|
||||||
</summary>
|
|
||||||
<param name="format"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:BitmapUtil.Unsafe.UpdateRegion(BitmapUtil.BitmapInfo,BitmapUtil.BitmapInfo,System.Drawing.Rectangle,System.Drawing.Point)">
|
|
||||||
<summary>
|
|
||||||
Copy a region from source and apply to specified point of target bitmap
|
|
||||||
</summary>
|
|
||||||
<param name="src"></param>
|
|
||||||
<param name="target"></param>
|
|
||||||
<param name="sourceRegion">Region to copy from source</param>
|
|
||||||
<param name="targetLocation">Location to apply the region copied from source</param>
|
|
||||||
</member>
|
|
||||||
<member name="M:BitmapUtil.Unsafe.UpdateRegion(BitmapUtil.BitmapInfo,BitmapUtil.BitmapInfo,System.Drawing.Point)">
|
|
||||||
<summary>
|
|
||||||
Copy a entire source bitmap to specified point of target bitmap
|
|
||||||
</summary>
|
|
||||||
<param name="src"></param>
|
|
||||||
<param name="target"></param>
|
|
||||||
<param name="location">The location of the target to apply source bitmap</param>
|
|
||||||
<returns></returns>
|
|
||||||
<exception cref="T:System.ArgumentOutOfRangeException"></exception>
|
|
||||||
<exception cref="T:System.ArgumentException"></exception>
|
|
||||||
</member>
|
|
||||||
<member name="M:BitmapUtil.Unsafe.CopyRegion(BitmapUtil.BitmapInfo,System.IntPtr,System.Drawing.Rectangle)">
|
|
||||||
<summary>
|
|
||||||
Copy specified region to destination as a continuous region of memory, namely, crop the bitmap
|
|
||||||
</summary>
|
|
||||||
<param name="source">Source image</param>
|
|
||||||
<param name="destination">Pointer to destination buffer</param>
|
|
||||||
<param name="region">The region to copy from source</param>
|
|
||||||
<returns></returns>
|
|
||||||
<exception cref="T:System.ArgumentOutOfRangeException"></exception>
|
|
||||||
</member>
|
|
||||||
<member name="T:BitmapUtil.GDIPlus">
|
|
||||||
<summary>
|
|
||||||
Common method and extensions for GDI+ (aka System.Drawing) Bitmap.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:BitmapUtil.GDIPlus.ToByteArray(System.Drawing.Bitmap)">
|
|
||||||
<summary>
|
|
||||||
Get a byte array from <para>bmp</para>
|
|
||||||
</summary>
|
|
||||||
<param name="bmp"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:BitmapUtil.GDIPlus.ToByteArray(System.Drawing.Bitmap,System.Drawing.Rectangle,BitmapUtil.BitmapInfo@)">
|
|
||||||
<summary>
|
|
||||||
Get a byte array from <para>bmp</para>
|
|
||||||
</summary>
|
|
||||||
<param name="bmp"></param>
|
|
||||||
<param name="region">The region to create copy</param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:BitmapUtil.GDIPlus.FromByteArrayUnsafe(System.Byte[],System.Int32,System.Int32,System.Int32,System.Drawing.Imaging.PixelFormat)">
|
|
||||||
<summary>
|
|
||||||
Get a <see cref="T:System.Drawing.Bitmap"/> from specified array
|
|
||||||
</summary>
|
|
||||||
<param name="array"></param>
|
|
||||||
<param name="width"></param>
|
|
||||||
<param name="height"></param>
|
|
||||||
<param name="bytesPerPixel"></param>
|
|
||||||
<param name="format"></param>
|
|
||||||
<returns>The <see cref="T:System.Drawing.Bitmap"/> that depends on the specified array, note that it must not be collected by GC during the lifetime of this <see cref="T:System.Drawing.Bitmap"/></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:BitmapUtil.GDIPlus.FromByteArray(System.Byte[],System.Int32,System.Int32,System.Drawing.Imaging.PixelFormat)">
|
|
||||||
<summary>
|
|
||||||
Grab a copy of input array and return a safe <see cref="T:System.Drawing.Bitmap"/> object.
|
|
||||||
</summary>
|
|
||||||
<param name="array"></param>
|
|
||||||
<param name="width"></param>
|
|
||||||
<param name="height"></param>
|
|
||||||
<param name="format"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
</members>
|
|
||||||
</doc>
|
|
Binary file not shown.
Binary file not shown.
@ -1,865 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
<doc>
|
|
||||||
<assembly>
|
|
||||||
<name>DXHook</name>
|
|
||||||
</assembly>
|
|
||||||
<members>
|
|
||||||
<member name="F:DXHook.CaptureProcess._channelName">
|
|
||||||
<summary>
|
|
||||||
Must be null to allow a random channel name to be generated
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.CaptureProcess.#ctor(System.Diagnostics.Process,DXHook.Interface.CaptureConfig,DXHook.Interface.CaptureInterface)">
|
|
||||||
<summary>
|
|
||||||
Prepares capturing in the target process. Note that the process must not already be hooked, and must have a <see cref="P:System.Diagnostics.Process.MainWindowHandle"/>.
|
|
||||||
</summary>
|
|
||||||
<param name="process">The process to inject into</param>
|
|
||||||
<exception cref="T:DXHook.ProcessHasNoWindowHandleException">Thrown if the <paramref name="process"/> does not have a window handle. This could mean that the process does not have a UI, or that the process has not yet finished starting.</exception>
|
|
||||||
<exception cref="T:DXHook.ProcessAlreadyHookedException">Thrown if the <paramref name="process"/> is already hooked</exception>
|
|
||||||
<exception cref="T:DXHook.InjectionFailedException">Thrown if the injection failed - see the InnerException for more details.</exception>
|
|
||||||
<remarks>The target process will have its main window brought to the foreground after successful injection.</remarks>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.CaptureProcess.BringProcessWindowToFront">
|
|
||||||
<summary>
|
|
||||||
Bring the target window to the front and wait for it to be visible
|
|
||||||
</summary>
|
|
||||||
<remarks>If the window does not come to the front within approx. 30 seconds an exception is raised</remarks>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.EntryPoint.StartCheckHostIsAliveThread">
|
|
||||||
<summary>
|
|
||||||
Begin a background thread to check periodically that the host process is still accessible on its IPC channel
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.EntryPoint.StopCheckHostIsAliveThread">
|
|
||||||
<summary>
|
|
||||||
Tell the _checkAlive thread that it can exit if it hasn't already
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="T:DXHook.ProcessHasNoWindowHandleException">
|
|
||||||
<summary>
|
|
||||||
Indicates that the provided process does not have a window handle.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="P:DXHook.Hook.BaseDXHook.FPS">
|
|
||||||
<summary>
|
|
||||||
Frames Per second counter, FPS.Frame() must be called each frame
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.Hook.BaseDXHook.ReadFullStream(System.IO.Stream)">
|
|
||||||
<summary>
|
|
||||||
Reads data from a stream until the end is reached. The
|
|
||||||
data is returned as a byte array. An IOException is
|
|
||||||
thrown if any of the underlying IO calls fail.
|
|
||||||
</summary>
|
|
||||||
<param name="stream">The stream to read data from</param>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.Hook.BaseDXHook.ProcessCapture(System.Int32,System.Int32,System.Int32,System.Drawing.Imaging.PixelFormat,System.IntPtr,DXHook.Interface.ScreenshotRequest)">
|
|
||||||
<summary>
|
|
||||||
Process the capture based on the requested format.
|
|
||||||
</summary>
|
|
||||||
<param name="width">image width</param>
|
|
||||||
<param name="height">image height</param>
|
|
||||||
<param name="pitch">data pitch (bytes per row)</param>
|
|
||||||
<param name="format">target format</param>
|
|
||||||
<param name="pBits">IntPtr to the image data</param>
|
|
||||||
<param name="request">The original requets</param>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.Hook.Common.Element.Dispose(System.Boolean)">
|
|
||||||
<summary>
|
|
||||||
Releases unmanaged and optionally managed resources
|
|
||||||
</summary>
|
|
||||||
<param name="disposing">true if disposing both unmanaged and managed</param>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.Hook.Common.FramesPerSecond.Frame">
|
|
||||||
<summary>
|
|
||||||
Must be called each frame
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.Hook.Common.FramesPerSecond.GetFPS">
|
|
||||||
<summary>
|
|
||||||
Return the current frames per second
|
|
||||||
</summary>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="P:DXHook.Hook.Common.ImageElement.PtrBuffer">
|
|
||||||
<summary>
|
|
||||||
Pointer to this image's underlying buffer area
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.Hook.Common.ImageElement.SetBitmap(System.Drawing.Bitmap)">
|
|
||||||
<summary>
|
|
||||||
Update current bitmap with supplied one
|
|
||||||
</summary>
|
|
||||||
<param name="bmp">The bitmap to replace current one with</param>
|
|
||||||
<remarks>Image buffer is copied to <see cref="P:DXHook.Hook.Common.ImageElement.PtrBuffer"/></remarks>
|
|
||||||
</member>
|
|
||||||
<member name="P:DXHook.Hook.Common.ImageElement.Tint">
|
|
||||||
<summary>
|
|
||||||
This value is multiplied with the source color (e.g. White will result in same color as source image)
|
|
||||||
</summary>
|
|
||||||
<remarks>
|
|
||||||
Defaults to <see cref="P:System.Drawing.Color.White"/>.
|
|
||||||
</remarks>
|
|
||||||
</member>
|
|
||||||
<member name="P:DXHook.Hook.Common.ImageElement.Location">
|
|
||||||
<summary>
|
|
||||||
The location of where to render this image element
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="T:DXHook.Hook.Direct3DDevice9FunctionOrdinals">
|
|
||||||
<summary>
|
|
||||||
The full list of IDirect3DDevice9 functions with the correct index
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="P:DXHook.Hook.DX11.DeviceManager.Direct3DDevice">
|
|
||||||
<summary>
|
|
||||||
Gets the Direct3D11 device.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="P:DXHook.Hook.DX11.DeviceManager.Direct3DContext">
|
|
||||||
<summary>
|
|
||||||
Gets the Direct3D11 immediate context.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.Hook.DX11.DXOverlayEngine.Draw">
|
|
||||||
<summary>
|
|
||||||
Draw the overlay(s)
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.Hook.DX11.DXOverlayEngine.Dispose(System.Boolean)">
|
|
||||||
<summary>
|
|
||||||
Releases unmanaged and optionally managed resources
|
|
||||||
</summary>
|
|
||||||
<param name="disposing">true if disposing both unmanaged and managed</param>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.Hook.DX11.RendererBase.Initialize(DXHook.Hook.DX11.DeviceManager)">
|
|
||||||
<summary>
|
|
||||||
Initialize with the provided deviceManager
|
|
||||||
</summary>
|
|
||||||
<param name="deviceManager"></param>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.Hook.DX11.RendererBase.CreateDeviceDependentResources">
|
|
||||||
<summary>
|
|
||||||
Create any resources that depend on the device or device context
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.Hook.DX11.RendererBase.CreateSizeDependentResources">
|
|
||||||
<summary>
|
|
||||||
Create any resources that depend upon the size of the render target
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.Hook.DX11.RendererBase.Render">
|
|
||||||
<summary>
|
|
||||||
Render a frame
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.Hook.DX11.RendererBase.DoRender">
|
|
||||||
<summary>
|
|
||||||
Each descendant of RendererBase performs a frame
|
|
||||||
render within the implementation of DoRender
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.Hook.DX11.ScreenAlignedQuadRenderer.CreateDeviceDependentResources">
|
|
||||||
<summary>
|
|
||||||
Create any device dependent resources here.
|
|
||||||
This method will be called when the device is first
|
|
||||||
initialized or recreated after being removed or reset.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.Hook.DX9.DXOverlayEngine.Draw">
|
|
||||||
<summary>
|
|
||||||
Draw the overlay(s)
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.Hook.DX9.DXOverlayEngine.BeforeDeviceReset">
|
|
||||||
<summary>
|
|
||||||
In Direct3D9 it is necessary to call OnLostDevice before any call to device.Reset(...) for certain interfaces found in D3DX (e.g. ID3DXSprite, ID3DXFont, ID3DXLine) - https://msdn.microsoft.com/en-us/library/windows/desktop/bb172979(v=vs.85).aspx
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.Hook.DX9.DXOverlayEngine.Dispose(System.Boolean)">
|
|
||||||
<summary>
|
|
||||||
Releases unmanaged and optionally managed resources
|
|
||||||
</summary>
|
|
||||||
<param name="disposing">true if disposing both unmanaged and managed</param>
|
|
||||||
</member>
|
|
||||||
<member name="T:DXHook.Hook.DXHookD3D10">
|
|
||||||
<summary>
|
|
||||||
Direct3D 10 Hook - this hooks the SwapChain.Present method to capture images
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="T:DXHook.Hook.DXHookD3D10.DXGISwapChain_PresentDelegate">
|
|
||||||
<summary>
|
|
||||||
The IDXGISwapChain.Present function definition
|
|
||||||
</summary>
|
|
||||||
<param name="device"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="T:DXHook.Hook.DXHookD3D10.DXGISwapChain_ResizeTargetDelegate">
|
|
||||||
<summary>
|
|
||||||
The IDXGISwapChain.ResizeTarget function definition
|
|
||||||
</summary>
|
|
||||||
<param name="device"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.Hook.DXHookD3D10.ResizeTargetHook(System.IntPtr,SharpDX.DXGI.ModeDescription@)">
|
|
||||||
<summary>
|
|
||||||
Hooked to allow resizing a texture/surface that is reused. Currently not in use as we create the texture for each request
|
|
||||||
to support different sizes each time (as we use DirectX to copy only the region we are after rather than the entire backbuffer)
|
|
||||||
</summary>
|
|
||||||
<param name="swapChainPtr"></param>
|
|
||||||
<param name="newTargetParameters"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.Hook.DXHookD3D10.PresentHook(System.IntPtr,System.Int32,SharpDX.DXGI.PresentFlags)">
|
|
||||||
<summary>
|
|
||||||
Our present hook that will grab a copy of the backbuffer when requested. Note: this supports multi-sampling (anti-aliasing)
|
|
||||||
</summary>
|
|
||||||
<param name="swapChainPtr"></param>
|
|
||||||
<param name="syncInterval"></param>
|
|
||||||
<param name="flags"></param>
|
|
||||||
<returns>The HRESULT of the original method</returns>
|
|
||||||
</member>
|
|
||||||
<member name="T:DXHook.Hook.DXHookD3D10_1">
|
|
||||||
<summary>
|
|
||||||
Direct3D 10.1 Hook - this hooks the SwapChain.Present method to capture images
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="T:DXHook.Hook.DXHookD3D10_1.DXGISwapChain_PresentDelegate">
|
|
||||||
<summary>
|
|
||||||
The IDXGISwapChain.Present function definition
|
|
||||||
</summary>
|
|
||||||
<param name="device"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="T:DXHook.Hook.DXHookD3D10_1.DXGISwapChain_ResizeTargetDelegate">
|
|
||||||
<summary>
|
|
||||||
The IDXGISwapChain.ResizeTarget function definition
|
|
||||||
</summary>
|
|
||||||
<param name="device"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.Hook.DXHookD3D10_1.ResizeTargetHook(System.IntPtr,SharpDX.DXGI.ModeDescription@)">
|
|
||||||
<summary>
|
|
||||||
Hooked to allow resizing a texture/surface that is reused. Currently not in use as we create the texture for each request
|
|
||||||
to support different sizes each time (as we use DirectX to copy only the region we are after rather than the entire backbuffer)
|
|
||||||
</summary>
|
|
||||||
<param name="swapChainPtr"></param>
|
|
||||||
<param name="newTargetParameters"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.Hook.DXHookD3D10_1.PresentHook(System.IntPtr,System.Int32,SharpDX.DXGI.PresentFlags)">
|
|
||||||
<summary>
|
|
||||||
Our present hook that will grab a copy of the backbuffer when requested. Note: this supports multi-sampling (anti-aliasing)
|
|
||||||
</summary>
|
|
||||||
<param name="swapChainPtr"></param>
|
|
||||||
<param name="syncInterval"></param>
|
|
||||||
<param name="flags"></param>
|
|
||||||
<returns>The HRESULT of the original method</returns>
|
|
||||||
</member>
|
|
||||||
<member name="T:DXHook.Hook.DXHookD3D11">
|
|
||||||
<summary>
|
|
||||||
Direct3D 11 Hook - this hooks the SwapChain.Present to take screenshots
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="T:DXHook.Hook.DXHookD3D11.DXGISwapChain_PresentDelegate">
|
|
||||||
<summary>
|
|
||||||
The IDXGISwapChain.Present function definition
|
|
||||||
</summary>
|
|
||||||
<param name="device"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="T:DXHook.Hook.DXHookD3D11.DXGISwapChain_ResizeTargetDelegate">
|
|
||||||
<summary>
|
|
||||||
The IDXGISwapChain.ResizeTarget function definition
|
|
||||||
</summary>
|
|
||||||
<param name="device"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.Hook.DXHookD3D11.ResizeTargetHook(System.IntPtr,SharpDX.DXGI.ModeDescription@)">
|
|
||||||
<summary>
|
|
||||||
Hooked to allow resizing a texture/surface that is reused. Currently not in use as we create the texture for each request
|
|
||||||
to support different sizes each time (as we use DirectX to copy only the region we are after rather than the entire backbuffer)
|
|
||||||
</summary>
|
|
||||||
<param name="swapChainPtr"></param>
|
|
||||||
<param name="newTargetParameters"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.Hook.DXHookD3D11.PresentHook(System.IntPtr,System.Int32,SharpDX.DXGI.PresentFlags)">
|
|
||||||
<summary>
|
|
||||||
Our present hook that will grab a copy of the backbuffer when requested. Note: this supports multi-sampling (anti-aliasing)
|
|
||||||
</summary>
|
|
||||||
<param name="swapChainPtr"></param>
|
|
||||||
<param name="syncInterval"></param>
|
|
||||||
<param name="flags"></param>
|
|
||||||
<returns>The HRESULT of the original method</returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.Hook.DXHookD3D11.ToStream(SharpDX.Direct3D11.DeviceContext,SharpDX.Direct3D11.Texture2D,DXHook.Interface.ImageFormat,System.IO.Stream)">
|
|
||||||
<summary>
|
|
||||||
Copies to a stream using WIC. The format is converted if necessary.
|
|
||||||
</summary>
|
|
||||||
<param name="context"></param>
|
|
||||||
<param name="texture"></param>
|
|
||||||
<param name="outputFormat"></param>
|
|
||||||
<param name="stream"></param>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.Hook.DXHookD3D9.Cleanup">
|
|
||||||
<summary>
|
|
||||||
Just ensures that the surface we created is cleaned up.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="T:DXHook.Hook.DXHookD3D9.Direct3D9Device_EndSceneDelegate">
|
|
||||||
<summary>
|
|
||||||
The IDirect3DDevice9.EndScene function definition
|
|
||||||
</summary>
|
|
||||||
<param name="device"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="T:DXHook.Hook.DXHookD3D9.Direct3D9Device_ResetDelegate">
|
|
||||||
<summary>
|
|
||||||
The IDirect3DDevice9.Reset function definition
|
|
||||||
</summary>
|
|
||||||
<param name="device"></param>
|
|
||||||
<param name="presentParameters"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.Hook.DXHookD3D9.ResetHook(System.IntPtr,SharpDX.Direct3D9.PresentParameters@)">
|
|
||||||
<summary>
|
|
||||||
Reset the _renderTarget so that we are sure it will have the correct presentation parameters (required to support working across changes to windowed/fullscreen or resolution changes)
|
|
||||||
</summary>
|
|
||||||
<param name="devicePtr"></param>
|
|
||||||
<param name="presentParameters"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.Hook.DXHookD3D9.EndSceneHook(System.IntPtr)">
|
|
||||||
<summary>
|
|
||||||
Hook for IDirect3DDevice9.EndScene
|
|
||||||
</summary>
|
|
||||||
<param name="devicePtr">Pointer to the IDirect3DDevice9 instance. Note: object member functions always pass "this" as the first parameter.</param>
|
|
||||||
<returns>The HRESULT of the original EndScene</returns>
|
|
||||||
<remarks>Remember that this is called many times a second by the Direct3D application - be mindful of memory and performance!</remarks>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.Hook.DXHookD3D9.DoCaptureRenderTarget(SharpDX.Direct3D9.Device,System.String)">
|
|
||||||
<summary>
|
|
||||||
Implementation of capturing from the render target of the Direct3D9 Device (or DeviceEx)
|
|
||||||
</summary>
|
|
||||||
<param name="device"></param>
|
|
||||||
</member>
|
|
||||||
<member name="T:DXHook.Hook.FramesPerSecond">
|
|
||||||
<summary>
|
|
||||||
Used to determine the FPS
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.Hook.FramesPerSecond.Frame">
|
|
||||||
<summary>
|
|
||||||
Must be called each frame
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.Hook.FramesPerSecond.GetFPS">
|
|
||||||
<summary>
|
|
||||||
Return the current frames per second
|
|
||||||
</summary>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="T:DXHook.Hook.Hook`1">
|
|
||||||
<summary>
|
|
||||||
Extends <see cref="T:DXHook.Hook.Hook"/> with support for accessing the Original method from within a hook delegate
|
|
||||||
</summary>
|
|
||||||
<typeparam name="T">A delegate type</typeparam>
|
|
||||||
</member>
|
|
||||||
<member name="P:DXHook.Hook.Hook`1.Original">
|
|
||||||
<summary>
|
|
||||||
When called from within the <see cref="P:DXHook.Hook.Hook.NewFunc"/> delegate this will call the original function at <see cref="P:DXHook.Hook.Hook.FuncToHook"/>.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.Hook.Hook`1.#ctor(System.IntPtr,System.Delegate,System.Object)">
|
|
||||||
<summary>
|
|
||||||
Creates a new hook at <paramref name="funcToHook"/> redirecting to <paramref name="newFunc"/>. The hook starts inactive so a call to <see cref="!:Activate"/> is required to enable the hook.
|
|
||||||
</summary>
|
|
||||||
<param name="funcToHook">A pointer to the location to insert the hook</param>
|
|
||||||
<param name="newFunc">The delegate to call from the hooked location</param>
|
|
||||||
<param name="owner">The object to assign as the "callback" object within the <see cref="T:EasyHook.LocalHook"/> instance.</param>
|
|
||||||
</member>
|
|
||||||
<member name="T:DXHook.Hook.Hook">
|
|
||||||
<summary>
|
|
||||||
Wraps the <see cref="T:EasyHook.LocalHook"/> class with a simplified active/inactive state
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="P:DXHook.Hook.Hook.FuncToHook">
|
|
||||||
<summary>
|
|
||||||
The hooked function location
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="P:DXHook.Hook.Hook.NewFunc">
|
|
||||||
<summary>
|
|
||||||
The replacement delegate
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="P:DXHook.Hook.Hook.Owner">
|
|
||||||
<summary>
|
|
||||||
The callback object passed to LocalHook constructor
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="P:DXHook.Hook.Hook.LocalHook">
|
|
||||||
<summary>
|
|
||||||
The <see cref="T:EasyHook.LocalHook"/> instance
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="P:DXHook.Hook.Hook.IsActive">
|
|
||||||
<summary>
|
|
||||||
Indicates whether the hook is currently active
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.Hook.Hook.#ctor(System.IntPtr,System.Delegate,System.Object)">
|
|
||||||
<summary>
|
|
||||||
Creates a new hook at <paramref name="funcToHook"/> redirecting to <paramref name="newFunc"/>. The hook starts inactive so a call to <see cref="M:DXHook.Hook.Hook.Activate"/> is required to enable the hook.
|
|
||||||
</summary>
|
|
||||||
<param name="funcToHook">A pointer to the location to insert the hook</param>
|
|
||||||
<param name="newFunc">The delegate to call from the hooked location</param>
|
|
||||||
<param name="owner">The object to assign as the "callback" object within the <see cref="T:EasyHook.LocalHook"/> instance.</param>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.Hook.Hook.Activate">
|
|
||||||
<summary>
|
|
||||||
Activates the hook
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.Hook.Hook.Deactivate">
|
|
||||||
<summary>
|
|
||||||
Deactivates the hook
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="T:DXHook.Hook.SafeHGlobal">
|
|
||||||
<summary>
|
|
||||||
Provides a safe handle around a block of unmanaged memory.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="P:DXHook.Hook.SafeHGlobal.IsInvalid">
|
|
||||||
<summary>
|
|
||||||
When overridden in a derived class, gets a value indicating whether the handle value is invalid.
|
|
||||||
</summary>
|
|
||||||
<returns>true if the handle value is invalid; otherwise, false.</returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.Hook.SafeHGlobal.#ctor(System.Int32)">
|
|
||||||
<summary>
|
|
||||||
Initializes a new instance of the <see cref="T:DXHook.Hook.SafeHGlobal"/> class.
|
|
||||||
</summary>
|
|
||||||
<param name="sizeInBytes">The size of the block of memory to allocate, in bytes.</param>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.Hook.SafeHGlobal.ReleaseHandle">
|
|
||||||
<summary>
|
|
||||||
When overridden in a derived class, executes the code required to free the handle.
|
|
||||||
</summary>
|
|
||||||
<returns>
|
|
||||||
true if the handle is released successfully; otherwise, in the event of a catastrophic failure, false. In this case, it generates a releaseHandleFailed MDA Managed Debugging Assistant.
|
|
||||||
</returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.Hook.TextDisplay.Frame">
|
|
||||||
<summary>
|
|
||||||
Must be called each frame
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="P:DXHook.Interface.CaptureInterface.ProcessId">
|
|
||||||
<summary>
|
|
||||||
The client process Id
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="E:DXHook.Interface.CaptureInterface.RemoteMessage">
|
|
||||||
<summary>
|
|
||||||
Server event for sending debug and error information from the client to server
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="E:DXHook.Interface.CaptureInterface.ScreenshotReceived">
|
|
||||||
<summary>
|
|
||||||
Server event for receiving screenshot image data
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="E:DXHook.Interface.CaptureInterface.RecordingStarted">
|
|
||||||
<summary>
|
|
||||||
Client event used to communicate to the client that it is time to start recording
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="E:DXHook.Interface.CaptureInterface.RecordingStopped">
|
|
||||||
<summary>
|
|
||||||
Client event used to communicate to the client that it is time to stop recording
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="E:DXHook.Interface.CaptureInterface.ScreenshotRequested">
|
|
||||||
<summary>
|
|
||||||
Client event used to communicate to the client that it is time to create a screenshot
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="E:DXHook.Interface.CaptureInterface.Disconnected">
|
|
||||||
<summary>
|
|
||||||
Client event used to notify the hook to exit
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="E:DXHook.Interface.CaptureInterface.DisplayText">
|
|
||||||
<summary>
|
|
||||||
Client event used to display a piece of text in-game
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="E:DXHook.Interface.CaptureInterface.DrawOverlay">
|
|
||||||
<summary>
|
|
||||||
Client event used to (re-)draw an overlay in-game.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.Interface.CaptureInterface.StartRecording(DXHook.Interface.CaptureConfig)">
|
|
||||||
<summary>
|
|
||||||
If not <see cref="P:DXHook.Interface.CaptureInterface.IsRecording"/> will invoke the <see cref="E:DXHook.Interface.CaptureInterface.RecordingStarted"/> event, starting a new recording.
|
|
||||||
</summary>
|
|
||||||
<param name="config">The configuration for the recording</param>
|
|
||||||
<remarks>Handlers in the server and remote process will be be invoked.</remarks>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.Interface.CaptureInterface.StopRecording">
|
|
||||||
<summary>
|
|
||||||
If <see cref="P:DXHook.Interface.CaptureInterface.IsRecording"/>, will invoke the <see cref="E:DXHook.Interface.CaptureInterface.RecordingStopped"/> event, finalising any existing recording.
|
|
||||||
</summary>
|
|
||||||
<remarks>Handlers in the server and remote process will be be invoked.</remarks>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.Interface.CaptureInterface.GetScreenshot">
|
|
||||||
<summary>
|
|
||||||
Get a fullscreen screenshot with the default timeout of 2 seconds
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.Interface.CaptureInterface.GetScreenshot(System.Drawing.Rectangle,System.TimeSpan,System.Nullable{System.Drawing.Size},DXHook.Interface.ImageFormat)">
|
|
||||||
<summary>
|
|
||||||
Get a screenshot of the specified region
|
|
||||||
</summary>
|
|
||||||
<param name="region">the region to capture (x=0,y=0 is top left corner)</param>
|
|
||||||
<param name="timeout">maximum time to wait for the screenshot</param>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.Interface.CaptureInterface.Disconnect">
|
|
||||||
<summary>
|
|
||||||
Tell the client process to disconnect
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.Interface.CaptureInterface.Message(DXHook.Interface.MessageType,System.String,System.Object[])">
|
|
||||||
<summary>
|
|
||||||
Send a message to all handlers of <see cref="E:DXHook.Interface.CaptureInterface.RemoteMessage"/>.
|
|
||||||
</summary>
|
|
||||||
<param name="messageType"></param>
|
|
||||||
<param name="format"></param>
|
|
||||||
<param name="args"></param>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.Interface.CaptureInterface.DisplayInGameText(System.String)">
|
|
||||||
<summary>
|
|
||||||
Display text in-game for the default duration of 5 seconds
|
|
||||||
</summary>
|
|
||||||
<param name="text"></param>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.Interface.CaptureInterface.DisplayInGameText(System.String,System.TimeSpan)">
|
|
||||||
<summary>
|
|
||||||
|
|
||||||
</summary>
|
|
||||||
<param name="text"></param>
|
|
||||||
<param name="duration"></param>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.Interface.CaptureInterface.DrawOverlayInGame(DXHook.Hook.Common.IOverlay)">
|
|
||||||
<summary>
|
|
||||||
Replace the in-game overlay with the one provided.
|
|
||||||
|
|
||||||
Note: this is not designed for fast updates (i.e. only a couple of times per second)
|
|
||||||
</summary>
|
|
||||||
<param name="overlay"></param>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.Interface.CaptureInterface.Ping">
|
|
||||||
<summary>
|
|
||||||
Used to confirm connection to IPC server channel
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="T:DXHook.Interface.ClientCaptureInterfaceEventProxy">
|
|
||||||
<summary>
|
|
||||||
Client event proxy for marshalling event handlers
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="E:DXHook.Interface.ClientCaptureInterfaceEventProxy.RecordingStarted">
|
|
||||||
<summary>
|
|
||||||
Client event used to communicate to the client that it is time to start recording
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="E:DXHook.Interface.ClientCaptureInterfaceEventProxy.RecordingStopped">
|
|
||||||
<summary>
|
|
||||||
Client event used to communicate to the client that it is time to stop recording
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="E:DXHook.Interface.ClientCaptureInterfaceEventProxy.ScreenshotRequested">
|
|
||||||
<summary>
|
|
||||||
Client event used to communicate to the client that it is time to create a screenshot
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="E:DXHook.Interface.ClientCaptureInterfaceEventProxy.Disconnected">
|
|
||||||
<summary>
|
|
||||||
Client event used to notify the hook to exit
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="E:DXHook.Interface.ClientCaptureInterfaceEventProxy.DisplayText">
|
|
||||||
<summary>
|
|
||||||
Client event used to display in-game text
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="E:DXHook.Interface.ClientCaptureInterfaceEventProxy.DrawOverlay">
|
|
||||||
<summary>
|
|
||||||
Client event used to (re-)draw an overlay in-game.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="T:DXHook.Interface.DrawOverlayEventArgs">
|
|
||||||
<summary>
|
|
||||||
Note: Deliberately not using MarshalByRefObj
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.Interface.Screenshot.Disconnect">
|
|
||||||
<summary>
|
|
||||||
Disconnects the remoting channel(s) of this object and all nested objects.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.Interface.ScreenshotRequest.Disconnect">
|
|
||||||
<summary>
|
|
||||||
Disconnects the remoting channel(s) of this object and all nested objects.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.NativeMethods.ShowWindow(System.IntPtr,DXHook.NativeMethods.WindowShowStyle)">
|
|
||||||
<summary>Shows a Window</summary>
|
|
||||||
<remarks>
|
|
||||||
<para>To perform certain special effects when showing or hiding a
|
|
||||||
window, use AnimateWindow.</para>
|
|
||||||
<para>The first time an application calls ShowWindow, it should use
|
|
||||||
the WinMain function's nCmdShow parameter as its nCmdShow parameter.
|
|
||||||
Subsequent calls to ShowWindow must use one of the values in the
|
|
||||||
given list, instead of the one specified by the WinMain function's
|
|
||||||
nCmdShow parameter.</para>
|
|
||||||
<para>As noted in the discussion of the nCmdShow parameter, the
|
|
||||||
nCmdShow value is ignored in the first call to ShowWindow if the
|
|
||||||
program that launched the application specifies startup information
|
|
||||||
in the structure. In this case, ShowWindow uses the information
|
|
||||||
specified in the STARTUPINFO structure to show the window. On
|
|
||||||
subsequent calls, the application must call ShowWindow with nCmdShow
|
|
||||||
set to SW_SHOWDEFAULT to use the startup information provided by the
|
|
||||||
program that launched the application. This behavior is designed for
|
|
||||||
the following situations: </para>
|
|
||||||
<list type="">
|
|
||||||
<item>Applications create their main window by calling CreateWindow
|
|
||||||
with the WS_VISIBLE flag set. </item>
|
|
||||||
<item>Applications create their main window by calling CreateWindow
|
|
||||||
with the WS_VISIBLE flag cleared, and later call ShowWindow with the
|
|
||||||
SW_SHOW flag set to make it visible.</item>
|
|
||||||
</list></remarks>
|
|
||||||
<param name="hWnd">Handle to the window.</param>
|
|
||||||
<param name="nCmdShow">Specifies how the window is to be shown.
|
|
||||||
This parameter is ignored the first time an application calls
|
|
||||||
ShowWindow, if the program that launched the application provides a
|
|
||||||
STARTUPINFO structure. Otherwise, the first time ShowWindow is called,
|
|
||||||
the value should be the value obtained by the WinMain function in its
|
|
||||||
nCmdShow parameter. In subsequent calls, this parameter can be one of
|
|
||||||
the WindowShowStyle members.</param>
|
|
||||||
<returns>
|
|
||||||
If the window was previously visible, the return value is nonzero.
|
|
||||||
If the window was previously hidden, the return value is zero.
|
|
||||||
</returns>
|
|
||||||
</member>
|
|
||||||
<member name="T:DXHook.NativeMethods.WindowShowStyle">
|
|
||||||
<summary>Enumeration of the different ways of showing a window using
|
|
||||||
ShowWindow</summary>
|
|
||||||
</member>
|
|
||||||
<member name="F:DXHook.NativeMethods.WindowShowStyle.Hide">
|
|
||||||
<summary>Hides the window and activates another window.</summary>
|
|
||||||
<remarks>See SW_HIDE</remarks>
|
|
||||||
</member>
|
|
||||||
<member name="F:DXHook.NativeMethods.WindowShowStyle.ShowNormal">
|
|
||||||
<summary>Activates and displays a window. If the window is minimized
|
|
||||||
or maximized, the system restores it to its original size and
|
|
||||||
position. An application should specify this flag when displaying
|
|
||||||
the window for the first time.</summary>
|
|
||||||
<remarks>See SW_SHOWNORMAL</remarks>
|
|
||||||
</member>
|
|
||||||
<member name="F:DXHook.NativeMethods.WindowShowStyle.ShowMinimized">
|
|
||||||
<summary>Activates the window and displays it as a minimized window.</summary>
|
|
||||||
<remarks>See SW_SHOWMINIMIZED</remarks>
|
|
||||||
</member>
|
|
||||||
<member name="F:DXHook.NativeMethods.WindowShowStyle.ShowMaximized">
|
|
||||||
<summary>Activates the window and displays it as a maximized window.</summary>
|
|
||||||
<remarks>See SW_SHOWMAXIMIZED</remarks>
|
|
||||||
</member>
|
|
||||||
<member name="F:DXHook.NativeMethods.WindowShowStyle.Maximize">
|
|
||||||
<summary>Maximizes the specified window.</summary>
|
|
||||||
<remarks>See SW_MAXIMIZE</remarks>
|
|
||||||
</member>
|
|
||||||
<member name="F:DXHook.NativeMethods.WindowShowStyle.ShowNormalNoActivate">
|
|
||||||
<summary>Displays a window in its most recent size and position.
|
|
||||||
This value is similar to "ShowNormal", except the window is not
|
|
||||||
actived.</summary>
|
|
||||||
<remarks>See SW_SHOWNOACTIVATE</remarks>
|
|
||||||
</member>
|
|
||||||
<member name="F:DXHook.NativeMethods.WindowShowStyle.Show">
|
|
||||||
<summary>Activates the window and displays it in its current size
|
|
||||||
and position.</summary>
|
|
||||||
<remarks>See SW_SHOW</remarks>
|
|
||||||
</member>
|
|
||||||
<member name="F:DXHook.NativeMethods.WindowShowStyle.Minimize">
|
|
||||||
<summary>Minimizes the specified window and activates the next
|
|
||||||
top-level window in the Z order.</summary>
|
|
||||||
<remarks>See SW_MINIMIZE</remarks>
|
|
||||||
</member>
|
|
||||||
<member name="F:DXHook.NativeMethods.WindowShowStyle.ShowMinNoActivate">
|
|
||||||
<summary>Displays the window as a minimized window. This value is
|
|
||||||
similar to "ShowMinimized", except the window is not activated.</summary>
|
|
||||||
<remarks>See SW_SHOWMINNOACTIVE</remarks>
|
|
||||||
</member>
|
|
||||||
<member name="F:DXHook.NativeMethods.WindowShowStyle.ShowNoActivate">
|
|
||||||
<summary>Displays the window in its current size and position. This
|
|
||||||
value is similar to "Show", except the window is not activated.</summary>
|
|
||||||
<remarks>See SW_SHOWNA</remarks>
|
|
||||||
</member>
|
|
||||||
<member name="F:DXHook.NativeMethods.WindowShowStyle.Restore">
|
|
||||||
<summary>Activates and displays the window. If the window is
|
|
||||||
minimized or maximized, the system restores it to its original size
|
|
||||||
and position. An application should specify this flag when restoring
|
|
||||||
a minimized window.</summary>
|
|
||||||
<remarks>See SW_RESTORE</remarks>
|
|
||||||
</member>
|
|
||||||
<member name="F:DXHook.NativeMethods.WindowShowStyle.ShowDefault">
|
|
||||||
<summary>Sets the show state based on the SW_ value specified in the
|
|
||||||
STARTUPINFO structure passed to the CreateProcess function by the
|
|
||||||
program that started the application.</summary>
|
|
||||||
<remarks>See SW_SHOWDEFAULT</remarks>
|
|
||||||
</member>
|
|
||||||
<member name="F:DXHook.NativeMethods.WindowShowStyle.ForceMinimized">
|
|
||||||
<summary>Windows 2000/XP: Minimizes a window, even if the thread
|
|
||||||
that owns the window is hung. This flag should only be used when
|
|
||||||
minimizing windows from a different thread.</summary>
|
|
||||||
<remarks>See SW_FORCEMINIMIZE</remarks>
|
|
||||||
</member>
|
|
||||||
<member name="M:DXHook.NativeMethods.GetForegroundWindow">
|
|
||||||
<summary>
|
|
||||||
The GetForegroundWindow function returns a handle to the foreground window.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="T:SharpDX.Component">
|
|
||||||
<summary>
|
|
||||||
A disposable component base class.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="P:SharpDX.Component.DisposeCollector">
|
|
||||||
<summary>
|
|
||||||
Gets or sets the disposables.
|
|
||||||
</summary>
|
|
||||||
<value>The disposables.</value>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.Component.#ctor">
|
|
||||||
<summary>
|
|
||||||
Initializes a new instance of the <see cref="T:SharpDX.Component"/> class.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.Component.#ctor(System.String)">
|
|
||||||
<summary>
|
|
||||||
Initializes a new instance of the <see cref="T:SharpDX.Component" /> class with an immutable name.
|
|
||||||
</summary>
|
|
||||||
<param name="name">The name.</param>
|
|
||||||
</member>
|
|
||||||
<member name="P:SharpDX.Component.IsAttached">
|
|
||||||
<summary>
|
|
||||||
Gets or sets a value indicating whether this instance is attached to a collector.
|
|
||||||
</summary>
|
|
||||||
<value>
|
|
||||||
<c>true</c> if this instance is attached to a collector; otherwise, <c>false</c>.
|
|
||||||
</value>
|
|
||||||
</member>
|
|
||||||
<member name="P:SharpDX.Component.IsDisposed">
|
|
||||||
<summary>
|
|
||||||
Gets a value indicating whether this instance is disposed.
|
|
||||||
</summary>
|
|
||||||
<value>
|
|
||||||
<c>true</c> if this instance is disposed; otherwise, <c>false</c>.
|
|
||||||
</value>
|
|
||||||
</member>
|
|
||||||
<member name="E:SharpDX.Component.Disposing">
|
|
||||||
<summary>
|
|
||||||
Occurs when when Dispose is called.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.Component.Dispose">
|
|
||||||
<summary>
|
|
||||||
Releases unmanaged and - optionally - managed resources
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.Component.Dispose(System.Boolean)">
|
|
||||||
<summary>
|
|
||||||
Disposes of object resources.
|
|
||||||
</summary>
|
|
||||||
<param name="disposeManagedResources">If true, managed resources should be
|
|
||||||
disposed of in addition to unmanaged resources.</param>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.Component.ToDispose``1(``0)">
|
|
||||||
<summary>
|
|
||||||
Adds a disposable object to the list of the objects to dispose.
|
|
||||||
</summary>
|
|
||||||
<param name="toDisposeArg">To dispose.</param>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.Component.RemoveAndDispose``1(``0@)">
|
|
||||||
<summary>
|
|
||||||
Dispose a disposable object and set the reference to null. Removes this object from the ToDispose list.
|
|
||||||
</summary>
|
|
||||||
<param name="objectToDispose">Object to dispose.</param>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.Component.RemoveToDispose``1(``0)">
|
|
||||||
<summary>
|
|
||||||
Removes a disposable object to the list of the objects to dispose.
|
|
||||||
</summary>
|
|
||||||
<typeparam name="T"></typeparam>
|
|
||||||
<param name="toDisposeArg">To dispose.</param>
|
|
||||||
</member>
|
|
||||||
<member name="T:SharpDX.ComponentBase">
|
|
||||||
<summary>
|
|
||||||
A lightweight Component base class.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="F:SharpDX.ComponentBase.name">
|
|
||||||
<summary>
|
|
||||||
Occurs while this component is disposing and before it is disposed.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="F:SharpDX.ComponentBase.isNameImmutable">
|
|
||||||
<summary>
|
|
||||||
Gets or sets a value indicating whether the name of this instance is immutable.
|
|
||||||
</summary>
|
|
||||||
<value><c>true</c> if this instance is name immutable; otherwise, <c>false</c>.</value>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.ComponentBase.#ctor">
|
|
||||||
<summary>
|
|
||||||
Initializes a new instance of the <see cref="T:SharpDX.ComponentBase" /> class with a mutable name.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.ComponentBase.#ctor(System.String)">
|
|
||||||
<summary>
|
|
||||||
Initializes a new instance of the <see cref="T:SharpDX.ComponentBase" /> class with an immutable name.
|
|
||||||
</summary>
|
|
||||||
<param name="name">The name.</param>
|
|
||||||
</member>
|
|
||||||
<member name="P:SharpDX.ComponentBase.Name">
|
|
||||||
<summary>
|
|
||||||
Gets the name of this component.
|
|
||||||
</summary>
|
|
||||||
<value>The name.</value>
|
|
||||||
</member>
|
|
||||||
<member name="P:SharpDX.ComponentBase.Tag">
|
|
||||||
<summary>
|
|
||||||
Gets or sets the tag associated to this object.
|
|
||||||
</summary>
|
|
||||||
<value>The tag.</value>
|
|
||||||
</member>
|
|
||||||
<member name="E:SharpDX.ComponentBase.PropertyChanged">
|
|
||||||
<summary>
|
|
||||||
Occurs when a property value changes.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="T:SharpDX.IComponent">
|
|
||||||
<summary>
|
|
||||||
Base interface for a component base.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="P:SharpDX.IComponent.Name">
|
|
||||||
<summary>
|
|
||||||
Gets the name of this component.
|
|
||||||
</summary>
|
|
||||||
<value>The name.</value>
|
|
||||||
</member>
|
|
||||||
</members>
|
|
||||||
</doc>
|
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
@ -1,469 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
<doc>
|
|
||||||
<assembly>
|
|
||||||
<name>SharpDX.Desktop</name>
|
|
||||||
</assembly>
|
|
||||||
<members>
|
|
||||||
<member name="T:SharpDX.Diagnostics.VSGraphicsDebugger">
|
|
||||||
<summary>
|
|
||||||
Helper class to allow programmatic capturing of graphics information that can be loaded later in Visual Studio.
|
|
||||||
This is a managed implementation of the VsDbg class (http://msdn.microsoft.com/en-us/library/vstudio/dn440549.aspx).
|
|
||||||
Requires to have installed VS Remote Tools.
|
|
||||||
http://msdn.microsoft.com/en-us/library/vstudio/hh708963.aspx
|
|
||||||
http://msdn.microsoft.com/en-us/library/vstudio/hh780905.aspx
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="T:SharpDX.Diagnostics.VSGraphicsDebugger.CaptureToken">
|
|
||||||
<summary>
|
|
||||||
Helper structure to ease the begin/end graphics capturing
|
|
||||||
</summary>
|
|
||||||
<example>
|
|
||||||
var debugger = new VSGraphicsDebugger();
|
|
||||||
using(debugger.BeginCapture())
|
|
||||||
{
|
|
||||||
...
|
|
||||||
}
|
|
||||||
</example>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.Diagnostics.VSGraphicsDebugger.CaptureToken.#ctor(SharpDX.Diagnostics.VSGraphicsDebugger)">
|
|
||||||
<summary>
|
|
||||||
Creates a new instance of the <see cref="T:SharpDX.Diagnostics.VSGraphicsDebugger.CaptureToken"/> structure.
|
|
||||||
</summary>
|
|
||||||
<param name="debugger">The attanched graphics debugger.</param>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.Diagnostics.VSGraphicsDebugger.CaptureToken.Dispose">
|
|
||||||
<summary>
|
|
||||||
Ends the capture by calling <see cref="M:SharpDX.Diagnostics.VSGraphicsDebugger.EndCapture"/>.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.Diagnostics.VSGraphicsDebugger.#ctor(System.String)">
|
|
||||||
<summary>
|
|
||||||
Creates a new instance of the <see cref="T:SharpDX.Diagnostics.VSGraphicsDebugger"/> class and prepares the in-app component of graphics diagnostics to actively capture and record graphics information..
|
|
||||||
</summary>
|
|
||||||
<param name="logFileName">The destination filename for log writing.</param>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.Diagnostics.VSGraphicsDebugger.CopyLogFile(System.String)">
|
|
||||||
<summary>
|
|
||||||
Copies the contents of the active graphics log (.vsglog) file into a new file.
|
|
||||||
</summary>
|
|
||||||
<param name="destinationFileName">The new log file name.</param>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.Diagnostics.VSGraphicsDebugger.ToggleHUD">
|
|
||||||
<summary>
|
|
||||||
Toggles the graphics diagnostics HUD overlay on or off.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.Diagnostics.VSGraphicsDebugger.AddHUDMessage(System.String)">
|
|
||||||
<summary>
|
|
||||||
Adds a custom message to the graphics diagnostics HUD (Head-Up Display).
|
|
||||||
</summary>
|
|
||||||
<param name="message">The message to add.</param>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.Diagnostics.VSGraphicsDebugger.CaptureCurrentFrame">
|
|
||||||
<summary>
|
|
||||||
Captures the remainder of the current frame to the graphics log file.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.Diagnostics.VSGraphicsDebugger.BeginCapture">
|
|
||||||
<summary>
|
|
||||||
Begins a capture interval that will end with <see cref="M:SharpDX.Diagnostics.VSGraphicsDebugger.EndCapture"/>.
|
|
||||||
</summary>
|
|
||||||
<returns>A <see cref="T:SharpDX.Diagnostics.VSGraphicsDebugger.CaptureToken"/> instance that once disposed, calls automatically the <see cref="M:SharpDX.Diagnostics.VSGraphicsDebugger.EndCapture"/> method.</returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.Diagnostics.VSGraphicsDebugger.EndCapture">
|
|
||||||
<summary>
|
|
||||||
Ends a capture interval that was started with <see cref="M:SharpDX.Diagnostics.VSGraphicsDebugger.BeginCapture"/>.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.Diagnostics.VSGraphicsDebugger.Dispose(System.Boolean)">
|
|
||||||
<summary>
|
|
||||||
Finalizes the graphics log file, closes it, and frees resources that were used while the app was actively recording graphics information.
|
|
||||||
</summary>
|
|
||||||
<param name="disposing">Ignored.</param>
|
|
||||||
</member>
|
|
||||||
<member name="T:SharpDX.Direct3D.PixHelper">
|
|
||||||
<summary>
|
|
||||||
Helper class for PIX.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.Direct3D.PixHelper.BeginEvent(SharpDX.Mathematics.Interop.RawColorBGRA,System.String)">
|
|
||||||
<summary>
|
|
||||||
Marks the beginning of a user-defined event. PIX can use this event to trigger an action.
|
|
||||||
</summary>
|
|
||||||
<param name="color">The Event color.</param>
|
|
||||||
<param name="name">The Event Name.</param>
|
|
||||||
<returns>The zero-based level of the hierarchy that this event is starting in. If an error occurs, the return value will be negative.</returns>
|
|
||||||
<unmanaged>D3DPERF_BeginEvent</unmanaged>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.Direct3D.PixHelper.BeginEvent(SharpDX.Mathematics.Interop.RawColorBGRA,System.String,System.Object[])">
|
|
||||||
<summary>
|
|
||||||
Marks the beginning of a user-defined event. PIX can use this event to trigger an action.
|
|
||||||
</summary>
|
|
||||||
<param name="color">The Event color.</param>
|
|
||||||
<param name="name">The Event formatted Name.</param>
|
|
||||||
<param name="parameters">The parameters to use for the formatted name.</param>
|
|
||||||
<returns>
|
|
||||||
The zero-based level of the hierarchy that this event is starting in. If an error occurs, the return value will be negative.
|
|
||||||
</returns>
|
|
||||||
<unmanaged>D3DPERF_BeginEvent</unmanaged>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.Direct3D.PixHelper.EndEvent">
|
|
||||||
<summary>
|
|
||||||
Mark the end of a user-defined event. PIX can use this event to trigger an action.
|
|
||||||
</summary>
|
|
||||||
<returns>The level of the hierarchy in which the event is ending. If an error occurs, this value is negative.</returns>
|
|
||||||
<unmanaged>D3DPERF_EndEvent</unmanaged>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.Direct3D.PixHelper.SetMarker(SharpDX.Mathematics.Interop.RawColorBGRA,System.String)">
|
|
||||||
<summary>
|
|
||||||
Mark an instantaneous event. PIX can use this event to trigger an action.
|
|
||||||
</summary>
|
|
||||||
<param name="color">The color.</param>
|
|
||||||
<param name="name">The name.</param>
|
|
||||||
<unmanaged>D3DPERF_SetMarker</unmanaged>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.Direct3D.PixHelper.SetMarker(SharpDX.Mathematics.Interop.RawColorBGRA,System.String,System.Object[])">
|
|
||||||
<summary>
|
|
||||||
Mark an instantaneous event. PIX can use this event to trigger an action.
|
|
||||||
</summary>
|
|
||||||
<param name="color">The color.</param>
|
|
||||||
<param name="name">The name to format.</param>
|
|
||||||
<param name="parameters">The parameters to use to format the name.</param>
|
|
||||||
<unmanaged>D3DPERF_SetMarker</unmanaged>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.Direct3D.PixHelper.AllowProfiling(System.Boolean)">
|
|
||||||
<summary>
|
|
||||||
Set this to false to notify PIX that the target program does not give permission to be profiled.
|
|
||||||
</summary>
|
|
||||||
<param name="enableFlag">if set to <c>true</c> PIX profiling is authorized. Default to true.</param>
|
|
||||||
<unmanaged>D3DPERF_SetOptions</unmanaged>
|
|
||||||
</member>
|
|
||||||
<member name="P:SharpDX.Direct3D.PixHelper.IsCurrentlyProfiled">
|
|
||||||
<summary>
|
|
||||||
Gets a value indicating whether this instance is currently profiled by PIX.
|
|
||||||
</summary>
|
|
||||||
<value>
|
|
||||||
<c>true</c> if this instance is currently profiled; otherwise, <c>false</c>.
|
|
||||||
</value>
|
|
||||||
<unmanaged>D3DPERF_GetStatus</unmanaged>
|
|
||||||
</member>
|
|
||||||
<member name="T:SharpDX.MessageFilterHook">
|
|
||||||
<summary>
|
|
||||||
Provides a hook to WndProc of an existing window handle using <see cref="T:System.Windows.Forms.IMessageFilter"/>.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.MessageFilterHook.#ctor(System.IntPtr)">
|
|
||||||
<summary>
|
|
||||||
Initializes a new instance of the <see cref="!:Win32.MessageFilterHook" /> class.
|
|
||||||
</summary>
|
|
||||||
<param name="hwnd">The HWND.</param>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.MessageFilterHook.AddMessageFilter(System.IntPtr,System.Windows.Forms.IMessageFilter)">
|
|
||||||
<summary>
|
|
||||||
Adds a message filter to a window.
|
|
||||||
</summary>
|
|
||||||
<param name="hwnd">The handle of the window.</param>
|
|
||||||
<param name="messageFilter">The message filter.</param>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.MessageFilterHook.RemoveMessageFilter(System.IntPtr,System.Windows.Forms.IMessageFilter)">
|
|
||||||
<summary>
|
|
||||||
Removes a message filter associated with a window.
|
|
||||||
</summary>
|
|
||||||
<param name="hwnd">The handle of the window.</param>
|
|
||||||
<param name="messageFilter">The message filter.</param>
|
|
||||||
</member>
|
|
||||||
<member name="T:SharpDX.Desktop.Properties.Resources">
|
|
||||||
<summary>
|
|
||||||
A strongly-typed resource class, for looking up localized strings, etc.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="P:SharpDX.Desktop.Properties.Resources.ResourceManager">
|
|
||||||
<summary>
|
|
||||||
Returns the cached ResourceManager instance used by this class.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="P:SharpDX.Desktop.Properties.Resources.Culture">
|
|
||||||
<summary>
|
|
||||||
Overrides the current thread's CurrentUICulture property for all
|
|
||||||
resource lookups using this strongly typed resource class.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="P:SharpDX.Desktop.Properties.Resources.logo">
|
|
||||||
<summary>
|
|
||||||
Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="T:SharpDX.Windows.RenderControl">
|
|
||||||
<summary>
|
|
||||||
A Renderable UserControl.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.Windows.RenderControl.#ctor">
|
|
||||||
<summary>
|
|
||||||
Initializes a new instance of the <see cref="T:SharpDX.Windows.RenderForm"/> class.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.Windows.RenderControl.OnPaintBackground(System.Windows.Forms.PaintEventArgs)">
|
|
||||||
<summary>
|
|
||||||
Paints the background of the control.
|
|
||||||
</summary>
|
|
||||||
<param name="e">A <see cref="T:System.Windows.Forms.PaintEventArgs"/> that contains the event data.</param>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.Windows.RenderControl.OnPaint(System.Windows.Forms.PaintEventArgs)">
|
|
||||||
<summary>
|
|
||||||
Raises the <see cref="E:System.Windows.Forms.Control.Paint"/> event.
|
|
||||||
</summary>
|
|
||||||
<param name="e">A <see cref="T:System.Windows.Forms.PaintEventArgs"/> that contains the event data.</param>
|
|
||||||
</member>
|
|
||||||
<member name="T:SharpDX.Windows.RenderForm">
|
|
||||||
<summary>
|
|
||||||
Default Rendering Form.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.Windows.RenderForm.#ctor">
|
|
||||||
<summary>
|
|
||||||
Initializes a new instance of the <see cref="T:SharpDX.Windows.RenderForm"/> class.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.Windows.RenderForm.#ctor(System.String)">
|
|
||||||
<summary>
|
|
||||||
Initializes a new instance of the <see cref="T:SharpDX.Windows.RenderForm"/> class.
|
|
||||||
</summary>
|
|
||||||
<param name="text">The text.</param>
|
|
||||||
</member>
|
|
||||||
<member name="E:SharpDX.Windows.RenderForm.AppActivated">
|
|
||||||
<summary>
|
|
||||||
Occurs when [app activated].
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="E:SharpDX.Windows.RenderForm.AppDeactivated">
|
|
||||||
<summary>
|
|
||||||
Occurs when [app deactivated].
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="E:SharpDX.Windows.RenderForm.MonitorChanged">
|
|
||||||
<summary>
|
|
||||||
Occurs when [monitor changed].
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="E:SharpDX.Windows.RenderForm.PauseRendering">
|
|
||||||
<summary>
|
|
||||||
Occurs when [pause rendering].
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="E:SharpDX.Windows.RenderForm.ResumeRendering">
|
|
||||||
<summary>
|
|
||||||
Occurs when [resume rendering].
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="E:SharpDX.Windows.RenderForm.Screensaver">
|
|
||||||
<summary>
|
|
||||||
Occurs when [screensaver].
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="E:SharpDX.Windows.RenderForm.SystemResume">
|
|
||||||
<summary>
|
|
||||||
Occurs when [system resume].
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="E:SharpDX.Windows.RenderForm.SystemSuspend">
|
|
||||||
<summary>
|
|
||||||
Occurs when [system suspend].
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="E:SharpDX.Windows.RenderForm.UserResized">
|
|
||||||
<summary>
|
|
||||||
Occurs when [user resized].
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="P:SharpDX.Windows.RenderForm.AllowUserResizing">
|
|
||||||
<summary>
|
|
||||||
Gets or sets a value indicating whether this form can be resized by the user. See remarks.
|
|
||||||
</summary>
|
|
||||||
<remarks>
|
|
||||||
This property alters <see cref="P:System.Windows.Forms.Form.FormBorderStyle"/>,
|
|
||||||
for <c>true</c> value it is <see cref="F:System.Windows.Forms.FormBorderStyle.Sizable"/>,
|
|
||||||
for <c>false</c> - <see cref="F:System.Windows.Forms.FormBorderStyle.FixedSingle"/>.
|
|
||||||
</remarks>
|
|
||||||
<value><c>true</c> if this form can be resized by the user (by default); otherwise, <c>false</c>.</value>
|
|
||||||
</member>
|
|
||||||
<member name="P:SharpDX.Windows.RenderForm.IsFullscreen">
|
|
||||||
<summary>
|
|
||||||
Gets or sets a value indicationg whether the current render form is in fullscreen mode. See remarks.
|
|
||||||
</summary>
|
|
||||||
<remarks>
|
|
||||||
If Toolkit is used, this property is set automatically,
|
|
||||||
otherwise user should maintain it himself as it affects the behavior of <see cref="P:SharpDX.Windows.RenderForm.AllowUserResizing"/> property.
|
|
||||||
</remarks>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.Windows.RenderForm.OnResizeBegin(System.EventArgs)">
|
|
||||||
<summary>
|
|
||||||
Raises the <see cref="E:System.Windows.Forms.Form.ResizeBegin"/> event.
|
|
||||||
</summary>
|
|
||||||
<param name="e">A <see cref="T:System.EventArgs"/> that contains the event data.</param>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.Windows.RenderForm.OnResizeEnd(System.EventArgs)">
|
|
||||||
<summary>
|
|
||||||
Raises the <see cref="E:System.Windows.Forms.Form.ResizeEnd"/> event.
|
|
||||||
</summary>
|
|
||||||
<param name="e">A <see cref="T:System.EventArgs"/> that contains the event data.</param>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.Windows.RenderForm.OnLoad(System.EventArgs)">
|
|
||||||
<summary>
|
|
||||||
Raises the <see cref="E:System.Windows.Forms.Form.Load"/> event.
|
|
||||||
</summary>
|
|
||||||
<param name="e">An <see cref="T:System.EventArgs"/> that contains the event data.</param>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.Windows.RenderForm.OnPaintBackground(System.Windows.Forms.PaintEventArgs)">
|
|
||||||
<summary>
|
|
||||||
Paints the background of the control.
|
|
||||||
</summary>
|
|
||||||
<param name="e">A <see cref="T:System.Windows.Forms.PaintEventArgs"/> that contains the event data.</param>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.Windows.RenderForm.OnPauseRendering(System.EventArgs)">
|
|
||||||
<summary>
|
|
||||||
Raises the Pause Rendering event.
|
|
||||||
</summary>
|
|
||||||
<param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.Windows.RenderForm.OnResumeRendering(System.EventArgs)">
|
|
||||||
<summary>
|
|
||||||
Raises the Resume Rendering event.
|
|
||||||
</summary>
|
|
||||||
<param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.Windows.RenderForm.OnUserResized(System.EventArgs)">
|
|
||||||
<summary>
|
|
||||||
Raises the User resized event.
|
|
||||||
</summary>
|
|
||||||
<param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.Windows.RenderForm.OnAppActivated(System.EventArgs)">
|
|
||||||
<summary>
|
|
||||||
Raises the On App Activated event.
|
|
||||||
</summary>
|
|
||||||
<param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.Windows.RenderForm.OnAppDeactivated(System.EventArgs)">
|
|
||||||
<summary>
|
|
||||||
Raises the App Deactivated event
|
|
||||||
</summary>
|
|
||||||
<param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.Windows.RenderForm.OnSystemSuspend(System.EventArgs)">
|
|
||||||
<summary>
|
|
||||||
Raises the System Suspend event
|
|
||||||
</summary>
|
|
||||||
<param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.Windows.RenderForm.OnSystemResume(System.EventArgs)">
|
|
||||||
<summary>
|
|
||||||
Raises the System Resume event
|
|
||||||
</summary>
|
|
||||||
<param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.Windows.RenderForm.OnScreensaver(System.ComponentModel.CancelEventArgs)">
|
|
||||||
<summary>
|
|
||||||
Raises the <see cref="E:Screensaver"/> event.
|
|
||||||
</summary>
|
|
||||||
<param name="e">The <see cref="T:System.ComponentModel.CancelEventArgs"/> instance containing the event data.</param>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.Windows.RenderForm.WndProc(System.Windows.Forms.Message@)">
|
|
||||||
<summary>
|
|
||||||
Override windows message loop handling.
|
|
||||||
</summary>
|
|
||||||
<param name="m">The Windows <see cref="T:System.Windows.Forms.Message"/> to process.</param>
|
|
||||||
</member>
|
|
||||||
<member name="T:SharpDX.Windows.RenderLoop">
|
|
||||||
<summary>
|
|
||||||
RenderLoop provides a rendering loop infrastructure. See remarks for usage.
|
|
||||||
</summary>
|
|
||||||
<remarks>
|
|
||||||
Use static <see cref="!:Run(System.Windows.Forms.Control,SharpDX.Windows.RenderLoop.RenderCallback)"/>
|
|
||||||
method to directly use a renderloop with a render callback or use your own loop:
|
|
||||||
<code>
|
|
||||||
control.Show();
|
|
||||||
using (var loop = new RenderLoop(control))
|
|
||||||
{
|
|
||||||
while (loop.NextFrame())
|
|
||||||
{
|
|
||||||
// Perform draw operations here.
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</code>
|
|
||||||
Note that the main control can be changed at anytime inside the loop.
|
|
||||||
</remarks>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.Windows.RenderLoop.#ctor">
|
|
||||||
<summary>
|
|
||||||
Initializes a new instance of the <see cref="T:SharpDX.Windows.RenderLoop"/> class.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.Windows.RenderLoop.#ctor(System.Windows.Forms.Control)">
|
|
||||||
<summary>
|
|
||||||
Initializes a new instance of the <see cref="T:SharpDX.Windows.RenderLoop"/> class.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="P:SharpDX.Windows.RenderLoop.Control">
|
|
||||||
<summary>
|
|
||||||
Gets or sets the control to associate with the current render loop.
|
|
||||||
</summary>
|
|
||||||
<value>The control.</value>
|
|
||||||
<exception cref="T:System.InvalidOperationException">Control is already disposed</exception>
|
|
||||||
</member>
|
|
||||||
<member name="P:SharpDX.Windows.RenderLoop.UseApplicationDoEvents">
|
|
||||||
<summary>
|
|
||||||
Gets or sets a value indicating whether the render loop should use the default <see cref="M:System.Windows.Forms.Application.DoEvents"/> instead of a custom window message loop lightweight for GC. Default is false.
|
|
||||||
</summary>
|
|
||||||
<value><c>true</c> if the render loop should use the default <see cref="M:System.Windows.Forms.Application.DoEvents"/> instead of a custom window message loop (default false); otherwise, <c>false</c>.</value>
|
|
||||||
<remarks>By default, RenderLoop is using a custom window message loop that is more lightweight than <see cref="M:System.Windows.Forms.Application.DoEvents" /> to process windows event message.
|
|
||||||
Set this parameter to true to use the default <see cref="M:System.Windows.Forms.Application.DoEvents"/>.</remarks>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.Windows.RenderLoop.NextFrame">
|
|
||||||
<summary>
|
|
||||||
Calls this method on each frame.
|
|
||||||
</summary>
|
|
||||||
<returns><c>true</c> if if the control is still active, <c>false</c> otherwise.</returns>
|
|
||||||
<exception cref="T:System.InvalidOperationException">An error occured </exception>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.Windows.RenderLoop.Dispose">
|
|
||||||
<summary>
|
|
||||||
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="T:SharpDX.Windows.RenderLoop.RenderCallback">
|
|
||||||
<summary>
|
|
||||||
Delegate for the rendering loop.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.Windows.RenderLoop.Run(System.Windows.Forms.ApplicationContext,SharpDX.Windows.RenderLoop.RenderCallback)">
|
|
||||||
<summary>
|
|
||||||
Runs the specified main loop in the specified context.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:SharpDX.Windows.RenderLoop.Run(System.Windows.Forms.Control,SharpDX.Windows.RenderLoop.RenderCallback,System.Boolean)">
|
|
||||||
<summary>
|
|
||||||
Runs the specified main loop for the specified windows form.
|
|
||||||
</summary>
|
|
||||||
<param name="form">The form.</param>
|
|
||||||
<param name="renderCallback">The rendering callback.</param>
|
|
||||||
<param name="useApplicationDoEvents">if set to <c>true</c> indicating whether the render loop should use the default <see cref="M:System.Windows.Forms.Application.DoEvents"/> instead of a custom window message loop lightweight for GC. Default is false.</param>
|
|
||||||
<exception cref="T:System.ArgumentNullException">form
|
|
||||||
or
|
|
||||||
renderCallback</exception>
|
|
||||||
</member>
|
|
||||||
<member name="P:SharpDX.Windows.RenderLoop.IsIdle">
|
|
||||||
<summary>
|
|
||||||
Gets a value indicating whether this instance is application idle.
|
|
||||||
</summary>
|
|
||||||
<value>
|
|
||||||
<c>true</c> if this instance is application idle; otherwise, <c>false</c>.
|
|
||||||
</value>
|
|
||||||
</member>
|
|
||||||
<member name="T:SharpDX.Win32Native">
|
|
||||||
<summary>
|
|
||||||
Internal class to interact with Native Message
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
</members>
|
|
||||||
</doc>
|
|
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
libs/LemonUI.SHVDNC.dll
Normal file
BIN
libs/LemonUI.SHVDNC.dll
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
47057
libs/NativeInvoker.xml
47057
libs/NativeInvoker.xml
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user