Skip to content

Added support for animated items to the map#170

Open
Rhoenicx wants to merge 1 commit into
JavidPack:1.4.4from
Rhoenicx:1.4.4
Open

Added support for animated items to the map#170
Rhoenicx wants to merge 1 commit into
JavidPack:1.4.4from
Rhoenicx:1.4.4

Conversation

@Rhoenicx

Copy link
Copy Markdown

Players of Gensokyo mod reported that the item animations of the bossbags were not displayed correctly on the minimap. The entire spritesheet is visible instead of the frame specified inside the ItemAnimation class. Added compatibility for ItemAnimations.

Comment thread MapHelper.cs

// Support for item animations.
if (ItemID.Sets.AnimatesAsSoul[item.type]) {
Rectangle itemFrame = Main.itemAnimations[item.type].GetFrame(itemTexture);

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these should just be Rectangle itemFrame = Main.itemAnimations[item.type]?.GetFrame(itemTexture) ?? itemTexture.Frame();. An item with an animation doesn't necessarily set ItemID.Sets.AnimatesAsSoul

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants