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

prevent partial client updates from setting things they shouldn't be *cough* mask *cough*

setup shared library for NuGet package
fix a couple things with offset detection calc
get cod4x working again
This commit is contained in:
RaidMax
2019-06-13 19:10:08 -05:00
parent 48c86d8cf5
commit d35d569a99
8 changed files with 43 additions and 28 deletions

View File

@ -271,7 +271,7 @@ namespace SharedLibraryCore
public static long ConvertGuidToLong(this string str, long? fallback = null)
{
str = str.Substring(0, Math.Min(str.Length, 16));
str = str.Substring(0, Math.Min(str.Length, 19));
var bot = Regex.Match(str, @"bot[0-9]+").Value;
if (string.IsNullOrWhiteSpace(str) && fallback.HasValue)
@ -279,11 +279,10 @@ namespace SharedLibraryCore
return fallback.Value;
}
// this is a special case for Plutonium T6
if (str.Length <= 11 &&
long.TryParse(str, NumberStyles.Integer, CultureInfo.InvariantCulture, out long id)) // 10 numeric characters + signed character
// this is a special case for Plutonium T6 and CoD4x
if (long.TryParse(str, NumberStyles.Integer, CultureInfo.InvariantCulture, out long id))
{
id = (uint)id;
}
else if (long.TryParse(str, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out id))