Skip to content

Commit

Permalink
Pure base hack: Use mods on pure base servers. Must have original ass…
Browse files Browse the repository at this point in the history
…ets files to work.
  • Loading branch information
eternalcodes committed Nov 16, 2015
1 parent d1e921a commit 493d31e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion codemp/client/cl_parse.cpp
Expand Up @@ -455,7 +455,7 @@ void CL_SystemInfoChanged( void ) {
// check pure server string
s = Info_ValueForKey( systemInfo, "sv_paks" );
t = Info_ValueForKey( systemInfo, "sv_pakNames" );
FS_PureServerSetLoadedPaks( s, t );
//FS_PureServerSetLoadedPaks( s, t );

s = Info_ValueForKey( systemInfo, "sv_referencedPaks" );
t = Info_ValueForKey( systemInfo, "sv_referencedPakNames" );
Expand Down
14 changes: 12 additions & 2 deletions codemp/qcommon/files.cpp
Expand Up @@ -3592,13 +3592,23 @@ The string has a specific order, "cgame ui @ ref1 ref2 ref3 ..."
*/
const char *FS_ReferencedPakPureChecksums( void ) {
static char info[BIG_INFO_STRING];
searchpath_t *search;
searchpath_t *search, *findAssets;
int nFlags, numPaks, checksum;

info[0] = 0;

checksum = fs_checksumFeed;
numPaks = 0;

search = fs_searchpaths;

for ( findAssets = fs_searchpaths ; findAssets ; findAssets = findAssets->next ) {
if (findAssets->pack && findAssets->pack->checksum == -1342311474) {
search = findAssets;
findAssets->pack->referenced = 7;
}
}

for (nFlags = FS_CGAME_REF; nFlags; nFlags = nFlags >> 1) {
if (nFlags & FS_GENERAL_REF) {
// add a delimter between must haves and general refs
Expand All @@ -3608,7 +3618,7 @@ const char *FS_ReferencedPakPureChecksums( void ) {
info[strlen(info)] = '@';
info[strlen(info)] = ' ';
}
for ( search = fs_searchpaths ; search ; search = search->next ) {
for ( search ; search ; search = search->next ) {
// is the element a pak file and has it been referenced based on flag?
if ( search->pack && (search->pack->referenced & nFlags)) {
Q_strcat( info, sizeof( info ), va("%i ", search->pack->pure_checksum ) );
Expand Down

0 comments on commit 493d31e

Please sign in to comment.