This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

some reason about why sv_pure not effect in L4D2


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
LinLinLin
Senior Member
Join Date: Sep 2021
Old Yesterday , 15:00   some reason about why sv_pure not effect in L4D2
Reply With Quote #1

sorry for my pool English.

The problem of pure server in L4D2 is complex. But you can do the follow step and you will understand what happen when you start pure server.

1. add +sv_pure 1 +sv_pure_trace 2 to your dedicate server start command.
2. make a file "pure_server_whitelist.txt" in folder which "whitelist.cfg" stay.
3. add follow content in it:

PHP Code:
whitelist
{
    
left4dead2\models\...  allow_from_disk+check_crc

now everything is done, start your dedicate server, you will find something like:
PHP Code:
...
---- 
Host_NewGame ----
Caching file CRCs for pure server...
(
Unique   ): [GAME_ROOT]\left4dead2/models/props_foliage/fallentree01.dx80.vtx 2163624025
... 
OK, We start our pure server successfully, but now it become complex to us.
You will find that whatever player join, they can still use their mod as usual and server won't check anything. That means it doesn't work correctly...It's the server failed to check?

Now do the above step again but in your client game this time. After that start game and then use map xxx in console to start a local server and you will find these message in your console.
PHP Code:
...
---- 
Host_NewGame ----
Caching file CRCs for pure server...
(
Unique   ): [GAME_ROOT]\left4dead2\models\props_foliage\fallentree01.dx80.vtx 2163624025
...

#Cstrike_TitlesTXT_Game_connected
Receiving uncompressed update from server
Pure server CRC check
client Miuwiki passed check for [GAME_ROOT]\left4dead2\models\props_foliage\fallentree01.dx80.vtx
Pure server CRC check
client Miuwiki passed check for [GAME_ROOT]\left4dead2\models\props_foliage\fallentree01.sw.vtx
Pure server CRC check
client Miuwiki passed check for [GAME_ROOT]\left4dead2\models\survivors\coach_game.pre
Pure server CRC check
client Miuwiki passed check for [GAME_ROOT]\left4dead2\models\survivors\gambler_game.pre
... 
Now comes the first question about sv_pure: why use sv_pure_trace 2 not 1?
  • Exactly, the description of this convar in l4d2 is wrong.
    PHP Code:
    sv_pure_trace     0         If set to 1the server will print a message whenever a client is verifying a CRC for a file
    when you set it to 1 it only print the message when server cache the file CRC on map start or player failed to check, only > 1 will print the message of client checking file CRC success. You can easily find the judgement in the function "CGameClient:rocessFileCRCCheck" in "*(dword_3A6DFC + 4 > 1". If the server not print the success check no one know that the server is checking or not.

OK, now you playing in local server, exit it and join to your dedicate server which has done the above step, check console you will find the dedicate server start checking you file like in local server! The console will print the messsage about the file state.

Don't be happy, now exit your client game and restart it, then join to your dedicate server directly. You will find that your dedicate server won't check anything again.

It is confused. right?
Now try to change the file set in the pure_server_whitelist.txt like changing the .pre file of survivor model, and then restart your client game and start local server again.
After that, try to join your dedicate server. If you haven't change the "sv_pure_kick_clients" cvar you will be kick from server with "Pure server: file [%s]\\%s does not match the server's file." message.

Now reset the change file, add a new file like key.txt in your models folder, do the same step.
This time you will be kick from server with "Pure server: client has loaded extra file [%s]\\%s. File must be removed to play on this server." message.

The conclusion is clear:
  • server cache data <===> client cache data

    When server start pure server, it only check the client cache data. But most of time client won't have any cache data since L4D2 don't set the default cache for client when game start. If client cache data has a file not match the server, it can't join in the server because the not match file, when client cache data has a file not in server cache data, it can't join in the server because the extra file.
    Also, you can try to set sv_pure 2 to your dedicate server and cache any file in client side. You are not able to join to your server because your server cache data is null, any file in client cache data will be regard as extra file.
    But if server cache data has the file that client cache data not contain, and all client cache data are pass, client is allow to join the server.
    In other words,if client has nothing in cache data, it can join to any pure server without any arrest.
    What a ridiculous...
  • Why dedicate server can't force client to cache the file in server cache data and then transport to server to confirm the CRC?

Another problem is the vpk file system. Now L4D2 use check_crc flag which not support vpk file system. This is the reason why they crash their server in this Talk page in developer community. Since "materials\..." point to a not exit folder, the correctly folder is "left4dead2\materials\...".
But it also confirm that we can't locate to the folder in .vpk. I hope i am wrong since this is important for anyone who want to use the pure server.

I will continue to test this feature and hope to repaire it.

Last edited by LinLinLin; Yesterday at 15:07.
LinLinLin is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:20.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode