Merge remote-tracking branch 'upstream/master' into 20-10-30-admins

This commit is contained in:
Pieter-Jan Briers
2020-11-10 16:59:17 +01:00
473 changed files with 5588 additions and 3584 deletions

View File

@@ -1,9 +1,9 @@
#nullable enable
using System;
using System.Collections.Generic;
using System.Linq;
using Content.Server.Administration;
using Content.Server.GameObjects.Components.Movement;
using Content.Shared;
using Content.Shared.Administration;
using Content.Shared.GameObjects.Components.Movement;
using JetBrains.Annotations;
@@ -44,7 +44,6 @@ namespace Content.Server.GameObjects.EntitySystems.AI
public override void Initialize()
{
base.Initialize();
_configurationManager.RegisterCVar("ai.maxupdates", 64);
SubscribeLocalEvent<SleepAiMessage>(HandleAiSleep);
var processors = _reflectionManager.GetAllChildren<AiLogicProcessor>();
@@ -60,7 +59,7 @@ namespace Content.Server.GameObjects.EntitySystems.AI
/// <inheritdoc />
public override void Update(float frameTime)
{
var cvarMaxUpdates = _configurationManager.GetCVar<int>("ai.maxupdates");
var cvarMaxUpdates = _configurationManager.GetCVar(CCVars.AIMaxUpdates);
if (cvarMaxUpdates <= 0)
return;