CMolotovProjectile::BounceTouch
0x0054cdc0 · 405 bytes · __thiscall
_ZN18CMolotovProjectile11BounceTouchEP11CBaseEntity
Decompiled
undefined (2 params)
/* CMolotovProjectile::BounceTouch(CBaseEntity*) */
void __thiscall CMolotovProjectile::BounceTouch(CMolotovProjectile *this,CBaseEntity *param_1)
{
int *piVar1;
char cVar2;
CBaseEntity *pCVar3;
int iVar4;
int iVar5;
float local_6c;
float local_68;
undefined4 local_64;
if (((((((byte)param_1[0x1b4] & 0x28) == 0) &&
(pCVar3 = (CBaseEntity *)CBaseGrenade::GetThrower((CBaseGrenade *)this), param_1 != pCVar3))
&& (*(char **)(param_1 + 0x7c) != "func_breakable")) &&
((cVar2 = CBaseEntity::ClassMatchesComplex(param_1,"func_breakable"), cVar2 == '\0' &&
(*(char **)(param_1 + 0x7c) != "func_breakable_surf")))) &&
(cVar2 = CBaseEntity::ClassMatchesComplex(param_1,"func_breakable_surf"), cVar2 == '\0')) {
if (((*(char **)(param_1 + 0x7c) == "prop_car_alarm") ||
(cVar2 = CBaseEntity::ClassMatchesComplex(param_1,"prop_car_alarm"), cVar2 != '\0')) ||
((*(char **)(param_1 + 0x7c) == "prop_car_glass" ||
(cVar2 = CBaseEntity::ClassMatchesComplex(param_1,"prop_car_glass"), cVar2 != '\0')))) {
pCVar3 = (CBaseEntity *)CBaseGrenade::GetThrower((CBaseGrenade *)this);
CTakeDamageInfo::CTakeDamageInfo
((CTakeDamageInfo *)&local_6c,(CBaseEntity *)this,pCVar3,10.0,0,0);
(**(code **)(*(int *)param_1 + 0x124))(param_1,(CTakeDamageInfo *)&local_6c);
}
iVar4 = CBaseEntity::GetTouchTrace();
piVar1 = *(int **)(iVar4 + 0x4c);
if ((piVar1 == (int *)0x0) || (iVar5 = (**(code **)(*piVar1 + 0x144))(piVar1), iVar5 == 0)) {
if (*(float *)(iVar4 + 0x20) <= 0.0) {
if (((byte)this[0x14d] & 0x10) != 0) {
CBaseEntity::CalcAbsoluteVelocity((CBaseEntity *)this);
}
local_64 = 0xc1200000;
local_6c = *(float *)(this + 0x274) * 0.5;
local_68 = *(float *)(this + 0x278) * 0.5;
CBaseEntity::SetAbsVelocity((CBaseEntity *)this,(Vector *)&local_6c);
}
else {
(**(code **)(*(int *)this + 0x56c))(this);
}
}
}
return;
}
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.