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

vpn check updates, fixed some issues,

"masked" status is now sensitive
discord link in webfront if configured
This commit is contained in:
RaidMax
2018-03-13 16:30:22 -05:00
parent df3bd05f87
commit ae4fa23884
27 changed files with 235 additions and 119 deletions

View File

@ -8,6 +8,9 @@ namespace SharedLibrary.Database
{
public static void Run(ILogger log)
{
if (!System.IO.File.Exists($"{Utilities.OperatingDirectory}Database.sdf"))
return;
SqlCeEngine engine = new SqlCeEngine(@"Data Source=|DataDirectory|\Database.sdf");
if (false == engine.Verify())
{

View File

@ -42,7 +42,7 @@ namespace SharedLibrary
public Event(GType t, string d, Player O, Player T, Server S)
{
Type = t;
Data = d.Trim();
Data = d?.Trim();
Origin = O;
Target = T;
Owner = S;

View File

@ -40,5 +40,12 @@ namespace SharedLibrary.Helpers
{
return Math.Round(Math.Sqrt(Math.Pow(b.X - a.X, 2) + Math.Pow(b.Y - a.Y, 2) + Math.Pow(b.Z - a.Z, 2)), 2);
}
public double DotProduct(Vector3 a) => (a.X * this.X) + (a.Y * this.Y) + (a.Z * this.Z);
public double Magnitude() => Math.Sqrt((X * X) + (Y * Y) + (Z * Z));
public double AngleBetween(Vector3 a) => Math.Acos(this.DotProduct(a) / (a.Magnitude() * this.Magnitude()));
}
}

View File

@ -12,6 +12,8 @@ namespace SharedLibrary
public bool AllowTrustedRank;
public string RestartUsername;
public string RestartPassword;
public bool EnableAntiCheat;
public bool AllowClientVpn;
public override string Filename()
{