Mounting multiple GCFs: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(avoid double redir)
 
(9 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[[Category:Programming]][[Category:Tutorials]][[Category:Modding]]
#redirect [[Mounting multiple games]]
Sometimes we want to mount multiple GCF's, for example: if you have made a new mod, based on HL2MP, that needs to loads files from HL2MP '''and''' HL2.
Well, it's only a couple of lines of code:
 
== The code ==
Open the file ''cdll_client.cpp'' and find the function ''int CHLClient::Init''.
Go to end of the function and add before ''return true;''
 
<pre>
filesystem->AddSearchPath("hl2", "GAME");
filesystem->MountSteamContent(220);
</pre>
 
That's all :)
 
This only adds HL2 but you can add more, possible values are:
 
* cstrike / 240
* hl2mp / 320
* dod / 300
* lostcoast / 340

Latest revision as of 16:40, 21 February 2010