Hi guys,
So, I've been coding a new game mode (for an upcoming LAN competition with people from all over my town-- grand prize is $1000 hehe).
I thought I was on top of it until I got a first chance exception at:
Code:
(sourcehook.cpp)
bool CSourceHookImpl::RemoveHookByID(int hookid)
Line 227 hook_iter->GetHandler()->DeleteThis();
Sadly the call stack doesn't even tell me where the extension is screwing up:
Code:
> metamod.2.l4d2.dll!SourceHook::Impl::CSourceHookImpl::RemoveHookByID(int hookid) Line 227 C++
metamod.2.l4d2.dll!SourceHook::Impl::CSourceHookImpl::CompleteShutdown() Line 631 C++
metamod.2.l4d2.dll!SourceHook::Impl::CSourceHookImpl::~CSourceHookImpl() Line 86 C++
metamod.2.l4d2.dll!doexit(int code, int quick, int retcaller) Line 584 C
metamod.2.l4d2.dll!_cexit() Line 409 C
metamod.2.l4d2.dll!_CRT_INIT(void * hDllHandle, unsigned long dwReason, void * lpreserved) Line 163 C
metamod.2.l4d2.dll!__DllMainCRTStartup(void * hDllHandle, unsigned long dwReason, void * lpreserved) Line 384 C
metamod.2.l4d2.dll!_DllMainCRTStartup(void * hDllHandle, unsigned long dwReason, void * lpreserved) Line 325 C
ntdll.dll!77ba9950() Unknown
[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]
ntdll.dll!77bbd6b2() Unknown
ntdll.dll!77bbd554() Unknown
kernel32.dll!76ec7a0d() Unknown
The only two sourcehooks I've added in the extension are these:
Code:
SH_DECL_HOOK0_void(IServerGameDLL, LevelShutdown, SH_NOATTRIB, false);
SH_DECL_HOOK6(IServerGameDLL, LevelInit, SH_NOATTRIB, false, bool, const char *, const char *, const char *, const char *, bool, bool);
Removing those hooks does nothing. The game crashes at the very end of the loading screen. Damn