Skip to content

Conversation

@Alwayswannahunt
Copy link

@Alwayswannahunt Alwayswannahunt commented Nov 3, 2025

This PR

Adds subscription with same structure as OnValueChanged on same build (server -> sever or client -> client) but for client -> server. Also adds smooth implementation for shared code.
Highly inspired by IConfigurationManager code, so I cant be sure about doing things right.

Why

Some interaction prediction needs it for better UX. Also this goes as "event" way of getting client cvar without every time calling GetClientCVar. Usage example:

2025-11-03.194537.mp4

TODOs

  • Working
  • Event on disconnect
  • Tests

@Alwayswannahunt Alwayswannahunt marked this pull request as ready for review November 5, 2025 20:13
return;
}

UnsubValueChanged<T>(name, (T newValue, in CVarChangeInfo info) => onChanged(localSession, newValue, in info));
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Idk if this will work. I'll write down in this thread after testing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants