ReusableAnimations sanity checks.
This commit is contained in:
parent
5a72d0977f
commit
0f7dc8ec76
|
|
@ -15,6 +15,10 @@ namespace Content.Client.Animations
|
|||
public static void AnimateEntityPickup(EntityUid entity, EntityCoordinates initialPosition, Vector2 finalPosition, IEntityManager? entMan = null)
|
||||
{
|
||||
IoCManager.Resolve(ref entMan);
|
||||
|
||||
if (entMan.Deleted(entity) || !initialPosition.IsValid(entMan))
|
||||
return;
|
||||
|
||||
var animatableClone = entMan.SpawnEntity("clientsideclone", initialPosition);
|
||||
string val = entMan.GetComponent<MetaDataComponent>(entity).EntityName;
|
||||
entMan.GetComponent<MetaDataComponent>(animatableClone).EntityName = val;
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ namespace Content.Client.Hands
|
|||
|
||||
private void HandlePickupAnimation(PickupAnimationMessage msg)
|
||||
{
|
||||
if (!msg.EntityUid.IsValid())
|
||||
if (!EntityManager.EntityExists(msg.EntityUid))
|
||||
return;
|
||||
|
||||
if (!_gameTiming.IsFirstTimePredicted)
|
||||
|
|
|
|||
Loading…
Reference in New Issue