Fix inhands not displaying (#1517)
This commit is contained in:
@@ -145,7 +145,7 @@ namespace Content.Client.GameObjects.Components.Items
|
|||||||
|
|
||||||
if (!entity.TryGetComponent(out ItemComponent item)) return;
|
if (!entity.TryGetComponent(out ItemComponent item)) return;
|
||||||
|
|
||||||
var maybeInHands = item.GetInHandStateInfo(name);
|
var maybeInHands = item.GetInHandStateInfo(hand.Location);
|
||||||
|
|
||||||
if (!maybeInHands.HasValue)
|
if (!maybeInHands.HasValue)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -40,15 +40,16 @@ namespace Content.Client.GameObjects.Components.Items
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public (RSI rsi, RSI.StateId stateId)? GetInHandStateInfo(string hand)
|
public (RSI rsi, RSI.StateId stateId)? GetInHandStateInfo(HandLocation hand)
|
||||||
{
|
{
|
||||||
if (RsiPath == null)
|
if (RsiPath == null)
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var handName = hand.ToString().ToLowerInvariant();
|
||||||
var rsi = GetRSI();
|
var rsi = GetRSI();
|
||||||
var stateId = EquippedPrefix != null ? $"{EquippedPrefix}-inhand-{hand}" : $"inhand-{hand}";
|
var stateId = EquippedPrefix != null ? $"{EquippedPrefix}-inhand-{handName}" : $"inhand-{handName}";
|
||||||
if (rsi.TryGetState(stateId, out _))
|
if (rsi.TryGetState(stateId, out _))
|
||||||
{
|
{
|
||||||
return (rsi, stateId);
|
return (rsi, stateId);
|
||||||
|
|||||||
Reference in New Issue
Block a user