mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-10 15:20:48 -05:00
force bots to all use the same profile
use C# 7.1 for projects
This commit is contained in:
@ -730,7 +730,7 @@ namespace SharedLibraryCore.Database.Models
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return (int)NetworkId;
|
||||
return IsBot ? ClientNumber : (int)NetworkId;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -12,6 +12,7 @@
|
||||
<Company>Forever None</Company>
|
||||
<Configurations>Debug;Release;Prerelease</Configurations>
|
||||
<PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest>
|
||||
<LangVersion>7.1</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -270,7 +270,6 @@ namespace SharedLibraryCore
|
||||
{
|
||||
str = str.Substring(0, Math.Min(str.Length, 16));
|
||||
var bot = Regex.Match(str, @"bot[0-9]+").Value;
|
||||
int maxBots = 18;
|
||||
|
||||
// this is a special case for Plutonium T6
|
||||
if (str.Length <= 11 &&
|
||||
@ -285,8 +284,7 @@ namespace SharedLibraryCore
|
||||
|
||||
else if (!string.IsNullOrEmpty(bot))
|
||||
{
|
||||
// should set their GUID to the negation of their 1 based index (-1 - -18)
|
||||
id = -(Convert.ToInt64(bot.Substring(3)) + 1) % maxBots;
|
||||
id = -1;
|
||||
}
|
||||
|
||||
if (id == 0)
|
||||
|
Reference in New Issue
Block a user