2
0
mirror of https://github.com/FWGS/xash3d-fwgs synced 2024-11-22 18:07:09 +01:00

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

View File

@ -1041,8 +1041,9 @@ qboolean SV_SpawnServer( const char *mapname, const char *startspot, qboolean ba
// force normal player collisions for single player // force normal player collisions for single player
if( svs.maxclients == 1 ) Cvar_SetValue( "sv_clienttrace", 1 ); if( svs.maxclients == 1 ) Cvar_SetValue( "sv_clienttrace", 1 );
// make sure what server name doesn't contain path and extension // allow loading maps from subdirectories, strip extension anyway
COM_FileBase( mapname, sv.name, sizeof( sv.name )); Q_strncpy( sv.name, mapname, sizeof( sv.name ));
COM_StripExtension( sv.name );
// precache and static commands can be issued during map initialization // precache and static commands can be issued during map initialization
Host_SetServerState( ss_loading ); Host_SetServerState( ss_loading );