debian44 reports: Clone Bug: If you do rightclic ... #666
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
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: your-land/bugtracker#666
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?
debian44 reports a bug:
Player position:
Player look:
Player information:
Player meta:
Log identifier
Profiler save:
Status:
Wow, just replicated this. No wonder no-one buys my diamond arrows O_O.
the locus of the bug is that the logic that unloads the bow is triggered any time the bow is put in a different inventory list, where the code can't properly "unload" the bow, and it still gives the player an arrow for some reason.
Options:
A confound here is that a bow's "power" is determined by the time since it was loaded (though there is a ceiling on this, which keeps it from becoming OP). But if you don't unload the bows, you could have chests full of fully charged bows that you could use in rapid succession.
I remember suggesting that we entirely remove the "bow power increases over time after you load it" mechanic somewhere but I'm failing to find it (gitea's search functionality is terrible). The point was, that the "charge the bow" mechanic is already totally broken when there's any sort of lag, and there's often enough lag to make it very unreliable in practice.
Do we really need a precision of microseconds to translate into damage or power?
Wouldn't it be cool if MT told us when an item gets unwielded?
There are buried/forgotten PRs to add on_item_unwield callbacks, this would be a usecase.
https://github.com/minetest/minetest/pull/9862
https://github.com/minetest/minetest/pull/7587
Obviously it is a bad idea to store the power, loaded_since or similar on the item meta. A local table might be a better option, but that requires a globalstep.
While some ranged weapons like slings and bows cannot preserve their power unless wielded, crossbows CAN be preloaded and then discharged in quick succession.
Unfortunately any mechanic becomes unreliable during lag, even hitting with swords.
no, but it does need at least 10ths of a second, and i'm not sure there's anything that'll give you milliseconds through a function call.
what's wrong w/ item metadata? how would a local table keep track of individual bows?
i think my current proposal for how i'd like to see this fixed, is to get rid of the current "unload" mechanic - perhaps instead, you could get your arrow back via the crafting grid. get rid of the power/damage increases over time mechanic, and just keep the player from firing the bow unless they've held it for a certain amount of time, after which they'd always fire at full power. ranged weapons will be getting a big overhaul at some point, and i don't want to do a lot of work on this that'll just be thrown out eventually.
The clone bug must go away, that's kinda priority. If that means we must accept loaded bows in the inv, then so be it. But I'd prefer not having loaded bows in any other slot than the wielded one.
Actually, after writing code to log inventory actions, I think using minetest.register_allow_player_inventory_action to prevent moving loaded bows ought to work... let me do some testing on that...
fixed in
06cae09569
this is live
Seems fine to me. I cannot move, drop or do anything to the loaded bow.