CVomitJarProjectile::Create
0x005791a0 · 620 bytes · __cdecl
_ZN19CVomitJarProjectile6CreateERK6VectorRK6QAngleS2_S2_P20CBaseCombatCharacter
Decompiled
undefined (5 params)
/* CVomitJarProjectile::Create(Vector const&, QAngle const&, Vector const&, Vector const&,
CBaseCombatCharacter*) */
CBaseCSGrenadeProjectile *
CVomitJarProjectile::Create
(Vector *param_1,QAngle *param_2,Vector *param_3,Vector *param_4,
CBaseCombatCharacter *param_5)
{
code *pcVar1;
CBaseEdict *pCVar2;
CBaseCSGrenadeProjectile *this;
undefined4 uVar3;
int iVar4;
undefined1 local_24 [20];
this = (CBaseCSGrenadeProjectile *)
CBaseEntity::Create("vomitjar_projectile",param_1,param_2,(CBaseEntity *)param_5);
UTIL_LogPrintf("VomitJar projectile spawned at %f %f %f, velocity %f %f %f\n",
(double)*(float *)param_1,(double)*(float *)(param_1 + 4),
(double)*(float *)(param_1 + 8),(double)*(float *)param_3,
(double)*(float *)(param_3 + 4),(double)*(float *)(param_3 + 8));
CBaseCSGrenadeProjectile::SetDetonateTimerLength(this,1.5);
CBaseEntity::SetAbsVelocity((CBaseEntity *)this,param_3);
CBaseCSGrenadeProjectile::SetupInitialTransmittedGrenadeVelocity(this,param_3);
CBaseGrenade::SetThrower((CBaseGrenade *)this,param_5);
*(undefined4 *)(this + 0x2c0) = 0x3ecccccd;
CBaseEntity::SetFriction((CBaseEntity *)this,0.2);
if (*(float *)(this + 0x2c8) != 0.45) {
if (this[0x6c] == (CBaseCSGrenadeProjectile)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] = (CBaseCSGrenadeProjectile)((byte)this[0x70] | 1);
}
*(undefined4 *)(this + 0x2c8) = 0x3ee66666;
}
*(undefined4 *)(this + 0xd8) = 0x569;
*(undefined4 *)(this + 0xdc) = 0;
CBaseEntity::ThinkSet((_func_void *)local_24,(float)this,(char *)DetonateThink);
CBaseEntity::SetNextThink((CBaseEntity *)this,*(float *)(gpGlobals + 0xc) + 2.0,(char *)0x0);
if (*(float *)(this + 0x1a50) != 200.0) {
if (this[0x6c] == (CBaseCSGrenadeProjectile)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] = (CBaseCSGrenadeProjectile)((byte)this[0x70] | 1);
}
*(undefined4 *)(this + 0x1a50) = 0x43480000;
}
if (*(float *)(this + 0x1a44) != 300.0) {
if (this[0x6c] == (CBaseCSGrenadeProjectile)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar4 + 2) = 0;
}
*(undefined4 *)(this + 0x1a44) = 0x43960000;
}
else {
this[0x70] = (CBaseCSGrenadeProjectile)((byte)this[0x70] | 1);
*(undefined4 *)(this + 0x1a44) = 0x43960000;
}
}
pcVar1 = *(code **)(*(int *)this + 0x194);
uVar3 = CBaseEntity::GetTeamNumber((CBaseEntity *)param_5);
(*pcVar1)(this,uVar3);
CBaseEntity::ApplyLocalAngularVelocityImpulse((CBaseEntity *)this,param_4);
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.