Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add natives about pause #324

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

jonathan-up
Copy link
Contributor

@jonathan-up jonathan-up commented Jul 14, 2024

In this way, you do not need to set pausable to 1 and then make client sends pause command and finally set pausable to 0

@ShadowsAdi
Copy link
Contributor

The only problems are with your implementation because the IsPaused() and SetPaused() are pure virtual functions declared in the abstracted class, RehldsServerData. You can read more about that on this site.

To fix your code you need to declare even the missing virtual functions before IsPaused() and SetPaused() as declared in the rehlds_interfaces.h.

@jonathan-up
Copy link
Contributor Author

jonathan-up commented Jul 14, 2024

@ShadowsAdi Thank you for your explanation, but i saw rehlds_interfaces_impl.cpp. Is implementation in the file?

@StevenKal
Copy link

The "rehlds_interfaces.h" of this module must matches to the one of the ReHLDS's engine ShadowsAdi linked:

To fix your code you need to declare even the missing virtual functions before IsPaused() and SetPaused() as declared in the rehlds_interfaces.h.

@jonathan-up
Copy link
Contributor Author

@StevenKal i know it, but rehlds/rehlds/rehlds_interfaces_impl.cpp must be the implementation of the virtual function, isn't it?

the one of the ReHLDS's engine

@jonathan-up
Copy link
Contributor Author

@s1lentq It's all working now, but I think rh_set_pause function is a bit weird., any suggestions?

@rtxa
Copy link

rtxa commented Sep 3, 2024

Hi @jonathan-up, I don't get what the host parameter does in rh_set_pause(), in what situation would be useful to use that parameter? I don't get what this comment means:

It's best not to use rh_set_paused(false, false), bad things will happen

What is the bad thing that can happen? Why such behaviour is allowed?

@jonathan-up
Copy link
Contributor Author

@rtxa you can try paused as host true, and unpaused as host false

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.

4 participants