LabAPI icon indicating copy to clipboard operation
LabAPI copied to clipboard

[IDEA] SyncingRoleEventArgs

Open TheLongQuite opened this issue 1 year ago • 4 comments

Create SyncingRoleEventArgs. This change will allow you to change the appearance of the player's model without breaking the rest of the role's functionality (unless the user decides to give SCP-939 a player appearance).

It's not the most useful or the most difficult addition, but it would be nice.

(I really want to implement a spy and not monitor how the IL code changes every patch 😈)

Screenshot made in RoleSyncInfo::Write Image

TheLongQuite avatar Jun 06 '25 19:06 TheLongQuite

Tricky one due to the public/private part of the role spawn data. Any feedback on how to treat that data i.e. ignore it or provide ways to set it would be appreciated.

brayden-dowson avatar Jun 07 '25 12:06 brayden-dowson

Tricky one due to the public/private part of the role spawn data. Any feedback on how to treat that data i.e. ignore it or provide ways to set it would be appreciated.

The basic idea is to ignore cases where 'this._receiverNetId == this._targetNetId`. Otherwise, it is likely that the player will be kicked off the server.

If the RoleTypeId was changed while using EventArgs, we can get the PlayerRoleBase based on the RoleTypeId via PlayerRoleLoader.TryGetRoleTemplate(RoleType, out PlayerRoleBase roleBase) and use it instead of role1 for WritePublicSpawnData.

If I am not silly, the only PrivateSpawnData role will be SpectatorRole, because FpcStandartRoleBase::WritePrivateSpawnData is empty.

TheLongQuite avatar Jun 07 '25 16:06 TheLongQuite

Thank you for your suggestion! We've logged this issue in our internal git system for further review and tracking. Please note that this doesn't guarantee acceptance or implementation at this stage. If we need any additional information or clarification, we'll be sure to reach out to you.

Jesus-QC avatar Oct 14 '25 09:10 Jesus-QC

We've reopened this suggestion to prevent confusion and duplicate posts. As stated before, the issue has been added to our internal tracker, but that does not guarantee acceptance nor implementation.

Axwabo avatar Apr 27 '26 17:04 Axwabo