Quote:
Originally Posted by Pierre-Marie Baty
I don't think that's the reason.
@Krush: HOW did you try that ?
|
I ended up fixing the crash. What I did was giving each bot a id like STEAM_0:0:0000001 that was going up. But the prob was for some reason everytime const char *pfnGetPlayerAuthId (edict_t *e) was called the id would do something weird and go STEAM_0:0:00000011 and keep adding up til it was so damn big the game didn't know what to do and it would crash the server. So I decided maybe for now I should hard code alist of ids for the bots just til I did a better way. Only prob is now it was crashing on map change if anybots were left on the server.
So I just removed them entirely and made it be BOT. The reason I"m trying to give them fake STEAM IDs is I want killing of them to count towards psychostats.
Let me explain what I think could be done:
void ServerActivate (edict_t *pEdictList, int edictCount, int clientMax)
in there where it's reading the BotNames.txt we could have the line directly under the name be it's Steam ID and shove that into an array. Just like botnames. My only issue is if there are multiple bots on the server when it tries to get the AuthID for a kill or something how do we retreive the ID from that array. Just assume the array is char* szBotIDs[100][32] like the botnames. I've tried doing something with hardcoding in steamIDs for the anmes I have in my BotNames and it worked fine for setting them up at the start but after that everytime it wanted a botid it got the last one it sent in. So I made a function CheckNameID where it just did a compare to find the name of the bot and then set the value we give to the output in the AuthID function to the right value. Only prob with that is getting it to update enough for it to always be right. But like I said I ran out of ideas and just made it BOT for now until someone has an idea.