steven4547466 / AdvancedSubclassing

Adds very advanced subclassing to SCP: SL
Other
5 stars 6 forks source link

MapEvent Overriding #27

Closed aurelienblais closed 3 years ago

aurelienblais commented 3 years ago

Describe the bug Using latest pre version, when a plugin add an event listener to MapEvents.ExplodingGrenade, the event won't be triggered by a frag grenade.

To Reproduce Steps to reproduce the behavior:

  1. Bind an event to MapEvents.ExplodingGrenade
  2. Do something, like logging "Something exploded"
  3. Throw a frag grenade in game, nothing will log, try with a flash and it'll work

Expected behavior Don't break event binding

Versioning

steven4547466 commented 3 years ago

I made no changes to my patches for grenades in that version. I also use that event myself here... I'll look into it when I get time to see if my plugin actually causes this issue.

Edit: Yeah, this is a bug, I'll see what I can do to fix it. Exiled's exploding grenade event is pretty wack though...

steven4547466 commented 3 years ago

This will be fixed in the next release, I'm gonna be honest, idk who made the ExplodingGrenadeEvent for exiled, but that's some of the weirdest code I've seen lol.

steven4547466 commented 3 years ago

Should be fixed here (I literally just call the event, I still need this because setting IsAllowed to false still breaks windows and doors, which that patch fixes). Let me know if you experience any weird behavior, or it doesn't work after this.

I already reported the door and glass break bug to exiled, should be getting fixed soon enough, then I'll delete the patch entirely.