Skip to content

Commit

Permalink
Fixed falling trees using outdated sources in NewItem calls.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mirsario committed Apr 14, 2024
1 parent c70b6db commit 92e639e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
- Chinese (`59.1%` -> `100%`) - PRs [#232](https://github.com/Mirsario/TerrariaOverhaul/pull/232) & [#233](https://github.com/Mirsario/TerrariaOverhaul/pull/233) by [**xiaoyvyv**](https://github.com/xiaoyvyv) & [**Cyrillya**](https://github.com/Cyrillya).
- Fixed Overhaul's main menu buttons sometimes being incorrectly shown in English when a different language is selected.
- A few more GUI elements were made localizable.
### Fixes
- Fixed a rare cross-mod issue where Overhaul's falling trees would cause issues by using outdated "spawn sources" in item/loot instantiation.

# 5.0 BETA 14

Expand Down
3 changes: 2 additions & 1 deletion Common/TreeFalling/FallingTreeEntity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,8 @@ private void InstantiateItems()
var capture = CapturedItems[i];
var adjustedPosition = capture.Position.RotatedBy(Rotation, Position);

Item.NewItem(capture.Source, adjustedPosition, capture.Type, capture.Stack, prefixGiven: capture.Prefix);
// As some time has passed since the values in 'capture.SpawnSource' were created - we mustn't use them.
Item.NewItem(null, adjustedPosition, capture.Type, capture.Stack, prefixGiven: capture.Prefix);
}

CapturedItems = null;
Expand Down

0 comments on commit 92e639e

Please sign in to comment.