Tweaked AITarget ranges: now it's possible to evade some monsters by stopping the sub and/or turning off noisy devices, AITarget ranges can be made visible by entering "ShowAITargets" in the console, misc cleanup

This commit is contained in:
Regalis
2016-03-12 21:35:08 +02:00
parent c99f94b1de
commit d713874bd6
11 changed files with 113 additions and 104 deletions
@@ -158,7 +158,7 @@ namespace Barotrauma.Items.Components
shutDownTemp = 500.0f;
powerPerTemp = 1.0f;
IsActive = true;
var button = new GUIButton(new Rectangle(410, 70, 40, 40), "-", GUI.Style, GuiFrame);
@@ -307,7 +307,7 @@ namespace Barotrauma.Items.Components
if (item.CurrentHull != null)
{
//the sound can be heard from 20 000 display units away when everything running at 100%
item.CurrentHull.SoundRange = (coolingRate + fissionRate) * 100;
item.CurrentHull.SoundRange = Math.Max((coolingRate + fissionRate) * 100, item.CurrentHull.AiTarget.SoundRange);
}
UpdateGraph(deltaTime);