CTerrorPlayer::Vocalize
0x009f7700 · 611 bytes · __thiscall
_ZN13CTerrorPlayer8VocalizeEPKcff
Decompiled
undefined (4 params)
/* CTerrorPlayer::Vocalize(char const*, float, float) */
void __thiscall
CTerrorPlayer::Vocalize(CTerrorPlayer *this,char *param_1,float param_2,float param_3)
{
float fVar1;
longdouble lVar2;
float local_20;
float local_10;
if (param_2 < 0.0) {
CBaseEntity::EmitSound((CBaseEntity *)this,param_1,0.0,(float *)0x0);
}
else if (param_2 <= 0.0) {
local_10 = 0.0;
CBaseEntity::EmitSound((CBaseEntity *)this,param_1,0.0,&local_10);
if (param_2 <= local_10) {
param_2 = local_10;
}
local_20 = param_2 + 0.2;
lVar2 = (longdouble)CountdownTimer::Now();
if ((float)lVar2 + local_20 != *(float *)(this + 0x30a0)) {
(**(code **)(*(int *)(this + 0x3098) + 4))(this + 0x3098,this + 0x30a0);
*(float *)(this + 0x30a0) = (float)lVar2 + local_20;
}
if (local_20 != *(float *)(this + 0x309c)) {
(**(code **)(*(int *)(this + 0x3098) + 4))(this + 0x3098,this + 0x309c);
*(float *)(this + 0x309c) = local_20;
}
}
else {
CBaseEntity::EmitSound((CBaseEntity *)this,param_1,0.0,(float *)0x0);
lVar2 = (longdouble)CountdownTimer::Now();
if ((float)lVar2 + param_2 == *(float *)(this + 0x30a0)) {
fVar1 = *(float *)(this + 0x309c);
}
else {
(**(code **)(*(int *)(this + 0x3098) + 4))(this + 0x3098,this + 0x30a0);
fVar1 = *(float *)(this + 0x309c);
*(float *)(this + 0x30a0) = (float)lVar2 + param_2;
}
if (param_2 != fVar1) {
(**(code **)(*(int *)(this + 0x3098) + 4))(this + 0x3098,this + 0x309c);
*(float *)(this + 0x309c) = param_2;
}
}
if (0.0 < param_3) {
if (((byte)this[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
CSoundEnt::InsertSound
(8,(Vector *)(this + 0x2e0),0x800,param_3,(CBaseEntity *)this,10,(CBaseEntity *)0x0);
}
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.