Note: This thread is only for people with knowledge of finding offsets - if you're just a regular user, skip this one. 
As you might have noticed, instead of hardcoded cgame offsets, eth32 is coming with an offsets.ini file which contains functions for all cgame offsets eth32 uses.
This is by no means how-to-find offsets used in eth32 tutorial, but just a help to understand what are names in offsets.ini refering to, eventhough most of them are self explanatory (if not all of them), but posting this to avoid confusion. 
Code:
[CG-0xFFDDA6C7]
modname=etmain
modversion=2.55
modtype=0
refdef=0x352C064
refdefViewAngles=0x352C210
pmext=0x3534844
commands=0x85E60
numCommands=0x41
predictedPS=0x352AF40
centityBase=0x358B6E0
centitySize=0xA74
centCurrentState=0x0
centLerpOrigin=0x710
clientInfoBase=0x1ABCC30
clientInfoSize=0x174
cliInfoValid=0x0
cliName=0x8
cliTeam=0x48
cliHealth=0x5C
cliClass=0x6C
CG_Player=0x45BB0
CG_AddPlayerWeapon=0x5DDA0
CG_SetLerpFrameAnimationRate=0x450D0
CG_FinishWeaponChange=0x60620
CG_PlayVoiceChat=0x4D550
CG_EntityEvent=0x2C4D0
CG_Trace=0x49680
CG_DamageFeedback=0x47D80
CG_WeaponFireRecoil=0x61B00
CG_Respawn=0x48100
CG_CalculateReinfTime=0x1B690
CG_AllocLocalEntity=0x38C00
CG_PositionRotatedEntityOnTag=0x25A40
CG_AddPMItem=0x48C60
CG_AddPMItem2=0x0
CG_DrawPlayerStatusHead=0x20C50
CG_DrawPlayerStats=0x21790
CG_DrawPlayerStatus=0x20E60
CG_CenterPrint=0x1B1E0
CG_PriorityCenterPrint=0x1B2C0
CG_ChargeTimesChanged=0x4CD90
BG_FindClipForWeapon=0x3740
BG_FindAmmoForWeapon=0x3780
CG_CalcViewValues=0x58790
Offsets from CG_Player to CG_CalcViewValues are function offsets and all are self-explanatory since they're all using same names in ET sdk.
Note: CG_AddPMItem2 is just CG_AddPMItem (there is no CG_AddPMItem2) in SDK, it's just how we named jaymod version which is using an extra argument. For other mods, set CG_AddPMItem to the offset you found, and CG_AddPMItem2 set to 0x0. For jaymod do it the other way around.
Now about other offsets, will explain one by one:
refdef - cg.refdef
refdefViewAngles - cg.refdefViewAngles
pmext - cg.pmext
commands - 'commands' array (cg_consolecmds.c)
numCommands - sizeof(commands) / sizeof(consoleCommand_t)
predictedPS - cg.predictedPlayerState
centityBase - cg_entities
centitySize - sizeof(centity_t)
centCurrentState - centity.currentState (relative to centity_t)
centLerpOrigin - centity.lerpOrigin (relative to centity_t)
clientInfoBase - cgs.clientinfo
clientInfoSize - sizeof(clientInfo_t)
cliInfoValid - clientInfo.infoValid (relative to clientInfo_t)
cliName - clientInfo.name (relative to clientInfo_t)
cliTeam - clientInfo.team (relative to clientInfo_t)
cliHealth - clientInfo.health (relative to clientInfo_t)
cliClass - clientInfo.cls (relative to clientInfo_t)
Non-offset stuff:
modname - mod name (string, i.e. etpro)
modversion - mod version (string, i.e. 3.2.6)
modtype - mod type (integer, i.e. 3)
modtype integer list:
Code:
#define MOD_ETMAIN 0
#define MOD_ETPUB 1
#define MOD_JAYMOD1 2
#define MOD_JAYMOD2 3
#define MOD_NOQUARTER 4
#define MOD_ETPRO 5
#define MOD_TCE 6
And last, but not least, ini section name. Example:
Just replace 0x12345678 with crc32 of cgame_mp_x86.dll
Note: If a new etpro is released, don't bother adding support on your own because it requires some more coding than just adding the mod to offsets.ini
Bookmarks