CTankRock::Create
0x004de060 · 499 bytes · __cdecl
_ZN9CTankRock6CreateERK6VectorRK6QAngleS2_P20CBaseCombatCharacter
Decompiled
undefined (4 params)
/* CTankRock::Create(Vector const&, QAngle const&, Vector const&, CBaseCombatCharacter*) */
CBaseEntity *
CTankRock::Create(Vector *param_1,QAngle *param_2,Vector *param_3,CBaseCombatCharacter *param_4)
{
code *pcVar1;
CBaseEdict *pCVar2;
CBaseEntity *this;
undefined4 uVar3;
int iVar4;
this = (CBaseEntity *)CBaseEntity::Create("tank_rock",param_1,param_2,(CBaseEntity *)param_4);
CBaseEntity::SetAbsVelocity(this,param_3);
CBaseCSGrenadeProjectile::SetupInitialTransmittedGrenadeVelocity
((CBaseCSGrenadeProjectile *)this,param_3);
CBaseGrenade::SetThrower((CBaseGrenade *)this,param_4);
*(undefined4 *)(this + 0x2c0) = 0x3f0ccccd;
CBaseEntity::SetFriction(this,0.7);
if (*(float *)(this + 0x1a50) != 100.0) {
if (this[0x6c] == (CBaseEntity)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar4 + 2) = 0;
}
}
else {
this[0x70] = (CBaseEntity)((byte)this[0x70] | 1);
}
*(undefined4 *)(this + 0x1a50) = 0x42c80000;
}
pcVar1 = *(code **)(*(int *)this + 0x194);
uVar3 = 0;
if (param_4 != (CBaseCombatCharacter *)0x0) {
uVar3 = CBaseEntity::GetTeamNumber((CBaseEntity *)param_4);
}
(*pcVar1)(this,uVar3);
*(undefined4 *)(this + 0xd8) = 0x569;
*(undefined4 *)(this + 0xdc) = 0;
*(undefined4 *)(this + 0x2c0) = 0x3ecccccd;
CBaseEntity::SetFriction(this,0.2);
if (*(float *)(this + 0x2c8) != 0.45) {
if (this[0x6c] == (CBaseEntity)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar4 + 2) = 0;
}
*(undefined4 *)(this + 0x2c8) = 0x3ee66666;
}
else {
this[0x70] = (CBaseEntity)((byte)this[0x70] | 1);
*(undefined4 *)(this + 0x2c8) = 0x3ee66666;
}
}
CBaseEntity::FollowEntity(this,(CBaseEntity *)param_4,true);
this[0x1a74] = (CBaseEntity)0x0;
CCollisionProperty::SetSolid((CCollisionProperty *)(this + 0x194),0);
*(undefined4 *)(this + 0xd8) = 0;
*(undefined4 *)(this + 0xdc) = 0;
CBaseEntity::SetMoveType(this,0,0);
*(undefined4 *)(this + 0x1a78) = *(undefined4 *)param_1;
*(undefined4 *)(this + 0x1a7c) = *(undefined4 *)(param_1 + 4);
*(undefined4 *)(this + 0x1a80) = *(undefined4 *)(param_1 + 8);
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.