-
Notifications
You must be signed in to change notification settings - Fork 171
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
Increase engine limits in accordance to the new update #1002
base: master
Are you sure you want to change the base?
Conversation
Increase packet entity limit for compatibility with the 25th anniversary update's maps
Also I only now realized that the line about |
MAX_PACKET_ENTITES
from 256 to 1024.
Each mod overrides the num_edicts value in the Perhaps this is what the developers of the update changed? (I haven't looked in the IDA) |
That's what I thought at first which is why I hadn't changed it before. Then I randomly decided to look into it again and I noticed that * Contents of
|
@@ -39,6 +39,6 @@ constexpr auto MAX_LIGHTSTYLE_SIZE = size_t{64}; | |||
#define MAX_BASE_DECALS (1<<MAX_DECAL_INDEX_BITS) | |||
|
|||
#define MAX_EVENTS 256 | |||
#define MAX_PACKET_ENTITIES 256 // 256 visible entities per frame |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the moment, when game clients have not updated and have an old version, this change can be critical and older versions of game clients will get critical errors.
safe point is here
https://github.com/dreamstalker/rehlds/blob/3f19bc1d3e254d9665893e93383487ba03d29f2a/rehlds/engine/sv_main.cpp#L4671-L4675
You can test it with CI binaries:
https://github.com/dreamstalker/rehlds/actions/runs/6957538650
Need the engine be able to detect the client version (HL25...) & apply changes & limits in consequence. |
In this case everybody should upgrade their clients (Steam, maybe GSClient dev team also) and ReHLDS too, we cannot stick with the older versions if we want better features and tools for modding |
When some recent clients are causing troubles because VALVe did not tested all well, or need deep changes in our client & server configs, etc., not everyone will like to update, neither have time or motivation for such, also knowing nowadays people on HL1 might no longer have same motivation than before (also the frequentation is now lowered than the past). I always thinked that trying to provide support for old versions, by detecting client's build is the best to avoid issues. |
I agree with you. Thing is, if we want a way to make client show his version to the server engine, an update is required, so everybody should be forced to update their binaries. It's cyclical |
I don't really know GoldSrc code-wise that well, but before I looked into this my initial idea was to see if if the server can find any hint as to which version of the engine the client runs on and adjust accordingly. I ended up submitting the PR kind of as a last resort since the lower limit does end up making the experience worse on the new maps. Since my PR got closed I've been trying to think of a way to detect if the client is running on the 25th anniversary update and think of detectable differences. |
Current CVar "sv_version" on the client can be queried by the engine (& parsed...), or the presence of new CVar(s) added after each version could be used as second tricky workaround, but unfortunately a minor "ping delay" until he replies (so not accessible at first "server contact"), also the fact the client can alter it (but usually the client will not think to trick it), while devs should make it unmodifiable/locked.
Type "cvarlist log" on old build (on your client), then again on new build, use a text comparator like PSPad or else to check if there are new or removed CVars, etc., or query "sv_version" (& parse it), must be higher than 8684 for sure! |
Is there a way for the server to query CVars on the client though? I figured there wasn't since it seems like the CVars that the server needs are put in EDIT: sorry for the stupid question, just found it lol |
The engine can obviously does it, but the value must be stored, so either add a new member on an existing or a new structure, either a new global variable. |
pfnCvarValue, but
|
I think a slight delay is better than nothing atp tbh. Also thank you! |
We might wait to see an update from Valve first, this is breaking everything |
I mean I guess I might try seeing if I can get this idea to work anyways in case Valve takes their time maybe. I'm not gonna push anything like that unless Valve takes too long. |
Yeah if we query it from client connection, we will have the value before it enters the game (pfnPutInServer), except for a player being on mars!, so this should work fine for our needs & cover most of the areas where only in-game codes are used. But yeah, better wait for a more stable/definitive update by VALVe, but we do not know what are their plans, if this is just a minor one for 25th and if their current ongoing work is just about to fix the issues they brought on it, or if they magically plan to do more, then update all HL1 games in a mass with a bunch of changes & new features. |
Based on the last update (improving mod support and updating HLDS) it seems like their plan is to move everything over to the new engine version and consider the older versions unsupported. I have a feeling like it might just be smarter to make an optional CVar that raises the limit if enabled for now and if the community ends up adopting we should make it the default. I feel like having it as an optional CVar for now won't mess with people's existing configs and will allow owners to host newer maps without issues. Also speaking of the last update, what should be done about the Also I'd like to apologize if this is not the best place to discuss the changes in general and I'm sorry for my lack of experience (I'm realizing that I'm not the best person to work on this and I don't wanna be too much of an annoyance for the contributors and maintainers). |
apparently this time they are doing "private" tests before releasing future updates |
CS and CS:CZ updated 2h ago to support the HL25th engine updates. Finally. I understand that implementing these changes will make clients with older versions incompatible. However, I also understand that it is necessary if we want better features and tools for modding. I would have liked them to expand the limits of the sounds/models/sprites/etc precache as well. Perhaps they forgot (? |
Increase packet entity limit for compatibility with the 25th anniversary update's maps (Primarily rocket_frenzy, at least that's the only one that caught my attention so far) in accordance to the limit present in the 25th anniversary update's engine.