WIP: use the new ABI version generation#3493
WIP: use the new ABI version generation#3493illwieckz wants to merge 2 commits intofor-0.56.0/syncfrom
Conversation
288c33a to
020e13f
Compare
| static void CG_Rocket_ExecServerList( const char *table ) | ||
| { | ||
| int netSrc = CG_StringToNetSource( table ); | ||
| if ( Q_stricmp( rocketInfo.data.servers[netSrc]->abiVersion.c_str(), IPC::SYSCALL_ABI_VERSION ) ) { |
There was a problem hiding this comment.
This couldn't work because it was using rocketInfo.data.servers[netSrc][0].abiVersion instead of rocketInfo.data.servers[netSrc][rocketInfo.data.serverIndex[netSrc]].abiVersion
| Q_strncpyz( mapname, Info_ValueForKey( info.c_str(), "mapname" ), sizeof( mapname ) ); | ||
|
|
||
| const std::string version = Info_ValueForKey( info.c_str(), "version" ); | ||
| const std::string abiVersion = Info_ValueForKey( info.c_str(), "abiVersion" ); |
There was a problem hiding this comment.
This couldn't work because it is named abi on engine side.
| maxClients = atoi( Info_ValueForKey( info.c_str(), "sv_maxclients" ) ); | ||
| Q_strncpyz( mapname, Info_ValueForKey( info.c_str(), "mapname" ), sizeof( mapname ) ); | ||
|
|
||
| const std::string version = Info_ValueForKey( info.c_str(), "version" ); |
There was a problem hiding this comment.
This couldn't work because it was named daemonver on engine side. It is removed for now anyway.
|
Thanks for investigating the root cause of this. I don't get why we should get rid of the |
Me removing the engine version string isn't me saying we should not tell the engine version, it's me saying it looks to be too early to deal with engine or game versions yet. Since we don't need engine or game version to check for ABI, it's better to only implement ABI for now. We may have deeper redesigns of things to do first, especially to query the status string. Then once our server queries will be fully functional we can start thinking about how we want to properly send versions. For example once we get proper status parsing in client, then we wouldn't need such custom code for the info string but simply use cvars, etc. Right now we act like everything is a nail because all we have is a hammer. Since we only need the ABI version for now, we better only take care about ABI. Quote from DaemonEngine/Daemon#1933 (comment):
As an example, just run |
|
Our game not having millions of players on thousands of server may let us forget why the protocols have been designed this way. I do remember when XQF/QStat was able to query We better think twice before cramming something into the info string. |
|
I think it's fine as long as the info response fits in a single packet. If you want to balance it out by removing something, we can drop the stats URL which obviously doesn't belong there. |
Oh lol yes, this one looks totally out of place, and we send it in status string anyway… We better strip that!
Well, sure, but One thing is that from a server list point of view, the software version isn't as useful as the protocol version or the abi version. I feel no urge to decide on what to do with engine and game version. We can totally postpone this topic for after the 0.56.0 release. Also, there is a larger work to be done regarding versions, especially the topic of splitting engine and game version, and the topic of the response packet can be considered at the same time. The ABI version on the contrary has an immediate usefulness. |
|
The version has an immediate usefulness to be displayed in the server list like on unvanquished.net/servers. For example if a new release has just been made and you want to play on an up-to-date server, you can check the version. This is already implemented in the in-game server list, so it is relevant for 0.56. We can always change the name of info keys for a new major release. |
|
The variable name fix itself isn't needed anymore as it has already been merged: The rest of the work using the proposed ABI version generation may be rebased over that fix, or even dropped if we decide to drop the boolean the proposed ABI version generation is using. |
Fix ABI mismatch check.
Engine companion: