internal override void SetCameraFollows(Actor a, bool setCamera = false)
{
var oldfollow = Camera.ActorToFollow;
Camera.ActorToFollow = a.Number;
Variables[VariableCameraFollowedActor.Value] = a.Number;
if (!a.IsInCurrentRoom)
{
StartScene(a.Room);
}
var ax = Math.Abs(a.Position.X - Camera.CurrentPosition.X);
var ay = Math.Abs(a.Position.Y - Camera.CurrentPosition.Y);
if (ax > Variables[VariableCameraThresholdX.Value] || ay > Variables[VariableCameraThresholdY.Value] || ax > (ScreenWidth / 2) || ay > (ScreenHeight / 2))
{
SetCameraAt(a.Position);
}
if (a.Number != oldfollow)
RunInventoryScript(0);
}