Re: MCommandParameterString
I had the same Fucking problem, the problem is this:
When the command is sended the deconstructors for all the MCommandParameter classes are called and all are at vftable+0xC or something like that, this use the original mcommandparameter classes from gunz and all the mcommandparamter deconstructors(~String,~Int,~Vector,etc) are at vftable+0xC but when you try to recreate all the mcommandparameter classes, all of vftable are in the same place like the originals, except the String deconstructor, just that fucking function :grr:
Now I guess I fixed it hooking ClearParam (this is where all the deconstructors are called) and calling to OUR deconstructors will fix it.
Code:
CSIMPLEDETOUR_NOARGS( MCommand__ClearParam, MCommand )
{
for( int i = 0; i != pInstance->m_pCommandParams.size(); i++ )
{
delete pInstance->m_pCommandParams[i];
}
pInstance->m_pCommandParams.clear();
}
sorry if my englich is weirdo.
Re: MCommandParameterString
Thank you for your suggestion, but I don't think it get's called like that.
I was wondering why I was experiencing the same crash, so I tested;
Code:
CDetour MCommandClearParamDet;
void MCommandClearParamHook( )
{
MessageBoxA( NULL, "MCommand::ClearParam", "", MB_OK );
MCommandClearParamDet.Org( );
}
It never gets called.
Edit- Lol, the only time it got called was when Gunz was closing.
Re: MCommandParameterString
Yeah, I've been experiencing this problem too, annoys me.
Also, ClearParam gets called after posting any command, it gets called at the server select screen. (request server status info)
Re: MCommandParameterString
Quote:
Originally Posted by
Linear88
Yeah, I've been experiencing this problem too, annoys me.
Also, ClearParam gets called after posting any command, it gets called at the server select screen. (request server status info)
Odd, ClearParam was only called after I closed Gunz.
Re: MCommandParameterString
virtual function table
nevermind
I don't get the same problem.
Re: MCommandParameterString
Code:
struct MCommandParameter
{
void* operator new( size_t nSize )
{
return ( ( void*( __cdecl* )( int ) )0x00607EBE )( nSize );
}
Herp derp
Re: MCommandParameterString