mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-19 19:40:21 +00:00
engine: client: return empty string in pfnGetLevelName if no map is loaded yet
This commit is contained in:
parent
f42a174482
commit
f4961d9da7
@ -2582,7 +2582,10 @@ static const char *pfnGetLevelName( void )
|
|||||||
{
|
{
|
||||||
static char mapname[64];
|
static char mapname[64];
|
||||||
|
|
||||||
if( cls.state >= ca_connected )
|
// a1ba: don't return maps/.bsp if no map is loaded yet
|
||||||
|
// in GoldSrc this is handled by cl.levelname field but we don't have it
|
||||||
|
// so emulate this behavior here
|
||||||
|
if( cls.state >= ca_connected && COM_CheckStringEmpty( clgame.mapname ))
|
||||||
Q_snprintf( mapname, sizeof( mapname ), "maps/%s.bsp", clgame.mapname );
|
Q_snprintf( mapname, sizeof( mapname ), "maps/%s.bsp", clgame.mapname );
|
||||||
else mapname[0] = '\0'; // not in game
|
else mapname[0] = '\0'; // not in game
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user