A_RandomState called on S_PLAY_PAIN produces weird behavior

Status
Not open for further replies.

Princess Plushima

Princess of Dreams
Judge
Known as the God Mode Bug, it's come up with a few custom character abilities now (Read: All that include an A_RemoteAction call) This SOC will reproduce the bug every time the player takes damage:
http://www.sendspace.com/file/x0hdz1

I believe what is happening is that pw_flashing is never set, and the player is permanently treated as though they are in their 'Pain Frames.' This sounds obscure, but it actually comes up A LOT with custom character abilities, and the only known workaround of using A_CustomPower to manually set pw_flashing has the nasty side effect of forcing the player to sacrifice their temporary invincibility in order to use their ability. (Try using Hinote's ability to escape a deep slime pit to see how this can be a problem)

The bug occurs with custom abilities when the thokitem is not able to call an A_RemoteAction+A_RandomState combination the tic it is spawned, and thus produces a small 'window' after the player has hit their ability, but before they go to their ability frames, in which taking damage will trigger the Bug. Unfortunately, in this context, the bug is insanely hard to reproduce, making confirming whether or not the window has been closed a nightmare. It would probably be much neater to simply fix this in the client.



Sorry about the textwall, it's just the implications of this bug aren't necessarily obvious. :X
 
Ah, the as I called it "No Pain No Gain" bug, in which the player clips through EVERYTHING after getting hurt.
 
Status
Not open for further replies.

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top