Grasscutter
Grasscutter copied to clipboard
[Bug] Energy will be cleared but elemental burst will not be released
Did you look for other closed issues that have the same problem?
Describe the bug
If we press the Q key after the E key quickly, energy will be cleared but the burst will not be released. Almost all avatars encountered this issue.
Which branch did you use?
Screenshots
Additional context
I noticed this bug but I didn't know how to reproduce this,thanks your feedback
is chance of this problem 100%?
No, and it also does not only happen shortly after pressing E. I had it happen at other times too. No clue why the Q doesn't active in those cases ...
It's probably the energy manager using the wrong trigger condition to remove the energy, and some animation buffering states causing the client to have a delay long enough for the energy removal to arrive before the burst actually starts.
i.e. our EvtDoSkillSuccNotify
proto probably isn't actually the client starting the effects of a skill but rather queuing it up and it can have additional checks that cause it to fail when the current animation ends and it actually tries to do the skill. This might have a similar edge case with stamina calculation if charged attacks weren't commented out currently.
+1
i.e. our EvtDoSkillSuccNotify proto probably isn't actually the client starting the effects of a skill but rather queuing it up
You are probably right, yes. I didn't have Iridium set up yet when I wrote EnergyManager, so I just guessed based on the name that EvtDoSkillSuccNotify
meant that the skill was successfully cast.
I'll do a little sniffing later to find out what's actually going on and see if I can fix this.
Okay, did the sniffing. Here is one of the clearest results I could get:
Here, I switch to a new avatar (starts with packet 655 and ends with packet 659), cast an ultimate (EvtDoSkillSuccNotify
, packet 661), and then the server clears the avatar's energy without any further communication from the client (packets 663 and 664). From this, it seems like we do in fact have the right packet that we handle.
However, I also tried the following: Casting Yelan's E and then pressing Q while the E was still ongoing. This is an easy way to reproduce the bug. In that case, the client sends an EvtDoSkillSuccNotify
for the E, and then another EvtDoSkillSuccNotify
for the Q, but the server does not clear energy. There is no other relevant communication between client and server between those two packets. The most likely conclusion from this for me is that the server probably internally tracks the state of the avatar, knows that it is currently in the middle of it's E animation and therefore can't cast Q. We would probably have to do the same to get this completely right.
On a side note, it seems that we violate the protocol for clearing energy. Currently, we send an AvatarFightPropChangeNotify
, but the official server uses EntityFightPropChangeNotify
. The official server also tells the client that the reason for clearing the energy was the casting of an ultimate. I have adapted that in PR #1261. This of course does not solve the issue, but it should still be fixed.
However, I also tried the following: Casting Yelan's E and then pressing Q while the E was still ongoing. This is an easy way to reproduce the bug.
For me, nothing happens. Has this been fixed?
No, it hasn't been fixed. It doesn't always happen though. You were probably just lucky.
现在 Q仍在进行时按 冲刺 会中断Q释放。
Pressing sprint while q is still in progress will interrupt Q release.
can anyone confirm this still happens?
can anyone confirm this still happens?
Yes, still happening in 1.7.2. The simpliest way to reproduce this I think is to use Elemental Burst right after switching to the character (number key and Q in quick succession)
I encountered a character pick up delay where characters need to be next to items for 2-3 seconds before they appear pickable