![]() |
Problem with the sounds in AMX
Ok since many people have reported that after they install E[POD]bot the AMX sounds and some menues are disabled, I start to looking for a way to fix that. So I try the old version of RACC that too load metamod and there is no problem with it, all sounds and menues are in place but when E[POD]bot load metamod the sounds and some menues are gone. So I start to think that is from the GiveFnptrsToDll() function but I can't understand where I wrong. If you can help me? Here the function :
Code:
void WINAPI GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine, globalvars_t *pGlobals ) |
Re: Problem with the sounds in AMX
I guess it's probably corresponding to some known issue with confusing AMX by bots (no stats, no admin rights, player "seen" by AMX as just kicked bot etc).
http://forums.bots-united.com/showpo...5&postcount=16 http://djeyl.net/forum/index.php?showtopic=39787 The people of AMX Dev Team know this and they are still working for the new release of AMX including this fix. sPlOrYgOn helped them in solving this problem, but still there is not any new official release of AMX since 08.2004 (when the problem has been solved). AMX Mod X team released few version of his mod and this fix has been included since the version 0.20 (currently 1.01). [EDIT] I forgot to say - there is already availiable some beta version with this bot fix, but only for linux (0.9.9b). http://djeyl.net/forum/index.php?showtopic=41122 [/EDIT] |
Re: Problem with the sounds in AMX
No, that's because you don't tie all the functions in pEngFuncsFromEngine :)
The engine interface and the game DLL interface have changed A LOT since the date when POD-bot was released. You should switch to a full metamod plugin this time. Take the step, it's worth it. |
Re: Problem with the sounds in AMX
I want to make E[POD]bot a real metamod plugin but LightNinja don't want E[POD]bot to be open source. Before a week I send again a mail to him to ask if I can publish the source but still not reply. :( But maybe there is anoder reason that LightNinja don't allow me to publish the code. When I get this code and after I start to understand it, I actually see that LightNinja is ripped a bit stuff from other bots and maybe he don't want to show that. :(:(:( I don't know but if he don't reply of my mails after 2 week I will make E[POD]bot metamod plugin and open source. ;)
Thanks for the help PMB. :) |
Re: Problem with the sounds in AMX
You can support metamod and standalone loading methods in the same dll, its alot of work but can be done...
- Export Meta_Init and set a global variable saying that we are being loaded by metamod - Modify RETURN_META and RETURN_META_VALUE macros or make your own to handle both metamod and the standalone method at the same time. Its fairly easy to do and lots of people have done it already, if I remember correctly the NeoTF team, FoxBot, TheFlipside of TFC, and I have done metamod/standalone compatible dlls. |
Re: Problem with the sounds in AMX
Quote:
I only tied 2-3 functions in the Realbot 1.0 fix, and it also works well and doesn't crash. |
Re: Problem with the sounds in AMX
You are wrong. This cannot happen in a hook DLL since it is the Hook DLL that is in charge of doing the interface exchange.
|
Re: Problem with the sounds in AMX
I think he means is:
Make a enginefuncs_t variable... memcpy the engine functions into it... variable.pfnXXX = ourhookedfunc... mod_givefnptrstodll( &variable, pGlobals ); That way should make it so you don't need to hook __every__ function. Or maybe I'm wayyyyy off? |
Re: Problem with the sounds in AMX
nah...
suppose this is what's passed in the parameter "pengfuncsFromEngine" to the bot dll: note: for simplification, let's suppose the enginefuncs_t only contains pfnFunc1, pfnFunc2, pfnFunc3: PHP Code:
then if you do this... pengfuncsFromEngine->pfnFunc1 = bot_func1; pengfuncsFromEngine->pfnFunc2 = bot_func2; pengfuncsFromEngine->pfnFunc3 = bot_func3; this will be passed into the original game dll: PHP Code:
but if you do this... pengfuncsFromEngine->pfnFunc1 = bot_func1; and leave the pfnFunc2, pfnFunc3 untouched. We'll get result like this: PHP Code:
you can just choose not to "hijack" a certain engine function in the game dll, and it will be okay. No need to "hijack" every functions. |
Re: Problem with the sounds in AMX
Thats MUCH simpler, thx for pointing that out.
|
All times are GMT +2. The time now is 12:07. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.