View Single Post
Re: CSBot enable plugin
Old
  (#30)
Whistler
Summoner
 
Whistler's Avatar
 
Status: Offline
Posts: 1,499
Join Date: Feb 2004
Location: Mist Village
Default Re: CSBot enable plugin - 26-09-2011

Quote:
Originally Posted by Immortal_BLG View Post
Hello!

I seem have found the reason of crash when using plugin CSBot enable.
The reason not in a plug-in, but in a metamod. Specifically, in build 4554 valve has added in structure enginefuncs_t pointer to a new function pfnCheckParameter(). This new function is just used in mp.DLL for testing parameter "-nobots" when you create a bot. But since metamod does not pass this function in mp.DLL occurs "access violation reading location".

My solution: I just did bypass of a call of this function.

Source code is present.

New function definition:
Code:
// This function returns the launch parameter index in 'com_argv' array, 0 if nothing found. (*argument == com_argv[pfnCheckParameter()]) (Only latest steam versions has this function....)
const unsigned int (*pfnCheckParameter) (const char *const parameter, const char **const argument/* = NULL*/);	// (Example: "-nobots") (Added: 15 Jun 2009, build 4554)
WARNING: ONLY FOR WINDOWS 32 BIT!!!!

LINK

P.S. Sorry for bad english
good job

tomba2k: maybe try patching the HLSDK & metamod sources to add the new engine API as Immortal_BLG noted and recompile?

Last edited by Whistler; 26-09-2011 at 15:48..
  
Reply With Quote