Skip to content

Commit

Permalink
engine: server: allow loading maps from subdirectories as this is use…
Browse files Browse the repository at this point in the history
…d by some Half-Life mods
  • Loading branch information
a1batross committed Oct 28, 2023
1 parent 6c40104 commit f7c536b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions engine/server/sv_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -1041,8 +1041,9 @@ qboolean SV_SpawnServer( const char *mapname, const char *startspot, qboolean ba
// force normal player collisions for single player
if( svs.maxclients == 1 ) Cvar_SetValue( "sv_clienttrace", 1 );

// make sure what server name doesn't contain path and extension
COM_FileBase( mapname, sv.name, sizeof( sv.name ));
// allow loading maps from subdirectories, strip extension anyway
Q_strncpy( sv.name, mapname, sizeof( sv.name ));
COM_StripExtension( sv.name );

// precache and static commands can be issued during map initialization
Host_SetServerState( ss_loading );
Expand Down

0 comments on commit f7c536b

Please sign in to comment.