Fix EmbeddableProjectileComponent and ThrowingAngleComponent interaction (#30112)
* fix embeddable offset with throwing angle * number
This commit is contained in:
@@ -120,7 +120,10 @@ public abstract partial class SharedProjectileSystem : EntitySystem
|
|||||||
|
|
||||||
if (component.Offset != Vector2.Zero)
|
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);
|
xform);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
description: Definition of a Classic. Keeping murder affordable since 200,000 BCE.
|
description: Definition of a Classic. Keeping murder affordable since 200,000 BCE.
|
||||||
components:
|
components:
|
||||||
- type: EmbeddableProjectile
|
- type: EmbeddableProjectile
|
||||||
offset: 0.15,0.15
|
offset: -0.15,0.0
|
||||||
- type: ThrowingAngle
|
- type: ThrowingAngle
|
||||||
angle: 225
|
angle: 225
|
||||||
- type: LandAtCursor
|
- type: LandAtCursor
|
||||||
|
|||||||
Reference in New Issue
Block a user