IPB

Welcome Guest ( Log In | Register )

> rcbot_const_mstr_offset needs updating?
JRob
post 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?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
 
Reply to this topicStart new topic
Replies
Nightc0re
post Aug 29 2015, 12:52 PM
Post #2


Advanced Member
***

Group: Moderator
Posts: 58
Joined: 10-July 15
From: Austria
Member No.: 2,397



QUOTE(JRob @ Aug 27 2015, 09:02 PM) *

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);

User is offlineProfile CardPM
Go to the top of the page
+Quote Post
JRob
post Aug 29 2015, 09:17 PM
Post #3


Advanced Member
***

Group: Members
Posts: 52
Joined: 30-April 11
Member No.: 1,970



QUOTE(Nightc0re @ Aug 29 2015, 12:52 PM) *

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.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 19th April 2024 - 03:08 AM