fix(loot): DropClientLoot positions like live

Live DropClientLoot (12,501 decoded): use_position is set only when a
player is the source (1,432, all activity rewards such as the dragon,
Frakjaw and BONS chests); drops from enemies, smashables and chests
leave it clear, so the client spawns the loot at the source object as
it sees it and falls back to spawn_position only if that object is
gone (LWODestroyableComponent::GetLootSpawnPos). Coins land where they
spawn (final = spawn in all 3,158 coin drops); items land 10 units
away (median 9.998, uniform direction) at spawn height. DLU always set
use_position and scattered everything 4.2 units away.

Inferred: the 10-unit rule for player-sourced items (live spread there
ranges 0-58 units, source unknown).

Check: kill enemies and smash crates: coins pop out of the object,
items fly about 10 units away; open an activity chest (e.g. after a
dragon or Frakjaw) and the loot still appears around you.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-09-29 03:00:24 -05:00
parent 81db3a94ac
commit 44c6340294
4 changed files with 105 additions and 13 deletions

View File

@@ -19,6 +19,7 @@ set(DGAMETEST_SOURCES
"SceneGhostingTests.cpp"
"HolidayEventsTests.cpp"
"SetCurrencySourceTests.cpp"
"LootDropPositionTests.cpp"
)
add_subdirectory(dComponentsTests)