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

[GoldSource] Host_Kill_f crash server HLDS bug (command kill) #2129

Closed
SkillartzHD opened this issue Apr 15, 2019 · 14 comments
Closed

[GoldSource] Host_Kill_f crash server HLDS bug (command kill) #2129

SkillartzHD opened this issue Apr 15, 2019 · 14 comments
Assignees
Labels

Comments

@SkillartzHD
Copy link

@SkillartzHD SkillartzHD commented Apr 15, 2019

hi, the "kill" command is registered in the client/server, but here it is only the server (swds/engine_i486)

How the bug occurs:

1.connect to the server.
2.you expect to be alive
3.slow down the client (HW/SW) whether you do it with cheat engine/fps_max or other software
4.open the console and throw the command retry
5.close the connect bar (double click on the Steam logo) and then open the console type the "kill" command
Server gets crash


Because the player remained alive when he gave reconnect/retry (he was not set as disconnected in Host_Reconnect_f that uses SV_New_f)
Then run the gEntityInterface.pfnClientKill player was not found and here occurs crash to the server

123123-min

Original function without fixed :
fasfasfsaf

Code fix :
dasdsadasd
**void Host_Kill_f(void)
{

if (cmd_source == src_command){
	Cmd_ForwardToServer();
	return;
}
if (sv_player->v.health <= 0.0f){
	SV_ClientPrintf("Can't suicide -- already dead!\n");
	return;
}
if (g_pcls.state < ca_connected) {
	SV_ClientPrintf("You can't kill yourself if you're not connected!\n");
	return;
}
	gGlobalVariables.time = g_psv.time;
	gEntityInterface.pfnClientKill(sv_player);

}**

@justgo97

This comment has been minimized.

Copy link

@justgo97 justgo97 commented Apr 15, 2019

how are you going to print a message to a non connected player ?

@SkillartzHD

This comment has been minimized.

Copy link
Author

@SkillartzHD SkillartzHD commented Apr 15, 2019

@justgo97 when he connects (ca_connecting)

amxmodx fix :
host_kill_f_fixx.txt

@mikela-valve mikela-valve self-assigned this Apr 15, 2019
@GiovaniFerraroTrivelli

This comment has been minimized.

Copy link

@GiovaniFerraroTrivelli GiovaniFerraroTrivelli commented Apr 15, 2019

Tested on Linux server but I can't reproduce it.

@SkillartzHD

This comment has been minimized.

Copy link
Author

@SkillartzHD SkillartzHD commented Apr 16, 2019

@GiovaniFerraroTrivelli server should not run dproto, he fixes this bug

@GiovaniFerraroTrivelli

This comment has been minimized.

Copy link

@GiovaniFerraroTrivelli GiovaniFerraroTrivelli commented Apr 16, 2019

@GiovaniFerraroTrivelli server should not run dproto, he fixes this bug

Confirmed, you are right. Tested with reHLDS too but here is fixed.

@mikela-valve

This comment has been minimized.

Copy link
Collaborator

@mikela-valve mikela-valve commented Apr 20, 2019

@SkillartzHD This should be fixed in the current CS beta.

@SkillartzHD

This comment has been minimized.

Copy link
Author

@SkillartzHD SkillartzHD commented Apr 20, 2019

@mikela-valve , the check is not good, it is detected even if it is connected
image
also opengl option is software

@kisak-valve kisak-valve added this to the Next Release milestone Apr 23, 2019
@mikela-valve

This comment has been minimized.

Copy link
Collaborator

@mikela-valve mikela-valve commented Apr 23, 2019

@SkillartzHD I confirmed that as well. When I tested this I did so on a listen server so I didn't notice that the check I was making was checking the server's connected state rather than the state of the player executing the command. The next update should have the proper check in it.

@mikela-valve

This comment has been minimized.

Copy link
Collaborator

@mikela-valve mikela-valve commented May 21, 2019

Fixed in beta 'Exe build: 11:12:36 May 21 2019 (8244)'.

@Splatt581

This comment has been minimized.

Copy link

@Splatt581 Splatt581 commented May 22, 2019

This bug works on last beta again.

@Splatt581

This comment has been minimized.

Copy link

@Splatt581 Splatt581 commented Jun 1, 2019

Fixed in 8254 build.

@oaus

This comment has been minimized.

Copy link

@oaus oaus commented Jun 2, 2019

@mikela-valve close this too

@afwn90cj93201nixr2e1re

This comment has been minimized.

Copy link

@afwn90cj93201nixr2e1re afwn90cj93201nixr2e1re commented Jun 2, 2019

wait till skillartz test it.

@SkillartzHD

This comment has been minimized.

Copy link
Author

@SkillartzHD SkillartzHD commented Jun 2, 2019

Fixed in last build.

@SkillartzHD SkillartzHD closed this Jun 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
8 participants
You can’t perform that action at this time.