Mounting multiple games: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 6: Line 6:
* '''Half Life 2 (fixes),'''
* '''Half Life 2 (fixes),'''


This code will now fix bugs which may be featured with a game, also this allows you use the CSS and DOD etc maps.. Though the info_player_*** will not work, you'll have to bind that to the original info_player_start which isn't hard.
This code will now fix bugs which may be featured with a game, also this allows you use the CS:S and DOD:S etc maps.. Though the info_player_*** will not work, you'll have to bind that to the original info_player_start which isn't hard.


cdll_client_int.cpp - Go to about line "622" and paste this. CLIENTSIDE
cdll_client_int.cpp - Go to about line "622" and paste this. CLIENTSIDE
<pre>
<pre>
filesystem->AddSearchPath("hl2mp", "GAME");
#ifndef DEBUG
filesystem->AddSearchPath("hl2", "GAME");
filesystem->AddSearchPath("hl2mp", "GAME");
filesystem->AddSearchPath("episodic", "GAME");
filesystem->AddSearchPath("hl2", "GAME");
filesystem->AddSearchPath("dod", "GAME");
filesystem->AddSearchPath("episodic", "GAME");
filesystem->AddSearchPath("cstrike", "GAME");
filesystem->AddSearchPath("dod", "GAME");
filesystem->MountSteamContent(220);
filesystem->AddSearchPath("cstrike", "GAME");
filesystem->MountSteamContent(320);
filesystem->MountSteamContent(220);
filesystem->MountSteamContent(300);
filesystem->MountSteamContent(320);
filesystem->MountSteamContent(240);
filesystem->MountSteamContent(300);
filesystem->MountSteamContent(240);
#endif // DEBUG
</pre>
</pre>


Now open GameInterface.cpp (SERVERSIDE)and about line 551 paste this.
Now open GameInterface.cpp (SERVERSIDE)and about line 551 paste this.
<pre>
<pre>
filesystem->AddSearchPath("hl2mp", "GAME");
#ifndef DEBUG
filesystem->AddSearchPath("hl2", "GAME");
filesystem->AddSearchPath("hl2mp", "GAME");
filesystem->AddSearchPath("episodic", "GAME");
filesystem->AddSearchPath("hl2", "GAME");
filesystem->AddSearchPath("dod", "GAME");
filesystem->AddSearchPath("episodic", "GAME");
filesystem->AddSearchPath("cstrike", "GAME");
filesystem->AddSearchPath("dod", "GAME");
filesystem->MountSteamContent(220);
filesystem->AddSearchPath("cstrike", "GAME");
filesystem->MountSteamContent(320);
filesystem->MountSteamContent(220);
filesystem->MountSteamContent(300);
filesystem->MountSteamContent(320);
filesystem->MountSteamContent(240);
filesystem->MountSteamContent(300);
filesystem->MountSteamContent(240);
#endif // DEBUG
</pre>
</pre>


Compile or rebuild and run your game.
Compile or rebuild and run your game.


{{warning|This does not work in debug mode. Comment these lines out to debug. --[[User:RedPuma|RedPuma]] 07:32, 21 Nov 2007 (PST)}}
{{warning|This does not work in debug mode. Hence why "#ifndef DEBUG" is there! --[[User:ProZak|ProZak]] 08:57, 25 Nov 2007 (PST)}}


== Credits ==
== Credits ==

Revision as of 09:57, 25 November 2007

The following short section of code allows you to mount additional files from the following games:

  • Counter Strike Source,
  • Hl2MP,
  • Episode 1,
  • Day of Defeat Source,
  • Half Life 2 (fixes),

This code will now fix bugs which may be featured with a game, also this allows you use the CS:S and DOD:S etc maps.. Though the info_player_*** will not work, you'll have to bind that to the original info_player_start which isn't hard.

cdll_client_int.cpp - Go to about line "622" and paste this. CLIENTSIDE

#ifndef DEBUG
	filesystem->AddSearchPath("hl2mp", "GAME");
	filesystem->AddSearchPath("hl2", "GAME");
	filesystem->AddSearchPath("episodic", "GAME");
	filesystem->AddSearchPath("dod", "GAME");
	filesystem->AddSearchPath("cstrike", "GAME");
	filesystem->MountSteamContent(220);
	filesystem->MountSteamContent(320);
	filesystem->MountSteamContent(300);
	filesystem->MountSteamContent(240);
#endif // DEBUG

Now open GameInterface.cpp (SERVERSIDE)and about line 551 paste this.

#ifndef DEBUG
	filesystem->AddSearchPath("hl2mp", "GAME");
	filesystem->AddSearchPath("hl2", "GAME");
	filesystem->AddSearchPath("episodic", "GAME");
	filesystem->AddSearchPath("dod", "GAME");
	filesystem->AddSearchPath("cstrike", "GAME");
	filesystem->MountSteamContent(220);
	filesystem->MountSteamContent(320);
	filesystem->MountSteamContent(300);
	filesystem->MountSteamContent(240);
#endif // DEBUG

Compile or rebuild and run your game.

Warning.pngWarning:This does not work in debug mode. Hence why "#ifndef DEBUG" is there! --ProZak 08:57, 25 Nov 2007 (PST)

Credits

  • John Stuart AKA TommyGun

See also