Increase shield activation speed #3993
No reviewers
Labels
No Label
#P1 CRITICAL
#P2: HIGH
#P3: elevated
#P4 priority: medium
#P6: low
#Review
annoying
API
bug
code quality
combat
commands
compatibility
configurability
contribution inside
controls
core feature
creative mode
delayed for engine release
documentation
duplicate
enhancement
environment
feature request
gameplay
graphics
ground content conflict
GUI/HUD
help wanted
incomplete feature
invalid / won't fix
items
looking for contributor
mapgen
meta
mineclone2+
Minecraft >= 1.13
Minecraft >= 1.17
missing feature
mobile
mobs
mod support
model needed
multiplayer
Needs adoption
needs discussion
needs engine change
needs more information
needs research
nodes
non-mob entities
performance
player
possible close
redstone
release notes
schematics
Skyblock
sounds
Testing / Retest
tools
translation
unconfirmed
mcl5
mcla
Media missing
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: VoxeLibre/VoxeLibre#3993
Loading…
Reference in New Issue
No description provided.
Delete Branch "(deleted):faster_shielding"
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?
Increase the responsiveness of shields.
Testing
-In creative get 2 shields and hold right click while shield is in hotbar to see if it activates faster
-Place a shield in the inventory shield slot and hold right click to test if the results are the same
-Get some weapons (e.g. sword) while the shield is in offhand and right click to see if they work
-Get some mob eggs and summon them and test if your shield still protects you from danger (test both offhand and hotbar shielding)
EDIT:
-Also test multiple times (10 or 100 or more) while shield is in hotbar hold right-click the crafting table and the enchanting table and see if the shield HUD gets stuck and blocks the menu preventing you from using these tables.
4a2341f26c
toada1e1e0ff
Nice piece of investigation and I appreciate the PR.
However, I would probably be against this change right now until we have a resolution for: #2756
Basically shield comes up when you use the crafting table in common play. It is infuriating because it isn't obvious why it happens and took a while for us to figure it out. This would make this happen statistically more. Without a way to cancel blocking when interacting with crafting table and all other blocks with an interface, I would be reluctant for this to go in as it would probably make player experience worse for most.
@ancientmarinerdev I can't seem to reproduce that bug. Can you give me a step by step? Since with this PR, the shield also deactivates quickly so it might even reduce the likelihood of blocking the crafting table? I'm testing it right now but can't reproduce it.
@ancientmarinerdev The shield seems to not activate when near and at the same time pointing to a node on rightclick so the proper right clicking action happens. If it's not a bother, can you see if you can reproduce that bug using this branch?
Okay for some reason I can now right click while pointing to a near node so I can shield while right clicking the crafting table but the shield automatically disappears when the menu appears so the bug didn't happen.
Not on your machine right now. It isn't common, but it's happened to me 8 or 9 times, and for other users also including multiplayer.
It isn't all the time, but does happen enough to be baffling and frustratiing.
If I know what causes it I might see if I can fix it but since the cause seems vague I don't know if I can.
If my machine can't reproduce the bug then can you reproduce it on this PR branch?
@ancientmarinerdev I've implemented some additional shield HUD removal line that will hopefully increase the chances of the HUD being purged in case those bug causes were due to globalstep not making it in time and having a gap in closing the HUD before the menu GUI pops out. This also might explain why some machines do or do not encounter this problem often as having a difference resources might make the globalstep less prone to missing those HUD clearing timings.
I've also had this bug happen. And, I am running a pretty decent machine.
A thought for it would be, clear the HUD before interacting with any formspec. As, it can occur on any of them (like the crafting table, inventory, etc.)
Rejected. This aggravates the bug mentioned (and no,
fe139554cb
doesn't fix it, not sure how the bug even happens exactly), isn't that important, and doesn't touch the other ton of issues that we have with shields. One thing this does is making the bug way easier to reproduce, so thank you for that.The shields' code is a mess, and needs a thorough review, if not rewriting from scratch. I'm currently looking through it to see its state.
It needs a serious rewrite. As I have mentioned before, the shield code is a hack because minetest removed the offhand use of items.
It was a shot in the dark trying to fix a bug that I can't see/reproduce. I was going to have a go at it again but if the code is planned to be rewritten then I guess I'll leave it for now.
Pull request closed