Quote:
Originally Posted by KWo
That pfnRunPlayerMove function crashes also in such situations - If You let Your bot to shoot at some breakable with entity having some v.impulse value > 0, as soon it is shooting at it, the CS crashes in pfnRunPlayerMove. All speeds arguments of bot were as 0, nothing special there, but the game crashes exactly in that function (at least the debugger of MS VC++ 2005 Express shows it). mingw shows the crash in mp.dll (the memory can't be read).
|
Debugger VC++ 2005 Pro, everytime shows crash somewhere in mp.dll or metamod, however, there is a call for pfnRunplayermove in callstack window, from bot library, but crash is not in this function. Just as a test i've add try/catch block on this function and set MSVC option
Enable C++ Excpetions = Yes With SEH Exceptions (/EHa)
Code:
try
{
(*g_engfuncs.pfnRunPlayerMove) (GetEntity (), m_vMoveAngles, m_fMoveSpeed, m_fSideMoveSpeed, 0, pev->button, pev->impulse, static_cast <byte> (m_iMsecVal));
}
catch (...)
{
CFile Err ("error.log", "at");
Err.Printf ("pfnRPM %s - CRASH!\n", STRING (pev->netname));
Err.Close ();
}
File "error.log", was never created, but game is crashes as always. Try/catch catching all errors even something like that "*((int *) 0) = 0;", or if error not occurs in our library. So i think error is in mp.dll, and not caused buy pfnRPM.