mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
Fix physics for invalid parents
This commit is contained in:
@@ -158,7 +158,9 @@ namespace Robust.Shared.GameObjects
|
||||
angularVelocityDiff += angular;
|
||||
}
|
||||
|
||||
if (entity.Transform.Parent!.Owner.TryGetComponent(out PhysicsComponent? newBody))
|
||||
var newParent = entity.Transform.Parent?.Owner;
|
||||
|
||||
if (newParent != null && newParent.TryGetComponent(out PhysicsComponent? newBody))
|
||||
{
|
||||
var (linear, angular) = newBody.MapVelocities;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user