-
Notifications
You must be signed in to change notification settings - Fork 433
Open
Labels
Description
Discussed in #16703
Originally posted by ubertpendragon November 17, 2025
Disclaimers
- I have searched the issue tracker to check if the issue has already been reported.
- My issue happened while using mods.
What happened?
Projectiles can stick to a variety of targets, but due to a lack of sticktolevelwalls property, you can't make a projectile still to a level wall if it has a stick restriction (like sticktodoors="false")
They only stick to levelwalls if you use DoesStick="true", which enables every type of sticking
For example, the railgun harpoon won't stick to level walls (which would be nice to prevent sinking in an emergency)
Barotrauma/Barotrauma/BarotraumaShared/SharedSource/Items/Components/Projectile.cs
Lines 1217 to 1243 in 51db93f
| if (attackResult.AppliedDamageModifiers != null && attackResult.AppliedDamageModifiers.Any(dm => dm.DeflectProjectiles) && !StickToDeflective) | |
| { | |
| item.body.LinearVelocity *= deflectedSpeedMultiplier; | |
| } | |
| else if ( remainingHits <= 0 && | |
| stickJoint == null && StickTarget == null && | |
| StickToStructures && target.Body.UserData is Structure || | |
| ((StickToLightTargets || target.Body.Mass >= GetLightTargetMassThreshold()) && | |
| (DoesStick || | |
| (StickToCharacters && (target.Body.UserData is Limb || target.Body.UserData is Character)) || | |
| (target.Body.UserData is Item i && (i.GetComponent<Door>() != null ? StickToDoors : StickToItems))))) | |
| { | |
| Vector2 dir = new Vector2( | |
| (float)Math.Cos(item.body.Rotation), | |
| (float)Math.Sin(item.body.Rotation)); | |
| if (GameMain.NetworkMember == null || GameMain.NetworkMember.IsServer) | |
| { | |
| if (target.Body.UserData is Structure structure && structure.Submarine != item.Submarine && structure.Submarine != null) | |
| { | |
| StickToTarget(structure.Submarine.PhysicsBody.FarseerBody, dir); | |
| } | |
| else | |
| { | |
| StickToTarget(target.Body, dir); | |
| } | |
| } |
Reproduction steps
!
Bug prevalence
Just once
Single player or multiplayer?
Single player
-
No response
Version
v1.10.7.2 (Autumn Update 2025 Hotfix 4)
-
No response
Which operating system did you encounter this bug on?
Windows
Relevant error messages and crash reports
No response