Fix Hands Crash (#122)
* Fixed sprite issues with construction system (Thanks PJB!). * Storage and Hands Systems now subscribe to Transform Parent changes, and will keep their containers in sync. * Add check in Interaction System to prevent processing client-side entities on the server.
This commit is contained in:
committed by
Pieter-Jan Briers
parent
4720182cf4
commit
8038ebe37d
@@ -71,6 +71,21 @@ namespace Content.Server.GameObjects
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public void RemoveHandEntity(IEntity entity)
|
||||
{
|
||||
if(entity == null)
|
||||
return;
|
||||
|
||||
foreach (var slot in hands.Values)
|
||||
{
|
||||
if (slot.ContainedEntity == entity)
|
||||
{
|
||||
slot.Remove(entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public ItemComponent GetHand(string index)
|
||||
{
|
||||
var slot = hands[index];
|
||||
|
||||
Reference in New Issue
Block a user