![]() |
Hi I'm new and have some question !
Hi , I am new here ! I have some question , but before that , I introduced myself , I am a bot CODER , but I DON'T MAKE BOTS ! I just code ! I love PODbot , and I am develop it , I have some question , can u help me ? ???:(
1.)the bomb plant and defuse issues , I can't seem to fix it 2.)the new bot use the kicked bot's stats 3.)they always stuck on their teammate 4.)sometimes they jump 2 times at a wpt then they move to another and jump 2 times there , so they just keep jumping in the round 5.)terrible aiming when eney was near ! *I found this code Code:
//STEVE: instantly adjust aim if reticle near enemy target *the original PODbot aiming algo Code:
edict_t *pEdict = pBot->pEdict; |
Re: Hi I'm new and have some question !
Quote:
Quote:
Quote:
Code:
if (BotEnt->pvPrivateData != NULL) Quote:
Quote:
Quote:
Quote:
Quote:
|
Re: Hi I'm new and have some question !
The queston 4 mean that they jump 2 two times at a waypoint , then they go to another waypoint and jump 2 times there , then they move to another waypoint and jump two times there ....... until the round end ...
And I am not a bot maker mean I only research the bot code! |
Re: Hi I'm new and have some question !
Quote:
This happens also between different bots at the same server. I use joebot and yapbot at the same time and if I kick a bot of one kind and add a bot of the other kind the new bot inherites the old values... I haven't looked very deep into the bots codes but the only reason for this could be that those values are stored outside the bots own data structures. And if the bots are compiled as metamod plugins something in conjunction with metamod prevents those external data structures from been cleared correctly... |
Re: Hi I'm new and have some question !
Yes, those values (player stats) belong to the player entities' private data ; and the HL engine does not free the player's private data for not needing to reallocate it later. It's normally up to the client, when he inheritates of this player structure, to tell the engine to zap all the contents of the private data, but since bots are not real clients, we have to empty this private data somehow. Calling FREE_PRIVATE() will force the engine to reallocate a new block of data, and to zero it out. Actually the point is not to make it free or release this data, the point is to tell it to zero it out.
I have never seen this code fail on every bot where I put it to work, be it metamod or not. |
Re: Hi I'm new and have some question !
Than this is really strange.
I added this lines to joebot's source code too but the bots still inherit the old data... |
Re: Hi I'm new and have some question !
Quote:
|
Re: Hi I'm new and have some question !
I don't think so... remember (3)COLORS wasn't even able to understand a single line of C code ; and the snippets of code PBlover has posted are all very relevant to his problem(s).
@Terran: post the changes you made to JoeBot's source code (accompanied by a dozen lines above and below as a context...) |
Re: Hi I'm new and have some question !
I did nothing special just added the lines you mentioned above...
bot.cpp: Code:
if (IS_DEDICATED_SERVER()) |
Re: Hi I'm new and have some question !
This is not for metamod, right ? The code you posted can't work properly as a metamod plugin. You need to use the CALL_GAME_ENTITY() macro instead of the player() class function.
|
All times are GMT +2. The time now is 22:51. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.