Fix various issues with the emitter (#3329)
Co-authored-by: cyclowns <cyclowns@protonmail.ch>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#nullable enable
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Threading.Tasks;
|
||||
using Content.Server.GameObjects.Components.Interactable;
|
||||
@@ -74,6 +75,10 @@ namespace Content.Server.GameObjects.Components
|
||||
var physics = Owner.GetComponent<IPhysBody>();
|
||||
physics.BodyType = BodyType.Static;
|
||||
|
||||
// Snap rotation to cardinal (multiple of 90)
|
||||
var rot = Owner.Transform.LocalRotation;
|
||||
Owner.Transform.LocalRotation = Math.Round(rot / (Math.PI / 2)) * (Math.PI / 2);
|
||||
|
||||
if (Owner.TryGetComponent(out PullableComponent? pullableComponent))
|
||||
{
|
||||
if (pullableComponent.Puller != null)
|
||||
|
||||
Reference in New Issue
Block a user