2
0
mirror of https://github.com/rehlds/reapi.git synced 2025-01-29 06:57:55 +03:00

Fix: to get current mapname on first spawn (part 2)

This commit is contained in:
s1lentq 2017-01-04 19:04:57 +07:00
parent 71d6444c41
commit 5fffe5368a

View File

@ -23,6 +23,10 @@ void OnAmxxAttach()
// initialize API // initialize API
api_cfg.Init(); api_cfg.Init();
g_pEdicts = g_engfuncs.pfnPEntityOfEntIndex(0); g_pEdicts = g_engfuncs.pfnPEntityOfEntIndex(0);
// save true mapname
strncpy(g_szMapName, STRING(gpGlobals->mapname), sizeof(g_szMapName) - 1);
g_szMapName[sizeof(g_szMapName) - 1] = '\0';
} }
bool OnMetaAttach() bool OnMetaAttach()