multitheftauto / mtasa-blue

Multi Theft Auto is a game engine that incorporates an extendable network play element into a proprietary commercial single-player game.
https://multitheftauto.com
GNU General Public License v3.0
1.41k stars 438 forks source link

Discord RPC gets reset when ANY resource stops #3236

Closed Nick026 closed 12 months ago

Nick026 commented 12 months ago

Describe the bug

Due to changes in https://github.com/multitheftauto/mtasa-blue/pull/3224 when any resource stops the default Discord RPC starts being used and any custom implementation is gone.

Based on the PR this looks like intended behaviour but I don't think this is expected behaviour for server scripters.

Can this be removed or improved upon?

Steps to reproduce

  1. Start your Discord RPC resource implementation
  2. Stop any resource
  3. Your Discord RPC is gone

Version

No response

Additional context

No response

Relevant log output

No response

Security Policy

matheustkn commented 12 months ago

Do you have any code examples? It seems to be a problem with how it is being used.

EDIT: The problem really is happening.

Nick026 commented 12 months ago

No it isn't. Due to this commit: https://github.com/multitheftauto/mtasa-blue/pull/3224/commits/b51f43d93d124c54eda83ee6ad4c3fc2ce46385e when ANY resource stops the custom Discord RPC implementation is gone

This is my current implementation, it worked pefectly before mentioned PR: https://github.com/MrGreenGaming/MTA-Resources/tree/master/resources/%5Bmisc%5D/%5Bdiscord%5D/discord_rich_presence

znvjder commented 12 months ago

I must have missed that, my bad - fix is already in the PR. Thank you for reporting this!

Nick026 commented 12 months ago

Can confirm that the bug has been solved with the latest nightly build.