OBT/1.2.0(Spring Update)
Sync with Upstream
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user