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

ServerActivate checks for player entities incorrectly #3282

Open
SamVanheer opened this issue Jun 13, 2022 · 0 comments
Open

ServerActivate checks for player entities incorrectly #3282

SamVanheer opened this issue Jun 13, 2022 · 0 comments

Comments

@SamVanheer
Copy link

SamVanheer commented Jun 13, 2022

ServerActivate checks for player entities incorrectly, resulting in it not calling Activate for worldspawn:

halflife/dlls/client.cpp

Lines 716 to 718 in c7240b9

// Clients aren't necessarily initialized until ClientPutInServer()
if ( i < clientMax || !pEdictList[i].pvPrivateData )
continue;

This check also allows it to call Activate on the player in the slot matching maxplayers (last slot) which it shouldn't do.

This should be:

// Clients aren't necessarily initialized until ClientPutInServer()
if ( (i > 0 && i <= clientMax) || !pEdictList[i].pvPrivateData )
	continue;

Originally reported by vasiavasiavasia95.

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

No branches or pull requests

2 participants