fix(interaction): restore retail loot placement and world-drop projection
This commit is contained in:
parent
4d095be286
commit
921712f412
24 changed files with 1581 additions and 34 deletions
|
|
@ -230,12 +230,6 @@ internal sealed class SelectionInteractionController
|
|||
CancelPickupPresentation(itemGuid);
|
||||
return;
|
||||
}
|
||||
if (!ValidatePickupTarget(itemGuid, showToast: true)
|
||||
|| !_query.TryGetApproach(itemGuid, out InteractionApproach approach))
|
||||
{
|
||||
CancelPickupPresentation(itemGuid);
|
||||
return;
|
||||
}
|
||||
|
||||
ulong pendingPlacementToken = _items.TryGetPendingBackpackPlacement(
|
||||
itemGuid,
|
||||
|
|
@ -251,6 +245,42 @@ internal sealed class SelectionInteractionController
|
|||
return;
|
||||
}
|
||||
|
||||
// Retail CPlayerSystem::PlaceInBackpack @ 0x0055D8C0 delegates
|
||||
// current-ground-object contents straight to
|
||||
// ItemHolder::AttemptToPlaceInContainer @ 0x00588140. A corpse or
|
||||
// chest child has no independent 3-D projection to approach.
|
||||
if (_items.IsInCurrentGroundObject(itemGuid))
|
||||
{
|
||||
var contained = new RuntimePendingPickup(
|
||||
Token: 0u,
|
||||
itemGuid,
|
||||
LocalEntityId: 0u,
|
||||
destinationContainerId,
|
||||
placement,
|
||||
pendingPlacementToken,
|
||||
ApproachToken: default);
|
||||
if (_transactions.TryDispatchPickup(
|
||||
contained,
|
||||
_transport,
|
||||
out uint containedSequence))
|
||||
{
|
||||
Console.WriteLine(
|
||||
$"[B.5] contained pickup item=0x{itemGuid:X8} container=0x{destinationContainerId:X8} placement={placement} seq={containedSequence}");
|
||||
}
|
||||
else
|
||||
{
|
||||
CancelPickupPresentation(itemGuid, pendingPlacementToken);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (!ValidatePickupTarget(itemGuid, showToast: true)
|
||||
|| !_query.TryGetApproach(itemGuid, out InteractionApproach approach))
|
||||
{
|
||||
CancelPickupPresentation(itemGuid, pendingPlacementToken);
|
||||
return;
|
||||
}
|
||||
|
||||
if (approach.IsCloseRange)
|
||||
{
|
||||
bool armed = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue