core/smn_usermsgs.cpp
changeset 1766 d30c252089be
parent 1541 e46ad208b9b4
child 1871 a152bfe8634b
     1.1 --- a/core/smn_usermsgs.cpp	Wed Dec 05 15:38:45 2007 +0000
     1.2 +++ b/core/smn_usermsgs.cpp	Wed Dec 05 18:07:18 2007 +0000
     1.3 @@ -57,6 +57,7 @@
     1.4  	void OnSourceModAllInitialized();
     1.5  	void OnSourceModShutdown();
     1.6  	void OnHandleDestroy(HandleType_t type, void *object);
     1.7 +	bool GetHandleApproxSize(HandleType_t type, void *object, unsigned int *pSize);
     1.8  	void OnPluginUnloaded(IPlugin *plugin);
     1.9  public:
    1.10  	MsgListenerWrapper *CreateListener(IPluginContext *pCtx);
    1.11 @@ -109,6 +110,15 @@
    1.12  {
    1.13  }
    1.14  
    1.15 +bool UsrMessageNatives::GetHandleApproxSize(HandleType_t type, void *object, unsigned int *pSize)
    1.16 +{
    1.17 +	bf_read *pRead = (bf_read *)object;
    1.18 +
    1.19 +	*pSize = sizeof(bf_read) + pRead->GetNumBytesRead() + pRead->GetNumBytesLeft();
    1.20 +
    1.21 +	return true;
    1.22 +}
    1.23 +
    1.24  void UsrMessageNatives::OnPluginUnloaded(IPlugin *plugin)
    1.25  {
    1.26  	MsgWrapperList *pList;