1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-26 15:13:00 -05:00

start work for live radar

This commit is contained in:
RaidMax
2019-06-30 13:37:59 -05:00
parent 1a8c8634b3
commit 02d3a7f861
14 changed files with 384 additions and 49 deletions

View File

@ -1,4 +1,5 @@
using SharedLibraryCore.Helpers;
using SharedLibraryCore;
using SharedLibraryCore.Helpers;
using SharedLibraryCore.Interfaces;
using System;
using System.Collections.Generic;
@ -23,7 +24,7 @@ namespace IW4MAdmin.Plugins.Stats.Cheat
double decayFactor = GetDecay(deltaTime);
CurrentStrain *= decayFactor;
double[] distance = Helpers.Extensions.AngleStuff(newAngle, LastAngle);
double[] distance = Utilities.AngleStuff(newAngle, LastAngle);
LastDistance = distance[0] + distance[1];
#if DEBUG == true

View File

@ -1,34 +0,0 @@
using SharedLibraryCore.Helpers;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace IW4MAdmin.Plugins.Stats.Helpers
{
static class Extensions
{
public static Vector3 FixIW4Angles(this Vector3 vector)
{
float X = vector.X >= 0 ? vector.X : 360.0f + vector.X;
float Y = vector.Y >= 0 ? vector.Y : 360.0f + vector.Y;
float Z = vector.Z >= 0 ? vector.Z : 360.0f + vector.Z;
return new Vector3(Y, X, Z);
}
public static float ToRadians(this float value) => (float)Math.PI * value / 180.0f;
public static float ToDegrees(this float value) => value * 180.0f / (float)Math.PI;
public static double[] AngleStuff(Vector3 a, Vector3 b)
{
double deltaX = 180.0 - Math.Abs(Math.Abs(a.X - b.X) - 180.0);
double deltaY = 180.0 - Math.Abs(Math.Abs(a.Y - b.Y) - 180.0);
return new[] { deltaX, deltaY };
}
}
}

View File

@ -51,18 +51,7 @@ namespace IW4MAdmin.Plugins.Stats
MaxRight = 2447
},
new MinimapInfo()
{
MapName = "mp_rust",
Top = 122,
Bottom = 104,
Left = 155,
Right = 82,
MaxRight = -225,
MaxLeft = 1809,
MaxTop = 1641,
MaxBottom = -469
}
}
};
}