CVomitJarProjectile::ExplodeVomit
0x00579440 · 1864 bytes · __cdecl
_ZN19CVomitJarProjectile12ExplodeVomitE6VectorS0_
Decompiled
undefined (2 params)
/* CVomitJarProjectile::ExplodeVomit(Vector, Vector) */
void CVomitJarProjectile::ExplodeVomit
(CBaseGrenade *param_1,float param_2,float param_3,float param_4,float param_5,
float param_6,float param_7)
{
float fVar1;
code *pcVar2;
char cVar3;
undefined4 uVar4;
CBaseEntity *pCVar5;
CBaseEntity *this;
int iVar6;
float *pfVar7;
int *piVar8;
int *piVar9;
NextBotManager *this_00;
longdouble lVar10;
int local_908;
float local_8fc;
float local_8f8;
float local_8f4;
CTraceFilterSimple local_8f0 [16];
Vector local_8e0 [12];
undefined4 local_8d4;
undefined4 local_8d0;
undefined4 local_8cc;
int local_894;
undefined4 local_88c;
undefined4 local_888;
undefined4 local_884;
undefined4 local_880;
undefined4 local_87c;
undefined4 local_878;
undefined4 local_874;
undefined4 local_870;
undefined4 local_86c;
undefined4 local_868;
undefined4 local_864;
undefined4 local_860;
undefined4 local_85c;
int local_858;
undefined4 local_854;
undefined4 local_850;
undefined4 local_84c;
undefined4 local_848;
undefined2 local_844;
undefined4 local_840;
undefined4 local_83c;
undefined4 local_838;
undefined1 local_834;
undefined1 local_833;
float local_82c;
float local_828;
float local_824;
undefined4 local_820;
float local_81c;
float local_818;
float local_814;
undefined4 local_80c;
undefined4 local_808;
undefined4 local_804;
undefined4 local_7fc;
undefined4 local_7f8;
undefined4 local_7f4;
undefined4 local_7ec;
undefined1 local_7e8;
undefined1 local_7e7;
local_8fc = param_2;
local_8f8 = param_3;
local_8f4 = param_4 + 1.0;
for (iVar6 = IPredictionSystem::g_pPredictionSystems; iVar6 != 0; iVar6 = *(int *)(iVar6 + 4)) {
*(int *)(iVar6 + 0x10) = *(int *)(iVar6 + 0x10) + 1;
}
local_7e8 = 1;
local_82c = param_5 + param_5 + param_2;
local_7f4 = 0;
local_828 = param_6 + param_6 + param_3;
local_7f8 = 0;
local_81c = param_2 - local_82c;
local_7fc = 0;
local_818 = param_3 - local_828;
local_7ec = 0;
local_824 = param_7 + param_7 + param_4;
local_804 = 0;
local_814 = param_4 - local_824;
local_808 = 0;
local_80c = 0;
local_7e7 = local_818 * local_818 + local_81c * local_81c + local_814 * local_814 != 0.0;
/* try { // try from 0057959c to 00579a61 has its CatchHandler @ 00579bce */
CTraceFilterSimple::CTraceFilterSimple
(local_8f0,(IHandleEntity *)0x0,0,(_func_bool_IHandleEntity_ptr_int *)0x0);
(**(code **)(*enginetrace + 0x14))
(enginetrace,(CEntitySphereQuery *)&local_82c,0x200400b,local_8f0,local_8e0);
if (*(int *)(r_visualizetraces._28_4_ + 0x30) != 0) {
DebugDrawLine(local_8e0,(Vector *)&local_8d4,0xff,0,0,true,-1.0);
}
UTIL_BloodDecalTrace((CGameTrace *)local_8e0,0);
local_834 = 0;
local_880 = 0;
local_87c = 0;
local_88c = local_8d4;
local_878 = 0;
local_888 = local_8d0;
local_874 = 0;
local_870 = 0;
local_868 = 0;
local_864 = 0;
local_860 = 0;
local_85c = 0;
local_854 = 0x3f800000;
local_848 = 0;
local_844 = 0;
local_84c = 0;
local_840 = 0;
local_83c = 0;
local_838 = 0;
local_833 = 0;
local_884 = local_8cc;
local_86c = 0x3f800000;
if ((local_894 == 0) || (*(int *)(local_894 + 0x30) == 0)) {
local_858 = 0;
}
else {
local_858 = *(int *)(local_894 + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
}
local_850 = 0x41a00000;
DispatchEffect("csblood",(CEffectData *)&local_88c);
DispatchParticleEffect
("vomit_jar",local_8d4,local_8d0,local_8cc,local_8d4,local_8d0,local_8cc,vec3_angle,
DAT_01053d40,DAT_01053d44,0,0,0xffffffff);
cVar3 = CTerrorGameRules::IsCurrentRoundActive(g_pGameRules);
/* try { // try from 00579b50 to 00579bab has its CatchHandler @ 00579bce */
if ((cVar3 == '\0') && (cVar3 = CTerrorGameRules::IsSurvivalMode(), cVar3 != '\0')) {
iVar6 = IPredictionSystem::g_pPredictionSystems;
if (IPredictionSystem::g_pPredictionSystems != 0) {
do {
*(int *)(iVar6 + 0x10) = *(int *)(iVar6 + 0x10) + -1;
piVar8 = (int *)(iVar6 + 4);
iVar6 = *piVar8;
} while (*piVar8 != 0);
return;
}
}
else {
fVar1 = *(float *)(vomitjar_radius_survivors._28_4_ + 0x2c);
CEntitySphereQuery::CEntitySphereQuery
((CEntitySphereQuery *)&local_82c,(Vector *)&local_8fc,
*(float *)(vomitjar_radius._28_4_ + 0x2c),0);
local_908 = 0;
while (pCVar5 = (CBaseEntity *)
CEntitySphereQuery::GetCurrentEntity((CEntitySphereQuery *)&local_82c),
pCVar5 != (CBaseEntity *)0x0) {
this = (CBaseEntity *)(**(code **)(*(int *)pCVar5 + 0x144))(pCVar5);
if (this != (CBaseEntity *)0x0) {
iVar6 = CBaseEntity::GetTeamNumber(this);
cVar3 = IsASurvivorTeam(iVar6);
if ((cVar3 == '\0') ||
(pfVar7 = (float *)(**(code **)(*(int *)this + 0x288))(this),
(local_8f8 - pfVar7[1]) * (local_8f8 - pfVar7[1]) +
(local_8fc - *pfVar7) * (local_8fc - *pfVar7) +
(local_8f4 - pfVar7[2]) * (local_8f4 - pfVar7[2]) <= fVar1 * fVar1)) {
if ((this[0x105] != (CBaseEntity)0x0) &&
(lVar10 = (longdouble)
CCSGameRules::GetAmountOfEntityVisible
((CCSGameRules *)g_pGameRules,(Vector *)&local_8fc,pCVar5),
0.0 < (float)lVar10)) {
local_908 = local_908 + 1;
pcVar2 = *(code **)(*(int *)this + 0x54c);
uVar4 = CBaseGrenade::GetThrower(param_1);
(*pcVar2)(this,uVar4);
}
iVar6 = CBaseEntity::GetTeamNumber(this);
if ((((iVar6 == 3) && (iVar6 = (**(code **)(*(int *)this + 0x544))(this), iVar6 == 8)) &&
(cVar3 = (**(code **)(*(int *)this + 0x16c))(this), cVar3 != '\0')) &&
(cVar3 = (**(code **)(*(int *)this + 0x7e8))(this), cVar3 == '\0')) {
piVar8 = (int *)(**(code **)(*gameeventmanager + 0x1c))
(gameeventmanager,"vomit_bomb_tank",0,0);
piVar9 = (int *)CBaseGrenade::GetThrower(param_1);
if (((piVar9 != (int *)0x0) &&
(cVar3 = (**(code **)(*piVar9 + 0x16c))(piVar9), cVar3 != '\0')) &&
(piVar8 != (int *)0x0)) {
pcVar2 = *(code **)(*piVar8 + 0x30);
uVar4 = (**(code **)(*engine + 0x40))(engine,piVar9[0xc]);
(*pcVar2)(piVar8,"userid",uVar4);
(**(code **)(*gameeventmanager + 0x20))(gameeventmanager,piVar8,0);
}
}
}
}
local_82c = (float)((int)local_82c + 1);
}
if (local_908 == 0) {
this_00 = (NextBotManager *)TheNextBots();
NextBotManager::OnCharacterVomitedUpon(this_00,(CBaseCombatCharacter *)0x0);
}
pCVar5 = (CBaseEntity *)CreateEntityByName("info_goal_infected_chase",-1,true);
iVar6 = IPredictionSystem::g_pPredictionSystems;
if (pCVar5 != (CBaseEntity *)0x0) {
/* try { // try from 00579a77 to 00579b22 has its CatchHandler @ 00579bb1 */
DispatchSpawn(pCVar5,true);
(**(code **)(*(int *)pCVar5 + 0x1dc))(pCVar5,&local_8fc,&vec3_angle,&vec3_origin);
local_82c = 0.0;
local_820 = 0xffffffff;
local_81c = 0.0;
(**(code **)(*(int *)pCVar5 + 0xb4))
(pCVar5,"Enable",param_1,param_1,(CEntitySphereQuery *)&local_82c,0);
CEventQueue::AddEvent
((CEventQueue *)g_EventQueue,pCVar5,"kill",20.0,(CBaseEntity *)0x0,
(CBaseEntity *)0x0,0);
iVar6 = IPredictionSystem::g_pPredictionSystems;
}
for (; iVar6 != 0; iVar6 = *(int *)(iVar6 + 4)) {
*(int *)(iVar6 + 0x10) = *(int *)(iVar6 + 0x10) + -1;
}
}
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.