Browse Source

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

pull/2/head
Alibek Omarov 1 year ago
parent
commit
f7c536b81c
  1. 5
      engine/server/sv_init.c

5
engine/server/sv_init.c

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

Loading…
Cancel
Save