(6f4bea467) Updated doors
This commit is contained in:
@@ -635,24 +635,6 @@ namespace Barotrauma
|
||||
var character = ((Limb)f2.Body.UserData).character;
|
||||
if (character.DisableImpactDamageTimer > 0.0f || ((Limb)f2.Body.UserData).Mass < 100.0f) return true;
|
||||
}
|
||||
|
||||
if (!Prefab.Platform && Prefab.StairDirection == Direction.None)
|
||||
{
|
||||
Vector2 pos = ConvertUnits.ToDisplayUnits(f2.Body.Position);
|
||||
|
||||
int section = FindSectionIndex(pos);
|
||||
if (section > -1)
|
||||
{
|
||||
Vector2 normal = contact.Manifold.LocalNormal;
|
||||
|
||||
float impact = Vector2.Dot(f2.Body.LinearVelocity, -normal) * f2.Body.Mass * 0.1f;
|
||||
if (impact < 10.0f) return true;
|
||||
#if CLIENT
|
||||
SoundPlayer.PlayDamageSound("StructureBlunt", impact, SectionPosition(section, true), tags: Tags);
|
||||
#endif
|
||||
AddDamage(section, impact);
|
||||
}
|
||||
}
|
||||
|
||||
OnImpactProjSpecific(f1, f2, contact);
|
||||
|
||||
|
||||
@@ -432,7 +432,7 @@ namespace Barotrauma
|
||||
{
|
||||
//prevent picking up (or deattaching) items
|
||||
#if CLIENT
|
||||
if (GameMain.GameSession.GameMode is TutorialMode)
|
||||
if (GameMain.GameSession?.GameMode is TutorialMode)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -468,7 +468,7 @@ namespace Barotrauma
|
||||
|
||||
var gaps = newHull?.ConnectedGaps ?? Gap.GapList.Where(g => g.Submarine == submarine);
|
||||
targetPos = character.WorldPosition;
|
||||
Gap adjacentGap = Gap.FindAdjacent(gaps, targetPos, 200.0f);
|
||||
Gap adjacentGap = Gap.FindAdjacent(gaps, targetPos, 500.0f);
|
||||
if (adjacentGap == null) return true;
|
||||
|
||||
if (newHull != null)
|
||||
|
||||
Reference in New Issue
Block a user