Rewrote format() parser to be re-entrant and easier to read

Added various optimizations
Fixed memory leak in sh_tinyhash
This commit is contained in:
David Anderson
2005-11-21 10:04:43 +00:00
parent f13599177f
commit c6fc34a64d
7 changed files with 269 additions and 276 deletions

View File

@ -249,10 +249,14 @@ int C_Spawn(edict_t *pent)
// ###### Load lang
char file[256];
g_langMngr.LoadCache(build_pathname_r(file, sizeof(file) - 1, "%s/dictionary.cache", get_localinfo("amxx_datadir", "addons/amxmodx/data")));
DWORD stop,start=GetTickCount();
if (!g_langMngr.Load(build_pathname_r(file, sizeof(file) - 1, "%s/languages.dat", get_localinfo("amxmodx_datadir", "addons/amxmodx/data"))))
{
LOG_MESSAGE(PLID, "Cache invalidated!");
g_langMngr.InvalidateCache();
}
stop=GetTickCount();
LOG_MESSAGE(PLID, "CacheDB load time: %d milliseconds", stop-start);
// ###### Initialize commands prefixes
g_commands.registerPrefix("amx");