OBT/1.2.0(Spring Update)

Sync with Upstream
This commit is contained in:
NotAlwaysTrue
2026-04-25 13:25:41 +08:00
committed by GitHub
parent 5207b381b7
commit 59bc21973a
421 changed files with 24090 additions and 11391 deletions
@@ -388,6 +388,13 @@ namespace Barotrauma.Items.Components
{
Attack.DamageMultiplier = damageMultiplier;
}
foreach (var statusEffect in Item.GetStatusEffectsOfType(ActionType.OnImpact))
{
foreach (var explosion in statusEffect.Explosions)
{
explosion.Attack.DamageMultiplier = damageMultiplier;
}
}
// Set user for hitscan projectiles to work properly.
User = user;
// Need to set null for non-characterusable items.
@@ -460,6 +467,7 @@ namespace Barotrauma.Items.Components
{
initialRotation -= MathHelper.Pi;
}
Submarine initialSubmarine = item.Submarine;
for (int i = 0; i < HitScanCount; i++)
{
float launchAngle;
@@ -476,6 +484,8 @@ namespace Barotrauma.Items.Components
Vector2 launchDir = new Vector2((float)Math.Cos(launchAngle), (float)Math.Sin(launchAngle));
Vector2 prevSimpos = item.SimPosition;
item.body.SetTransformIgnoreContacts(item.body.SimPosition, launchAngle);
//when launching multiple projectiles, ensure each raycast starts from the same sub
item.Submarine = initialSubmarine;
if (Hitscan)
{
DoHitscan(launchDir);