fix: crash with hl25 structs on xash3d again

fix: %t placeholder should return damage inflictor when used in team attack section of chat
fix: all arguments in bot commands are lowercased (resolves #680)
bot: disable threads when engine's timescale is active
bot: a little refactor for the code all over the places
linkage: resolved crash due to sse alignment on ancient engines (resolves #614)
utils move wave parse into crlib
practice: move loading practice to thread pool
build: allow to build with static linkents instead of hooking dlsym

Co-Authored-By: Max <161382234+dyspose@users.noreply.github.com>
This commit is contained in:
jeefo 2025-03-16 18:25:15 +03:00
commit 38c45aff9a
No known key found for this signature in database
GPG key ID: D696786B81B667C8
37 changed files with 348 additions and 304 deletions

View file

@ -124,7 +124,7 @@ SharedLibrary::Func DynamicLinkerHook::lookup (SharedLibrary::Handle module, con
return resolve (module);
}
#if defined (CR_WINDOWS)
#if defined(CR_WINDOWS)
if (HIWORD (function) == 0) {
return resolve (module);
}
@ -174,15 +174,20 @@ bool DynamicLinkerHook::needsBypass () const {
}
void DynamicLinkerHook::initialize () {
#if defined(LINKENT_STATIC)
return;
#endif
if (plat.isNonX86 () || game.is (GameFlags::Metamod)) {
return;
}
constexpr StringRef kKernel32Module = "kernel32.dll";
m_dlsym.initialize ("kernel32.dll", "GetProcAddress", DLSYM_FUNCTION);
m_dlsym.initialize (kKernel32Module, "GetProcAddress", DLSYM_FUNCTION);
m_dlsym.install (reinterpret_cast <void *> (lookupHandler), true);
if (needsBypass ()) {
m_dlclose.initialize ("kernel32.dll", "FreeLibrary", DLCLOSE_FUNCTION);
m_dlclose.initialize (kKernel32Module, "FreeLibrary", DLCLOSE_FUNCTION);
m_dlclose.install (reinterpret_cast <void *> (closeHandler), true);
}
m_self.locate (&engfuncs);