Grasscutter icon indicating copy to clipboard operation
Grasscutter copied to clipboard

[Bug] Energy will be cleared but elemental burst will not be released

Open WhisperWithDelight opened this issue 2 years ago • 11 comments

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

1906bf2c5d12aec04e70538c8e35e763_1

Additional context

WhisperWithDelight avatar Jun 13 '22 05:06 WhisperWithDelight

I noticed this bug but I didn't know how to reproduce this,thanks your feedback

zhaodice avatar Jun 13 '22 06:06 zhaodice

is chance of this problem 100%?

zhaodice avatar Jun 13 '22 17:06 zhaodice

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 ...

GanyusLeftHorn avatar Jun 13 '22 20:06 GanyusLeftHorn

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.

Birdulon avatar Jun 14 '22 01:06 Birdulon

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.

Birdulon avatar Jun 14 '22 01:06 Birdulon

+1

Liujunhua007 avatar Jun 14 '22 06:06 Liujunhua007

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.

GanyusLeftHorn avatar Jun 14 '22 07:06 GanyusLeftHorn

Okay, did the sniffing. Here is one of the clearest results I could get: burst_energy

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.

GanyusLeftHorn avatar Jun 14 '22 17:06 GanyusLeftHorn

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?

AZthemute avatar Jun 21 '22 20:06 AZthemute

No, it hasn't been fixed. It doesn't always happen though. You were probably just lucky.

GanyusLeftHorn avatar Jun 21 '22 22:06 GanyusLeftHorn

现在 Q仍在进行时按 冲刺 会中断Q释放。

Pressing sprint while q is still in progress will interrupt Q release.

millet6 avatar Aug 12 '22 13:08 millet6

can anyone confirm this still happens?

KingRainbow44 avatar Jul 25 '23 04:07 KingRainbow44

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)

vipotaenko02 avatar Oct 02 '23 12:10 vipotaenko02

I encountered a character pick up delay where characters need to be next to items for 2-3 seconds before they appear pickable

156209258y avatar Nov 07 '23 08:11 156209258y