Some signatures for 25th Anniversary Edition (Dec 02 2023)
Important:
This post and all signatures are for Counter-Strike and Zero Condition. I have never play another GoldSrc engine game and not did I tested on them! It seems like Valve changed some compilation flags such that almost all signatures are dead and so are my piles of Orpheu plugins. So while migrating my projects into C++ form, I would like to share some commonly used function signatures. All of the following signatures are for C++ project, one may convert them for Orpheu. '\x2A' means "any 1 byte value". It should convert to "*" if you are using Orpheu. All of my signatures have a displacement of 1, as in Orpheu terminology. This means that for the address retrieved, one would need to add precisely one byte of displacement on top of it. hw.dll Fetch the build number. Code:
int __cdecl BuildNumber(void); Get the game rule object from its return value. (g_pGameRules) Code:
CGameRules *__cdecl InstallGameRules(void); Code:
void __cdecl RadiusFlash(Vector vecSrc, entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage); Code:
void __thiscall SelectItem(CBasePlayer *pThis, const char *pszItemName); Code:
void __thiscall SetAnimation(CBasePlayer *pPlayer, PLAYER_ANIM playerAnim); Code:
void __cdecl AddMultiDamage(entvars_t *pevInflictor, CBaseEntity *pEntity, float flDamage, int bitsDamageType) Code:
void __cdecl ApplyMultiDamage(entvars_t *pevInflictor, entvars_t *pevAttacker); Code:
void __cdecl ClearMultiDamage(void); The last parameter may have been an actual C++ bool type, but the alignment force every argument to be at list the length of sizeof(void*) Code:
qboolean __thiscall DefaultDeploy(CBasePlayerWeapon *pThis, const char *szViewModel, const char *szWeaponModel, int iAnim, const char *szAnimExt, qboolean skiplocal); Code:
qboolean __thiscall SwitchWeapon(CBasePlayer *pThis, CBasePlayerItem *pWeapon) Code:
void __thiscall FireBullets(CBaseEntity *pThis, unsigned long cShots, Vector vecSrc, Vector vecDirShooting, Vector vecSpread, float flDistance, int iBulletType, int iTracerFreq, int iDamage, entvars_t *pevAttacker); Check the function prototype CAREFULLY here. It returns a C++ type, exceeding the size of void*, therefore it is treated differently after compilation. The first parameter is this as usual. The second parameter represents edx register in your CPU. The third parameter is your return value address. The supposedly returned object is created in advance by the caller of the function. So should you if you are calling it. Pass nullptr into edx if one is calling, and make sure edx was passed on if one is hooking and forwarding the original function. Code:
using fnFireBullets3_t = Vector *(__fastcall *)(CBaseEntity *pThis, void* edx, Vector* pret, Vector vecSrc, Vector vecDirShooting, float flSpread, float flDistance, int iPenetration, int iBulletType, int iDamage, float flRangeModifier, entvars_t *pevAttacker, qboolean bPistol, int shared_rand); |
Re: Some signatures for 25th Anniversary Edition (Dec 02 2023)
It is curious that especially the variable contains the name of anniversary, it seems that they did it intentionally to break the competition, as for example rehlds is no longer compatible with this update.
|
Re: Some signatures for 25th Anniversary Edition (Dec 02 2023)
Quote:
I gave all the patterns names as I just took them from my project. Because I planned to continue supporting the old engine (build #8684), I have to keep the old patterns. Hence I just conveniently named the new signatures ANNIV. I did the reverse engineering under Windows, and I have no idea what the Linux version says about anything here. |
Re: Some signatures for 25th Anniversary Edition (Dec 02 2023)
we will have to investigate what the hell the valve geniuses did, and provide support for what was already mentioned above.
|
All times are GMT -4. The time now is 21:49. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.