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? |
JRob |
Sep 11 2015, 10:55 PM
Post
#2
|
Advanced Member Group: Members Posts: 52 Joined: 30-April 11 Member No.: 1,970 |
Any update on this? I am starting to add it myself.
I noticed that you ripped out the sig scanning code from sourcemod, but you removed the symbol resolving code. It looks like you have some parts of it, but it doesn't work. You can easily get this functionality with just 3 files. https://github.com/alliedmodders/sourcemod/...MemoryUtils.cpp https://github.com/alliedmodders/sourcemod/...k/MemoryUtils.h https://github.com/alliedmodders/sourcemod/...k/sm_symtable.h You need to edit MemoryUtils.h and remove "using namespace SourceMod" and add #if defined __linux__ #define PLATFORM_LINUX #endif And done... CODE MemoryUtils* sigscan = new MemoryUtils; void* server = dlopen("tf/bin/server_srv.so", RTLD_LAZY); dlclose(server); #ifdef __linux__ char* CTeamControlPointMaster_Spawn = (char*)sigscan->ResolveSymbol(server, "_ZN23CTeamControlPointMaster5SpawnEv"); #endif if(CTeamControlPointMaster_Spawn) { int CBaseEntityLength = *(int*)(CTeamControlPointMaster_Spawn + 0x1A) - sizeof(CUtlMap<int, CBaseEntity *>); rcbot_const_point_master_offset.SetValue(CBaseEntityLength); } |
Lo-Fi Version | Time is now: 21st September 2024 - 06:17 AM |