CRopeKeyframe::Create
0x00808200 · 388 bytes · __cdecl
_ZN13CRopeKeyframe6CreateEP11CBaseEntityS1_iiiPKciS3_
Decompiled
undefined (8 params)
/* CRopeKeyframe::Create(CBaseEntity*, CBaseEntity*, int, int, int, char const*, int, char const*)
*/
CRopeKeyframe *
CRopeKeyframe::Create
(CBaseEntity *param_1,CBaseEntity *param_2,int param_3,int param_4,int param_5,
char *param_6,int param_7,char *param_8)
{
CBaseEdict *pCVar1;
CRopeKeyframe *this;
int iVar2;
int iVar3;
uint uVar4;
undefined4 local_20 [4];
this = (CRopeKeyframe *)CreateEntityByName(param_8,-1,true);
if (this == (CRopeKeyframe *)0x0) {
this = (CRopeKeyframe *)0x0;
}
else {
SetStartPoint(this,param_1,param_3);
SetEndPoint(this,param_2,param_4);
this[0x478] = (CRopeKeyframe)0x0;
uVar4 = *(uint *)(this + 0x444) & 0xffffffbf;
if (*(uint *)(this + 0x444) != uVar4) {
if (this[0x6c] == (CRopeKeyframe)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar2 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar2 + 2) = 0;
}
}
else {
this[0x70] = (CRopeKeyframe)((byte)this[0x70] | 1);
}
*(uint *)(this + 0x444) = uVar4;
}
(**(code **)(*(int *)this + 0x328))(this);
AllocPooledString((char *)local_20);
*(undefined4 *)(this + 0x460) = local_20[0];
if ((float)param_5 != *(float *)(this + 0x450)) {
if (this[0x6c] == (CRopeKeyframe)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar2 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar2 + 2) = 0;
}
}
else {
this[0x70] = (CRopeKeyframe)((byte)this[0x70] | 1);
}
*(float *)(this + 0x450) = (float)param_5;
}
iVar2 = 2;
if (1 < param_7) {
iVar2 = param_7;
}
iVar3 = 10;
if (iVar2 < 0xb) {
iVar3 = iVar2;
}
if (*(int *)(this + 0x458) != iVar3) {
if (this[0x6c] == (CRopeKeyframe)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar2 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar2 + 2) = 0;
}
}
else {
this[0x70] = (CRopeKeyframe)((byte)this[0x70] | 1);
}
*(int *)(this + 0x458) = iVar3;
}
(**(code **)(*(int *)this + 100))(this,param_6);
}
return this;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)
Just a Signatures{} block, ready to drop into a gamedata
file. Wire it up in your plugin however you like - SDKCall, DHooks,
raw memory ops, or anything else.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.