rcbot_const_mstr_offset needs updating? |
rcbot_const_mstr_offset needs updating? |
JRob |
Aug 26 2015, 12:52 AM
Post
#1
|
Advanced Member Group: Members Posts: 52 Joined: 30-April 11 Member No.: 1,970 |
I tried playing around with rcbot again and it keeps crashing at
CTeamControlPointRound *CTeamControlPointMaster:: getCurrentRound () CBaseEntity *pent = m_ControlPointRounds[m_iCurrentRoundIndex]; So I took a look at what that was and apparently, CTeamControlPointRound is found through dark hackery and the magic number at rcbot_const_mstr_offset. Can you update this? Or also tell people how to find these offsets? |
Nightc0re |
Aug 29 2015, 12:52 PM
Post
#2
|
Advanced Member Group: Moderator Posts: 58 Joined: 10-July 15 From: Austria Member No.: 2,397 |
Surely there's an automatic way to find these offsets? Or an easier way to get the data you need from this entity? It seems horrible that after each update, we have to load up dustbowl and HOPE that nothing else happens early in the structure happens to be 3. This was my approach some weeks ago, but Cheeseh is using a different approach. Look here. Side note to Cheeseh: You are not using this variable, was this intended? CODE unsigned long full_size = sizeof(pMasterEntity); |
JRob |
Aug 29 2015, 09:17 PM
Post
#3
|
Advanced Member Group: Members Posts: 52 Joined: 30-April 11 Member No.: 1,970 |
This was my approach some weeks ago, but Cheeseh is using a different approach. Look here. Side note to Cheeseh: You are not using this variable, was this intended? CODE unsigned long full_size = sizeof(pMasterEntity); He's not doing anything new here, he is adding a magic number to the CBaseEntity pointer. He isn't even using sizeof(CBaseEntity). Is this even guaranteed to be the right number? The hl2sdk has some definitions for it, but the TF2 code can obviously diverge from the SDK because it was never made for people to mod TF2. If the TF2 team wants to add some extra stuff to CBaseEntity, it won't show up on the hl2sdk unless the people at AlliedMods reverse engineers it. And from what I see, they don't depend on CBaseEntity. That's why the linux magic number increased. They might have added stuff or maybe changed compiler flags so the offset was increased. |
Lo-Fi Version | Time is now: 30th June 2024 - 06:01 AM |