diff --git a/MTA10/core/CCrashDumpWriter.cpp b/MTA10/core/CCrashDumpWriter.cpp index 2b33621772b6..e33e6a5f6746 100644 --- a/MTA10/core/CCrashDumpWriter.cpp +++ b/MTA10/core/CCrashDumpWriter.cpp @@ -511,6 +511,10 @@ void CCrashDumpWriter::DumpMiniDump ( _EXCEPTION_POINTERS* pException, CExceptio CCore::GetSingleton().SaveConfig(); AddReportLog( 9205, "Disabled volumetric shadows" ); } + + CNet* pNet = CCore::GetSingleton().GetNetwork(); + if ( pNet ) + pNet->PostCrash(); } diff --git a/MTA10/multiplayer_sa/CMultiplayerSA_CrashFixHacks.cpp b/MTA10/multiplayer_sa/CMultiplayerSA_CrashFixHacks.cpp index 42c9e7322c4c..38c874829dc8 100644 --- a/MTA10/multiplayer_sa/CMultiplayerSA_CrashFixHacks.cpp +++ b/MTA10/multiplayer_sa/CMultiplayerSA_CrashFixHacks.cpp @@ -1134,6 +1134,23 @@ void _declspec(naked) HOOK_CClumpModelInfo_GetFrameFromId () } +struct CStreamingInfo +{ + DWORD gta_hash; + WORD chain_next; + uchar flg; + uchar archiveId; + DWORD offsetInBlocks; + DWORD sizeInBlocks; + DWORD reqload; +}; + +CStreamingInfo* GetStreamingInfoFromModelId( uint id ) +{ + CStreamingInfo* pItemInfo = (CStreamingInfo*)(0x8E4CC0); + return pItemInfo + id; +} + ////////////////////////////////////////////////////////////////////////////////////////// // // CEntity::GetBoundRect @@ -1160,7 +1177,19 @@ void OnMY_CEntity_GetBoundRect( CEntitySAInterface* pEntity ) if ( !pColModel ) { // Crash will occur at offset 00134134 - LogEvent( 815, "Model collision missing", "CEntity_GetBoundRect", SString( "No collision for model:%d", usModelId ), 5415 ); + CStreamingInfo* pStreamingInfo = GetStreamingInfoFromModelId( usModelId ); + SString strDetails( "refs:%d txd:%d RwObj:%08x bOwn:%d bColStr:%d flg:%d off:%d size:%d reqload:%d" + ,pModelInfo->usNumberOfRefs + ,pModelInfo->usTextureDictionary + ,pModelInfo->pRwObject + ,pModelInfo->bDoWeOwnTheColModel + ,pModelInfo->bCollisionWasStreamedWithModel + ,pStreamingInfo->flg + ,pStreamingInfo->offsetInBlocks + ,pStreamingInfo->sizeInBlocks + ,pStreamingInfo->reqload + ); + LogEvent( 815, "Model collision missing", "CEntity_GetBoundRect", SString( "No collision for model:%d %s", usModelId, *strDetails ), 5415 ); CArgMap argMap; argMap.Set( "id", usModelId ); argMap.Set( "reason", "collision" ); diff --git a/MTA10/sdk/net/CNet.h b/MTA10/sdk/net/CNet.h index 2d96804a6c2a..63ced08489b6 100644 --- a/MTA10/sdk/net/CNet.h +++ b/MTA10/sdk/net/CNet.h @@ -126,6 +126,7 @@ class CNet virtual CBinaryFileInterface* AllocateBinaryFile ( void ) = 0; virtual bool EncryptDumpfile ( const char* szClearPathFilename, const char* szEncryptedPathFilename ) = 0; virtual bool DecryptScript ( const char* cpInBuffer, uint uiInSize, const char** pcpOutBuffer, uint* puiOutSize, const char* szScriptName ) = 0; + virtual void PostCrash ( void ) = 0; }; #endif diff --git a/MTA10/version.h b/MTA10/version.h index fe27094f3ebf..4e4644ecae51 100644 --- a/MTA10/version.h +++ b/MTA10/version.h @@ -75,7 +75,7 @@ #define _ASE_VERSION QUOTE_DEFINE(MTASA_VERSION_MAJOR) "." QUOTE_DEFINE(MTASA_VERSION_MINOR) #define _NETCODE_VERSION_BRANCH_ID 0x4 // Use 0x1 - 0xF to indicate an incompatible branch is being used (0x0 is reserved, 0x4 is trunk) -#define _CLIENT_NET_MODULE_VERSION 0x08D // (0x000 - 0xfff) Lvl9 wizards only +#define _CLIENT_NET_MODULE_VERSION 0x08E // (0x000 - 0xfff) Lvl9 wizards only #define _NETCODE_VERSION 0x1D8 // (0x000 - 0xfff) Increment when net messages change (pre-release) #define MTA_DM_BITSTREAM_VERSION 0x060 // (0x000 - 0xfff) Increment when net messages change (post-release). (Changing will also require additional backward compatibility code).