Your example is a bit misleading as to what would be needed.  You shouldn't 
include version numbers in the description of the mod.  You can always just add 
an sv_version cvar if you want a stringified representation of the version.

The version that the srcds.exe/HL2.exe closed-source side of things would be 
concerned with would only be incremented when the new version was not 
backwards-compatible with the old version.  Usually this would occur when class 
tables changed.  It might also occur if usermessages needed to be interpreted 
differently, or perhaps if there were a critical bug of some sort in a client 
previous version and you wanted to prevent it from connecting to a new server 
and causing havoc.  If the compatibility_version of the server differed from 
the client, then it would just pop up a message with a link to the "manual" or 
"developer_url" websites as defined in gameinfo.txt.

ConVar sv_version("sv_version", "v6.1a beta");
void GameRules::GetGameDescription(char*& description, int& 
compatibility_version)
{
   description = "My Mod";
   compatibility_version = 4;
}


Another possibility would be to leverage some of the sv_pure functionality to 
allow for specification of a list of sha1sums of acceptable 
client.dll/server.dll on the client, for a given version of the server.  The 
only downside there would be that you'd need to inform server hosts to add a 
new sha1sum to their server list every time a new client version was released.



At 2007/11/17 02:05 PM, Jeffrey \"botman\" Broome wrote:
>Jorge Rodriguez wrote:
>>--
>>[ Picked text/plain from multipart/alternative ]
>>On 11/17/07, Jeremy <[EMAIL PROTECTED]> wrote:
>>>It's a bit hard to believe something so trivial as client->server
>>>versioning
>>
>>
>>... trivial?
>>
>>I don't know where you got that idea.
>
>It could be trivial if GameRules::GetGameDescription() returned a
>version number as well as a string...
>
>GameRules::GetGameDescription(char *Description, int *Version)
>{
>   strcpy(Description, "My Mod v.83");
>   *Version = 83;
>}
>
>The client would also need some way to return the version number to the
>engine so that it could check this when displaying servers (filtering
>out servers that weren't running the same version as the client).
>
>--
>Jeffrey "botman" Broome
>
>_______________________________________________
>To unsubscribe, edit your list preferences, or view the list archives, please 
>visit:
>http://list.valvesoftware.com/mailman/listinfo/hlcoders

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to