Ejemplo n.º 1
0
 public void LoadKeenAi()
 {
     try
     {
         if (KeenAiLoaded)
         {
             return;
         }
         (Rc as MyRemoteControl)?.SetAutoPilotSpeedLimit(Rc.GetSpeedCap());
         MyVisualScriptLogicProvider.SetDroneBehaviourFull(Rc.Name, presetName: _fighterSetup.Preset, maxPlayerDistance: _fighterSetup.SeekDistance, playerPriority: 0, assignToPirates: _fighterSetup.AssignToPirates);
         if (_fighterSetup.AmbushMode)
         {
             MyVisualScriptLogicProvider.DroneSetAmbushMode(Rc.Name);
         }
         MyVisualScriptLogicProvider.TargetingSetWhitelist(Rc.Name);
         KeenAiLoaded = true;
     }
     catch (Exception scrap)
     {
         Grid.LogError("LoadKeenAI", scrap);
     }
 }
Ejemplo n.º 2
0
 private float DetermineFleeSpeed()
 {
     //ShowIngameMessage.ShowMessage($"Flee speed cap: {_freighterSetup.FleeSpeedCap} -- Ratio: {_freighterSetup.FleeSpeedRatio} -- GetSpeedCap: {Rc.GetSpeedCap()}" );
     return(Math.Min(_freighterSetup.FleeSpeedCap, _freighterSetup.FleeSpeedRatio * Rc.GetSpeedCap()));
 }