Ok, this might look junky...

This commit is contained in:
Sardelka
2022-08-02 17:43:18 +08:00
parent ffd6ce23c3
commit 8d6c70b75e
7 changed files with 2638 additions and 9 deletions

View File

@ -7,6 +7,7 @@ using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Drawing;
using System.Linq;
using System.Windows.Forms;
using System.Threading.Tasks;
@ -168,9 +169,6 @@ namespace RageCoop.Client
Main.Logger.Error(ex);
}
#if DEBUG
if (Networking.ShowNetworkInfo)
{
@ -178,8 +176,6 @@ namespace RageCoop.Client
new LemonUI.Elements.ScaledText(new PointF(Screen.PrimaryScreen.Bounds.Width / 2, 30), $"R: {Lidgren.Network.NetUtility.ToHumanReadable(Statistics.BytesDownPerSecond)}/s", 0.5f) { Alignment = GTA.UI.Alignment.Center }.Draw();
new LemonUI.Elements.ScaledText(new PointF(Screen.PrimaryScreen.Bounds.Width / 2, 60), $"S: {Lidgren.Network.NetUtility.ToHumanReadable(Statistics.BytesUpPerSecond)}/s", 0.5f) { Alignment = GTA.UI.Alignment.Center }.Draw();
}
#endif
MainChat.Tick();

View File

@ -59,7 +59,8 @@ namespace RageCoop.Client
// 623c92c287cc392406e7aaaac1c0f3b0 = RAGECOOP
NetPeerConfiguration config = new NetPeerConfiguration("623c92c287cc392406e7aaaac1c0f3b0")
{
AutoFlushSendQueue = false
AutoFlushSendQueue = false,
SimulatedMinimumLatency =0.3f
};
config.EnableMessageType(NetIncomingMessageType.UnconnectedData);

View File

@ -364,12 +364,13 @@ namespace RageCoop.Client
LastVelocity=_predictedVel;
var current = MainVehicle.ReadPosition();
var dist = current.DistanceTo(Position);
var cali = dist*(_predictedPos - current);
var cali = (dist<1?dist*4:dist)*(_predictedPos - current);
// new LemonUI.Elements.ScaledText(new System.Drawing.PointF(50, 50), dist.ToString()).Draw();
if (dist<8)
{
MainVehicle.Velocity = _predictedVel+cali;
MainVehicle.Velocity = _predictedVel;
MainVehicle.ApplyForce(cali);
if (IsFlipped)
{
MainVehicle.Quaternion=Quaternion.Slerp(MainVehicle.ReadQuaternion(), Quaternion, 0.5f);

2559
libs/Lidgren.Network.XML Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,72 @@
{
"runtimeTarget": {
"name": ".NETStandard,Version=v2.0/",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETStandard,Version=v2.0": {},
".NETStandard,Version=v2.0/": {
"Lidgren.Network/1.0.0": {
"dependencies": {
"Microsoft.CSharp": "4.7.0",
"Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers": "0.4.336902",
"NETStandard.Library": "2.0.3"
},
"runtime": {
"Lidgren.Network.dll": {}
}
},
"Microsoft.CSharp/4.7.0": {
"runtime": {
"lib/netstandard2.0/Microsoft.CSharp.dll": {
"assemblyVersion": "4.0.5.0",
"fileVersion": "4.700.19.56404"
}
}
},
"Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers/0.4.336902": {},
"Microsoft.NETCore.Platforms/1.1.0": {},
"NETStandard.Library/2.0.3": {
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0"
}
}
}
},
"libraries": {
"Lidgren.Network/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"Microsoft.CSharp/4.7.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-pTj+D3uJWyN3My70i2Hqo+OXixq3Os2D1nJ2x92FFo6sk8fYS1m1WLNTs0Dc1uPaViH0YvEEwvzddQ7y4rhXmA==",
"path": "microsoft.csharp/4.7.0",
"hashPath": "microsoft.csharp.4.7.0.nupkg.sha512"
},
"Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers/0.4.336902": {
"type": "package",
"serviceable": true,
"sha512": "sha512-urQDGvwM6vNBClOu8dChtE7fELONWafH5rQOwO2A9YmBgEcbM8qfeaUqALLM4DKnxIu3J2Vm0GkBsApTSwWDog==",
"path": "microsoft.dotnet.upgradeassistant.extensions.default.analyzers/0.4.336902",
"hashPath": "microsoft.dotnet.upgradeassistant.extensions.default.analyzers.0.4.336902.nupkg.sha512"
},
"Microsoft.NETCore.Platforms/1.1.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==",
"path": "microsoft.netcore.platforms/1.1.0",
"hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512"
},
"NETStandard.Library/2.0.3": {
"type": "package",
"serviceable": true,
"sha512": "sha512-st47PosZSHrjECdjeIzZQbzivYBJFv6P2nv4cj2ypdI204DO+vZ7l5raGMiX4eXMJ53RfOIg+/s4DHVZ54Nu2A==",
"path": "netstandard.library/2.0.3",
"hashPath": "netstandard.library.2.0.3.nupkg.sha512"
}
}
}

Binary file not shown.

BIN
libs/Lidgren.Network.pdb Normal file

Binary file not shown.