Skip to content

Commit

Permalink
cmod: Update alt fire swap configstring index selection
Browse files Browse the repository at this point in the history
Update configstring index selection to reduce chance of conflicts, especially on maps containing a very large number of location tags.
  • Loading branch information
Chomenor committed Mar 15, 2024
1 parent cb66dee commit 167099e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion code/server/sv_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,14 @@ void SV_SpawnServer( const char *mapname, qboolean killBots ) {
}

if ( sv_altSwapSupport->integer ) {
SV_SetConfigstring( 880, "!modcfg \\altSwapSupport\\1" );
// try to place alt swap support value in unused configstring index
// specific index value doesn't matter since client checks all of them
for ( i = 1020; i > 1000; --i ) {
if ( !*sv.configstrings[i] ) {
SV_SetConfigstring( i, "!modcfg \\altSwapSupport\\1" );
break;
}
}
}
#endif

Expand Down

0 comments on commit 167099e

Please sign in to comment.