engine: server: allow loading maps from subdirectories as this is used by some Half-Life mods

This commit is contained in:
Alibek Omarov 2023-10-29 02:44:46 +03:00
parent 6c40104c66
commit f7c536b81c
1 changed files with 3 additions and 2 deletions

View File

@ -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 );