Small changes

This commit is contained in:
EntenKoeniq
2022-04-08 22:30:34 +02:00
parent 842dfbdab8
commit 244b4148cf
6 changed files with 12 additions and 19 deletions

View File

@ -395,7 +395,7 @@ namespace CoopClient.Entities.Player
if (updatePosition)
{
float lerpValue = ((int)((Latency * 1000 / 2) + Main.MainNetworking.Latency * 1000 / 2)) * 2 / 50000f;
float lerpValue = ((int)((Latency * 1000 / 2) + (Main.MainNetworking.Latency * 1000 / 2))) * 2 / 50000f;
Vector2 biDimensionalPos = Vector2.Lerp(new Vector2(Character.Position.X, Character.Position.Y), new Vector2(Position.X + (Velocity.X / 5), Position.Y + (Velocity.Y / 5)), lerpValue);
float zPos = Util.Lerp(Character.Position.Z, Position.Z, 0.1f);

View File

@ -279,9 +279,9 @@ namespace CoopClient.Entities.Player
}
#region -- PEDALING --
/*
* Thanks to @oldnapalm.
*/
/*
* Thanks to @oldnapalm.
*/
private string PedalingAnimDict()
{

View File

@ -369,12 +369,12 @@ namespace CoopClient
DebugSyncPed = Players[0];
}
if ((Util.GetTickCount64() - ArtificialLagCounter) < 274)
if ((Util.GetTickCount64() - ArtificialLagCounter) < 231)
{
return;
}
bool fullSync = (Util.GetTickCount64() - LastFullDebugSync) > 500;
bool fullSync = (Util.GetTickCount64() - LastFullDebugSync) > 39;
if (fullSync)
{

View File

@ -16,7 +16,7 @@
/// <summary>
/// Don't use it!
/// </summary>
public string MasterServer { get; set; } = "https://ragecoop.online/servers";
public string MasterServer { get; set; } = "https://ragecoop.online/gtav/servers";
/// <summary>
/// Don't use it!
/// </summary>

View File

@ -62,14 +62,14 @@ namespace CoopServer
#endregion
#region FUNCTIONS
public void Kick(string[] reason)
{
Server.MainNetServer.Connections.Find(x => x.RemoteUniqueIdentifier == NetHandle)?.Disconnect(string.Join(" ", reason));
}
public void Kick(string reason)
{
Server.MainNetServer.Connections.Find(x => x.RemoteUniqueIdentifier == NetHandle)?.Disconnect(reason);
}
public void Kick(string[] reason)
{
Kick(string.Join(" ", reason));
}
public void SendChatMessage(string message, string from = "Server")
{

View File

@ -15,11 +15,6 @@ namespace CoopServer
public static void InsertClient(long nethandle)
{
if (!AnyFileExists)
{
return;
}
lock (_clients)
{
_clients.Add(new DownloadClient(nethandle, new(_files)));
@ -28,14 +23,12 @@ namespace CoopServer
public static bool CheckForDirectoryAndFiles()
{
string[] filePaths;
if (!Directory.Exists("clientside"))
{
return false;
}
filePaths = Directory.GetFiles("clientside");
string[] filePaths = Directory.GetFiles("clientside");
if (filePaths.Length == 0)
{
return false;