Re: Re: [hlcoders] creating a source bot plugin
I want to do it from first principles. So it was a pointer problem and that's sorted. Now that's working but after calling a method using that process, I get an access violation as soon as I try and call a method on the m_BotInterface attribute (set by calling botmanager->GetBotController( botEdict ) when the bot is created). Any ideas? I guess going through the vtable is messing something up? On Sun, 5 May 2019 at 18:35, wrote: > Why don’t you just use the remade headers in AlliedCoders/hl2sdk on GitHub > for the game of your choice, then you don’t need all this manual > vtable/offset rubbish? > > > > Would be a lot easier if that’s possible. > >- Josh > > > > *From: *Tom Schumann > *Sent: *05 May 2019 07:48 > *To: *hlcoders > *Subject: *Re: [hlcoders] creating a source bot plugin > > > > Excuse the late reply - this is what I'm doing: > > // get this > > void **ppThis = *(void ***)&(this->pObject); > > // get the vtable as an array of void * > > void **ppVTable = *(void ***)(this->pObject); > > // the method we want is in the vtable > > void *pMethod = ppVTable[this->m_EyePositionOffset]; > > > > this->pObject is the CBaseEntity * - I'm thinking maybe I should do > *this->pObject because maybe I'm just getting the address of the attribute? > > > > On Mon, 3 Sep 2018 at 20:01, Asher Baker wrote: > > On Mon, Sep 3, 2018 at 7:09 AM Joël Troch wrote: > > Maybe the offsets are invalid/obsolete, you could try 2 things: > > - The second would be to fork the GitHub project you mentioned and apply a > few changes so that it loads the engine and server binaries from the repo > instead of AlliedModders's servers. This is what I've done for Zombie > Panic! Source 3.0 to support SourceMod. Check my fork if needed. > > > > There is no need to do that, as the instructions say at the top you can > just drag-and-drop any binary to the page, the buttons are just for > convenience (they're from SourceMod's automatic gamedata checker, so always > current within a few minutes of an update). > > > > Regards, > > Asher > > ___ > To unsubscribe, edit your list preferences, or view the list archives, > please visit: > https://list.valvesoftware.com/ > > ___ > To unsubscribe, edit your list preferences, or view the list archives, > please visit: > https://list.valvesoftware.com/ > > > > ___ > To unsubscribe, edit your list preferences, or view the list archives, > please visit: > https://list.valvesoftware.com/ > ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: https://list.valvesoftware.com/
RE: Re: [hlcoders] creating a source bot plugin
Why don’t you just use the remade headers in AlliedCoders/hl2sdk on GitHub for the game of your choice, then you don’t need all this manual vtable/offset rubbish? Would be a lot easier if that’s possible.Josh From: Tom SchumannSent: 05 May 2019 07:48To: hlcodersSubject: Re: [hlcoders] creating a source bot plugin Excuse the late reply - this is what I'm doing: // get this void **ppThis = *(void ***)&(this->pObject); // get the vtable as an array of void * void **ppVTable = *(void ***)(this->pObject); // the method we want is in the vtable void *pMethod = ppVTable[this->m_EyePositionOffset]; this->pObject is the CBaseEntity * - I'm thinking maybe I should do *this->pObject because maybe I'm just getting the address of the attribute? On Mon, 3 Sep 2018 at 20:01, Asher Bakerwrote:On Mon, Sep 3, 2018 at 7:09 AM Joël Troch wrote:Maybe the offsets are invalid/obsolete, you could try 2 things:- The second would be to fork the GitHub project you mentioned and apply a few changes so that it loads the engine and server binaries from the repo instead of AlliedModders's servers. This is what I've done for Zombie Panic! Source 3.0 to support SourceMod. Check my fork if needed. There is no need to do that, as the instructions say at the top you can just drag-and-drop any binary to the page, the buttons are just for convenience (they're from SourceMod's automatic gamedata checker, so always current within a few minutes of an update). Regards,Asher___To unsubscribe, edit your list preferences, or view the list archives,please visit:https://list.valvesoftware.com/___To unsubscribe, edit your list preferences, or view the list archives,please visit:https://list.valvesoftware.com/ ___To unsubscribe, edit your list preferences, or view the list archives,please visit:https://list.valvesoftware.com/
Re: [hlcoders] creating a source bot plugin
Excuse the late reply - this is what I'm doing: // get this void **ppThis = *(void ***)&(this->pObject); // get the vtable as an array of void * void **ppVTable = *(void ***)(this->pObject); // the method we want is in the vtable void *pMethod = ppVTable[this->m_EyePositionOffset]; this->pObject is the CBaseEntity * - I'm thinking maybe I should do *this->pObject because maybe I'm just getting the address of the attribute? On Mon, 3 Sep 2018 at 20:01, Asher Baker wrote: > On Mon, Sep 3, 2018 at 7:09 AM Joël Troch wrote: > >> Maybe the offsets are invalid/obsolete, you could try 2 things: >> - The second would be to fork the GitHub project you mentioned and apply >> a few changes so that it loads the engine and server binaries from the repo >> instead of AlliedModders's servers. This is what I've done for Zombie >> Panic! Source 3.0 to support SourceMod. Check my fork if needed. >> > > There is no need to do that, as the instructions say at the top you can > just drag-and-drop any binary to the page, the buttons are just for > convenience (they're from SourceMod's automatic gamedata checker, so always > current within a few minutes of an update). > > Regards, > Asher > > ___ > To unsubscribe, edit your list preferences, or view the list archives, > please visit: > https://list.valvesoftware.com/ > ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: https://list.valvesoftware.com/