Author Topic: Force client to use correct cgame QVM...  (Read 7120 times)

NewCreation

  • Posts: 2
  • Turrets: +0/-1
Force client to use correct cgame QVM...
« on: February 22, 2012, 05:06:50 pm »
Never mind, solved. Thanks.
« Last Edit: February 22, 2012, 05:59:10 pm by NewCreation »

/dev/humancontroller

  • Posts: 1033
  • Turrets: +1002/-383
Re: Force client to use correct cgame QVM...
« Reply #1 on: February 22, 2012, 06:25:34 pm »
Just working on a server here, Trem 1.2. Compiled QVM all nicely, looking good, but anyone who has the vms zip from the "Sir" clan server and connects can't do some things because the client loads the cgame.qvm from the other .pk3 instead of from the .pk3 used by my server.
in case the server is in pure mode, a client will load the cgame.qvm file from the pk3 found on the server, period; otherwise, the client is kicked for loading the cgame module from the wrong pk3 file. btw, the server doesn't use the cgame.qvm file.
I'm looking into it on searches and stuff and haven't found much. How do I force the client game to use the correct cgame.qvm?
  • make sure the server is in pure mode (set the sv_pure cvar to 1)
  • use an fs_game setting other than "", "base", and "gpp", to avoid polluting stock game installations (of clients) with your mod (ie., with irrelated cvars and pk3 files)
  • put your cgame.qvm file and ui.qvm file in a pk3 file (the path in the archive should be vm/cgame.qvm and vm/ui.qvm), and put the pk3 file in the <insert_your_fs_game_setting_here> directory (of the server's fs_basepath or fs_homepath directory)
putting the pk3 file in the non-base fs_game directory will force clients (that have downloading enabled) to download the pk3 file, whether it contain data or QVMs files. the server forces clients to use the cgame.qvm from the first pk3 in which the cgame.qvm is found (also, the server forces the download of that pk3 file). the server first searches pk3 files in the fs_game directory, and then in the base directory. inside a directory, if more than one pk3 file contains vm/cgame.qvm, then the alphabetically-latest pk3 file takes precedence.

EDIT: for the purposes of archiving problems and solutions, do not delete the question, you n00b.
« Last Edit: February 22, 2012, 06:29:02 pm by /dev/humancontroller »