mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 05:27:38 +03:00
Fix EmbeddableProjectileComponent and ThrowingAngleComponent interaction (#30112)
* fix embeddable offset with throwing angle * number (cherry picked from commit eaace152aeb30622849826572f2aab62f5575d3a)
This commit is contained in:
@@ -209,7 +209,10 @@ public abstract partial class SharedProjectileSystem : EntitySystem
|
||||
|
||||
if (component.Offset != Vector2.Zero)
|
||||
{
|
||||
_transform.SetLocalPosition(uid, xform.LocalPosition + xform.LocalRotation.RotateVec(component.Offset),
|
||||
var rotation = xform.LocalRotation;
|
||||
if (TryComp<ThrowingAngleComponent>(uid, out var throwingAngleComp))
|
||||
rotation += throwingAngleComp.Angle;
|
||||
_transform.SetLocalPosition(uid, xform.LocalPosition + rotation.RotateVec(component.Offset),
|
||||
xform);
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
description: Definition of a Classic. Keeping murder affordable since 200,000 BCE.
|
||||
components:
|
||||
- type: EmbeddableProjectile
|
||||
offset: 0.15,0.15
|
||||
offset: -0.15,0.0
|
||||
- type: EmbedPassiveDamage
|
||||
- type: ThrowingAngle
|
||||
angle: 225
|
||||
@@ -18,10 +18,10 @@
|
||||
fix1:
|
||||
shape: !type:PolygonShape
|
||||
vertices:
|
||||
- -0.40,-0.30
|
||||
- -0.30,-0.40
|
||||
- 0.40,0.30
|
||||
- 0.30,0.40
|
||||
- -0.40,-0.30
|
||||
- -0.30,-0.40
|
||||
- 0.40,0.30
|
||||
- 0.30,0.40
|
||||
density: 20
|
||||
mask:
|
||||
- ItemMask
|
||||
@@ -220,10 +220,10 @@
|
||||
fix1:
|
||||
shape: !type:PolygonShape
|
||||
vertices:
|
||||
- -0.40,-0.30
|
||||
- -0.30,-0.40
|
||||
- 0.40,0.30
|
||||
- 0.30,0.40
|
||||
- -0.40,-0.30
|
||||
- -0.30,-0.40
|
||||
- 0.40,0.30
|
||||
- 0.30,0.40
|
||||
density: 20
|
||||
mask:
|
||||
- ItemMask
|
||||
|
||||
Reference in New Issue
Block a user