[3d_armor/wieldview] does not handle "color" meta correctly #4881
Labels
No Label
1. kind/balancing
1. kind/breaking
1. kind/bug
1. kind/construction
1. kind/documentation
1. kind/enhancement
1. kind/griefing
1. kind/invalid
1. kind/meme
1. kind/node limit
1. kind/other
1. kind/protocol
2. prio/controversial
2. prio/critical
2. prio/elevated
2. prio/good first issue
2. prio/interesting
2. prio/low
3. source/art
3. source/client
3. source/engine
3. source/ingame
3. source/integration
3. source/lag
3. source/license
3. source/mod upstream
3. source/unknown
3. source/website
4. step/approved
4. step/at work
4. step/blocked
4. step/discussion
4. step/help wanted
4. step/needs confirmation
4. step/partially fixed
4. step/question
4. step/ready to deploy
4. step/ready to QA test
4. step/want approval
5. result/cannot reproduce
5. result/duplicate
5. result/fixed
5. result/maybe
5. result/wontfix
ugh/petz
ugh/QA main
ugh/QA NOK
ugh/QA OK
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: your-land/bugtracker#4881
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem can be seen when using this:
#4878 (comment)
or holding colored
waypoint_compass
.The code that should handle
color
meta is here:1d8509e75b/wieldview/get_texture.lua (L177)
But turns out it's a dead code, because only strings get passed to this function (and therefore no meta).
Code will be executed if we pass ItemStack here:
But wielded item will still look different from inventory item.
This change can bring back some of the underlying texture color back, but still does not look same:
I'm not sure if this will break something else, or how it will affect memoization (probably should only pass meta that
get_texture
can understand). I tested this only on 10 random items I had in my inventory - they looked ok. And compass got color too.right. i bumped my head up against this exact problem when i was trying to optimize (for FPS reasons) smartshop displays (and haven't yet fixed it). the solution is to use a wielditem drawtype.
a version of 3d_armor exists, where instead of the wielded item being part of your player model, it's an entity w/ a wieldview drawtype that's attached to one of your model's bones. this would also allow e.g. displaying stairs if you're holding stairs, or display your giant skeleton hammer:
i'm not sure where the code for that version of 3d armor exists, though, or if it differs in other important ways.