Skip to content

Commit 71515c3

Browse files
committed
Updated crash logging
Conflicts: MTA10/version.h
1 parent b7bbde6 commit 71515c3

File tree

4 files changed

+36
-2
lines changed

4 files changed

+36
-2
lines changed

MTA10/core/CCrashDumpWriter.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,10 @@ void CCrashDumpWriter::DumpMiniDump ( _EXCEPTION_POINTERS* pException, CExceptio
511511
CCore::GetSingleton().SaveConfig();
512512
AddReportLog( 9205, "Disabled volumetric shadows" );
513513
}
514+
515+
CNet* pNet = CCore::GetSingleton().GetNetwork();
516+
if ( pNet )
517+
pNet->PostCrash();
514518
}
515519

516520

MTA10/multiplayer_sa/CMultiplayerSA_CrashFixHacks.cpp

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1134,6 +1134,23 @@ void _declspec(naked) HOOK_CClumpModelInfo_GetFrameFromId ()
11341134
}
11351135

11361136

1137+
struct CStreamingInfo
1138+
{
1139+
DWORD gta_hash;
1140+
WORD chain_next;
1141+
uchar flg;
1142+
uchar archiveId;
1143+
DWORD offsetInBlocks;
1144+
DWORD sizeInBlocks;
1145+
DWORD reqload;
1146+
};
1147+
1148+
CStreamingInfo* GetStreamingInfoFromModelId( uint id )
1149+
{
1150+
CStreamingInfo* pItemInfo = (CStreamingInfo*)(0x8E4CC0);
1151+
return pItemInfo + id;
1152+
}
1153+
11371154
//////////////////////////////////////////////////////////////////////////////////////////
11381155
//
11391156
// CEntity::GetBoundRect
@@ -1160,7 +1177,19 @@ void OnMY_CEntity_GetBoundRect( CEntitySAInterface* pEntity )
11601177
if ( !pColModel )
11611178
{
11621179
// Crash will occur at offset 00134134
1163-
LogEvent( 815, "Model collision missing", "CEntity_GetBoundRect", SString( "No collision for model:%d", usModelId ), 5415 );
1180+
CStreamingInfo* pStreamingInfo = GetStreamingInfoFromModelId( usModelId );
1181+
SString strDetails( "refs:%d txd:%d RwObj:%08x bOwn:%d bColStr:%d flg:%d off:%d size:%d reqload:%d"
1182+
,pModelInfo->usNumberOfRefs
1183+
,pModelInfo->usTextureDictionary
1184+
,pModelInfo->pRwObject
1185+
,pModelInfo->bDoWeOwnTheColModel
1186+
,pModelInfo->bCollisionWasStreamedWithModel
1187+
,pStreamingInfo->flg
1188+
,pStreamingInfo->offsetInBlocks
1189+
,pStreamingInfo->sizeInBlocks
1190+
,pStreamingInfo->reqload
1191+
);
1192+
LogEvent( 815, "Model collision missing", "CEntity_GetBoundRect", SString( "No collision for model:%d %s", usModelId, *strDetails ), 5415 );
11641193
CArgMap argMap;
11651194
argMap.Set( "id", usModelId );
11661195
argMap.Set( "reason", "collision" );

MTA10/sdk/net/CNet.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ class CNet
126126
virtual CBinaryFileInterface* AllocateBinaryFile ( void ) = 0;
127127
virtual bool EncryptDumpfile ( const char* szClearPathFilename, const char* szEncryptedPathFilename ) = 0;
128128
virtual bool DecryptScript ( const char* cpInBuffer, uint uiInSize, const char** pcpOutBuffer, uint* puiOutSize, const char* szScriptName ) = 0;
129+
virtual void PostCrash ( void ) = 0;
129130
};
130131

131132
#endif

MTA10/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575

7676
#define _ASE_VERSION QUOTE_DEFINE(MTASA_VERSION_MAJOR) "." QUOTE_DEFINE(MTASA_VERSION_MINOR)
7777
#define _NETCODE_VERSION_BRANCH_ID 0x4 // Use 0x1 - 0xF to indicate an incompatible branch is being used (0x0 is reserved, 0x4 is trunk)
78-
#define _CLIENT_NET_MODULE_VERSION 0x08D // (0x000 - 0xfff) Lvl9 wizards only
78+
#define _CLIENT_NET_MODULE_VERSION 0x08E // (0x000 - 0xfff) Lvl9 wizards only
7979
#define _NETCODE_VERSION 0x1D8 // (0x000 - 0xfff) Increment when net messages change (pre-release)
8080
#define MTA_DM_BITSTREAM_VERSION 0x060 // (0x000 - 0xfff) Increment when net messages change (post-release). (Changing will also require additional backward compatibility code).
8181

0 commit comments

Comments
 (0)