CTerrorPlayer::OnStunned
0x009a62c0 · 732 bytes · __thiscall
_ZN13CTerrorPlayer9OnStunnedEf
Decompiled
undefined (2 params)
/* CTerrorPlayer::OnStunned(float) */
void __thiscall CTerrorPlayer::OnStunned(CTerrorPlayer *this,float param_1)
{
float fVar1;
uint uVar2;
CTerrorPlayer *this_00;
int iVar3;
int *piVar4;
undefined *puVar5;
longdouble lVar6;
iVar3 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
if (iVar3 == 3) {
iVar3 = (**(code **)(*(int *)this + 0x544))(this);
if ((iVar3 == 2) && (*(float *)(this + 0x1aa4) != 0.0)) {
(**(code **)(*(int *)(this + 0x1a40) + 4))(this + 0x1a40,this + 0x1aa4);
*(undefined4 *)(this + 0x1aa4) = 0;
}
}
lVar6 = (longdouble)CountdownTimer::Now();
if (*(float *)(this + 0x32e8) <= (float)lVar6) {
lVar6 = (longdouble)CountdownTimer::Now();
if ((float)lVar6 + param_1 != *(float *)(this + 0x32dc)) {
(**(code **)(*(int *)(this + 0x32d4) + 4))(this + 0x32d4,this + 0x32dc);
*(float *)(this + 0x32dc) = (float)lVar6 + param_1;
}
if (param_1 != *(float *)(this + 0x32d8)) {
(**(code **)(*(int *)(this + 0x32d4) + 4))(this + 0x32d4,this + 0x32d8);
*(float *)(this + 0x32d8) = param_1;
}
uVar2 = *(uint *)(this + 0x30bc);
if ((((uVar2 != 0xffffffff) &&
(puVar5 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar5 + 8) == uVar2 >> 0xc)) &&
(piVar4 = *(int **)(puVar5 + 4), piVar4 != (int *)0x0)) {
(**(code **)(*piVar4 + 900))(piVar4,param_1);
}
piVar4 = (int *)CBaseCombatCharacter::GetActiveWeapon((CBaseCombatCharacter *)this);
if (piVar4 != (int *)0x0) {
(**(code **)(*piVar4 + 0x69c))(piVar4,param_1);
}
}
fVar1 = *(float *)(SurvivorStunImmunityDuration._28_4_ + 0x2c);
lVar6 = (longdouble)CountdownTimer::Now();
if ((float)lVar6 + fVar1 != *(float *)(this + 0x32e8)) {
(**(code **)(*(int *)(this + 0x32e0) + 4))(this + 0x32e0,this + 0x32e8);
*(float *)(this + 0x32e8) = (float)lVar6 + fVar1;
}
if (fVar1 != *(float *)(this + 0x32e4)) {
(**(code **)(*(int *)(this + 0x32e0) + 4))(this + 0x32e0,this + 0x32e4);
*(float *)(this + 0x32e4) = fVar1;
}
OnPounceEnded(this);
uVar2 = *(uint *)(this + 0x33c0);
if (((uVar2 != 0xffffffff) &&
(puVar5 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
((*(uint *)(puVar5 + 8) == uVar2 >> 0xc &&
(this_00 = *(CTerrorPlayer **)(puVar5 + 4), this_00 != (CTerrorPlayer *)0x0)))) {
AbilityDebug(this_00,this_00,"Tongue letting go on getting bashed.");
}
ReleaseTongueVictim(this,false);
OnRideEnded(this,(CTerrorPlayer *)0x0);
CBasePlayer::RumbleEffect((CBasePlayer *)this,' ','\0','\x04');
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.