ValveSoftware / halflife Public
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] PEntityOfEntIndex may not return the last player #2272
Comments
Fixed, will be in next beta update. |
Fixed in beta 'Exe build: 11:12:36 May 21 2019 (8244)'. |
Closing as fixed. |
Unfortunately it looks like CZ:DS and likely some other games rely on this bug being present and it's a bit difficult to test for this without playing through every single scene of every single game. I'm going to revert this in For mods using this that want the fixed behaviour, I did add a parallel function to the engine interface, |
This has been updated in beta 8279. |
@mikela-valve Here's all I found in CZ:DS Beta 8265: |
@mikela-valve so right after |
Thanks @CS-PRO1. @tschumann That's correct (though it will be |
Add new undocumented GoldSrc eiface function, PEntityOfEntIndexAllEntities, a bug-free version of PEntityOfEntIndex Ref: ValveSoftware/halflife#2272
Add new undocumented GoldSrc eiface function, PEntityOfEntIndexAllEntities, a bug-free version of PEntityOfEntIndex Ref: ValveSoftware/halflife#2272
PEntityOfEntIndex
function has a condition that prevents the last player from being returned. This is because the player index starts at 1, since the map is already located at index 0 and therefore we must perform a check in the range1 .. sv::maxplayers
.The solution is to replace the
>=
check with>
to allow the last player to be checked.The text was updated successfully, but these errors were encountered: