[HELP] Difference between client_disconnect and client_disconnected?
What is the difference between client_disconnect and client_disconnected?
I heard from some people that they both are same and from others they are different. |
Re: [HELP] Difference between client_disconnect and client_disconnected?
Why don't you (and those saying there's no difference) simply read the documentation?
|
Re: [HELP] Difference between client_disconnect and client_disconnected?
As i know client_disconnected is not called on mapchange, it's called when player manually disconnects from the game. i dont recommend to use this but still dont understand why client_disconnect is deprecated in 1.8.3.
In API says: Code:
This function has been deprecated, do NOT use it |
Re: [HELP] Difference between client_disconnect and client_disconnected?
It's as the documentation says, it doesn't catch all the cases, such as timeout while connecting to the server.
it's the same as _disconnect but with some extra cases. The function is based directly on the SV_DropClient engine function. There are no known bugs around _disconnected. The bug you're referring has been fixed in jul 2017... (#446). Please test before spreading wrong information. |
Re: [HELP] Difference between client_disconnect and client_disconnected?
Why does the forward have a new name? If it's superior why not simply replace it? I see no logic behind that choice.
|
Re: [HELP] Difference between client_disconnect and client_disconnected?
Quote:
Quote:
Quote:
|
Re: [HELP] Difference between client_disconnect and client_disconnected?
Quote:
I mean compatibility is important, especially when there are two extremely different versions used wide and all these issues and possible bugs are left to the plugin authors which all have varying coding skill/experience. I just don't get it. But I guess it's too late to change now. |
Re: [HELP] Difference between client_disconnect and client_disconnected?
There is no breaking change, client_disconnect() is still there. You will just get a warning if you try to compile with it.
One of the others reasons is that it uses gamedata. When the PR has been made, reHLDS was around but not officially supported yet (a lot were using it already). For such core forward, relying on gamedata by default at this point, it would create unnecessary issues with users. In the end, it was just safer and more convenient overall to create something new. Well, I'm not saying that was the right answer, we just tried to figure out what would be the best in this context. The params are just extras because passed already in SV_DropClient. It could be useful for some people (someone actually made a plugin: https://forums.alliedmods.net/showth...=SV_DropClient). I agree, though, replacing totally _disconnect() and having a native would have been an interesting solution. Back then, I'm not sure we (I and Nextra) thought about it, but it would not have been reasonable I believe. We lack people who can give their thoughts, sometimes weird things happen. Like _disconnected() should have been called _disconnecting() since you are still valid there, it's silly, but no one has been triggered, too late now. There are a lot of skilled people around the forum, but almost no ones contribute on Github. |
Re: [HELP] Difference between client_disconnect and client_disconnected?
The more functions that get deprecated, the more warning the compiler will output when using them. It's not exactly breaking the backwards compatibility, but it sure isn't nice to see all those errors. Maybe we can add an include file that will prevent these errors from happening by using #define to replace the deprecated function with the new one?
|
Re: [HELP] Difference between client_disconnect and client_disconnected?
Quote:
Quote:
I know you are working hard to keep this project alive. Keep on keeping on. |
| All times are GMT -4. The time now is 12:19. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.