This commit is contained in:
Regalis
2015-10-31 15:16:49 +02:00
parent bcc96cee97
commit b0deba514e
29 changed files with 348 additions and 81 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ namespace Barotrauma
const float AttackBackPriority = 1.0f;
private AIController aiController;
public override AIController AIController
{
get { return aiController; }
+17 -6
View File
@@ -825,15 +825,26 @@ namespace Barotrauma
{
if (!Enabled) return;
AnimController.SimplePhysicsEnabled = (Character.controlled!=this && Vector2.Distance(cam.WorldViewCenter, Position)>5000.0f);
AnimController.SimplePhysicsEnabled = (Character.controlled != this && Vector2.Distance(cam.WorldViewCenter, Position) > 5000.0f);
if (isDead) return;
if (PressureProtection==0.0f &&
(AnimController.CurrentHull == null || AnimController.CurrentHull.LethalPressure >= 100.0f))
if (!(this is AICharacter))
{
Implode();
return;
bool protectedFromPressure = PressureProtection > 0.0f;
if (Submarine.Loaded!=null && Level.Loaded !=null)
{
protectedFromPressure = protectedFromPressure && (Position-Level.Loaded.Position).Y > SubmarineBody.DamageDepth;
}
if (!protectedFromPressure &&
(AnimController.CurrentHull == null || AnimController.CurrentHull.LethalPressure >= 100.0f))
{
Implode();
return;
}
}
if (controlled == this)