CTerrorPlayer::UpdateSpeechRemarkUponWorld
0x009fb7d0 · 1048 bytes · __thiscall
_ZN13CTerrorPlayer27UpdateSpeechRemarkUponWorldEv
Decompiled
undefined (1 param)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CTerrorPlayer::UpdateSpeechRemarkUponWorld() */
undefined4 __thiscall CTerrorPlayer::UpdateSpeechRemarkUponWorld(CTerrorPlayer *this)
{
float fVar1;
CBaseEntity CVar2;
int iVar3;
code *pcVar4;
char cVar5;
ushort uVar6;
int *piVar7;
int iVar8;
undefined1 *puVar9;
undefined4 uVar10;
undefined4 *puVar11;
CBaseEntity *this_00;
float fVar12;
undefined1 auVar13 [16];
int local_40;
undefined4 local_3c;
undefined4 local_38;
CAI_Concept local_30 [8];
undefined4 local_28;
undefined4 local_24;
int local_20;
local_3c = 0;
local_38 = 0;
if (___atan2f_finite == 0) {
local_20 = 0;
}
else {
(**(code **)(___atan2f_finite + 0x50))
(___atan2f_finite,&local_3c,0,0,0,0,
"/data/src/game/server/terror/terrorplayerthinks.cpp",0x62b,
&UpdateSpeechRemarkUponWorld()::tm_fmt,"(%s)%s","Unaccounted",
"CTerrorPlayer::UpdateSpeechRemark");
local_20 = ___atan2f_finite;
}
iVar3 = _DAT_0105db00;
local_28 = local_3c;
local_24 = local_38;
/* try { // try from 009fb986 to 009fb9d4 has its CatchHandler @ 009fbc2a */
if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
(iVar8 = ThreadGetCurrentId(), iVar3 == iVar8)) {
if ((char *)*_DAT_0105d15c != "CTerrorPlayer::UpdateSpeechRemark") {
_DAT_0105d15c =
(int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xd1c344,(char *)0x1,0xbfafa1);
}
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
if (*(char *)(*(int *)(TheDirector + 0x634) + 0x28) == '\0') {
/* try { // try from 009fb895 to 009fb899 has its CatchHandler @ 009fbc09 */
piVar7 = (int *)CInfoRemarkable::GetListOfAllThatIsRemarkable();
iVar3 = *(int *)(rr_remarkable_world_entities_replay_limit._28_4_ + 0x30);
fVar1 = *(float *)(rr_remarkable_maxdist._28_4_ + 0x2c);
uVar6 = *(ushort *)(piVar7 + 3);
if (((int)(uint)uVar6 < piVar7[1]) && (uVar6 <= *(ushort *)((int)piVar7 + 0x16))) {
local_40 = (uint)uVar6 * 8;
puVar11 = (undefined4 *)(*piVar7 + local_40);
if (uVar6 == *(ushort *)(puVar11 + 1)) goto LAB_009fbacf;
LAB_009fba10:
this_00 = (CBaseEntity *)*puVar11;
if (((byte)this[0x14d] & 8) != 0) goto LAB_009fbaf0;
do {
CVar2 = this_00[0x14d];
while( true ) {
if (((byte)CVar2 & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(this_00);
}
if (((*(int *)(this_00 + 0x440) < iVar3) &&
(fVar12 = (*(float *)(this_00 + 0x2e4) - *(float *)(this + 0x2e4)) *
(*(float *)(this_00 + 0x2e4) - *(float *)(this + 0x2e4)) +
(*(float *)(this_00 + 0x2e8) - *(float *)(this + 0x2e8)) *
(*(float *)(this_00 + 0x2e8) - *(float *)(this + 0x2e8)) +
(*(float *)(this_00 + 0x2e0) - *(float *)(this + 0x2e0)) *
(*(float *)(this_00 + 0x2e0) - *(float *)(this + 0x2e0)),
fVar12 <= fVar1 * fVar1)) &&
((cVar5 = (**(code **)(*(int *)this + 0x424))(this,this_00), cVar5 != '\0' &&
(cVar5 = (**(code **)(*(int *)this + 0x42c))(this,this_00,1), cVar5 != '\0')))) {
puVar9 = *(undefined1 **)(this_00 + 0x444);
auVar13 = rsqrtss(ZEXT416((uint)fVar12),ZEXT416((uint)fVar12));
if (puVar9 == (undefined1 *)0x0) {
puVar9 = &DAT_00d539c2;
}
uVar10 = UTIL_VarArgs("Subject:%s,Distance:%f",puVar9,(double)(auVar13._0_4_ * fVar12));
pcVar4 = *(code **)(*(int *)this + 0x7b4);
CAI_Concept::CAI_Concept(local_30,"TLK_REMARK");
uVar10 = (*pcVar4)(this,local_30,0,uVar10,0,0,0);
if ((char)uVar10 != '\0') {
*(int *)(this_00 + 0x440) = *(int *)(this_00 + 0x440) + 1;
goto LAB_009fb8d2;
}
}
uVar6 = *(ushort *)(*piVar7 + 6 + local_40);
if ((piVar7[1] <= (int)(uint)uVar6) || (*(ushort *)((int)piVar7 + 0x16) < uVar6))
goto LAB_009fb8d0;
local_40 = (uint)uVar6 * 8;
puVar11 = (undefined4 *)(*piVar7 + local_40);
if (uVar6 != *(ushort *)(puVar11 + 1)) goto LAB_009fba10;
LAB_009fbacf:
if (uVar6 != *(ushort *)((int)puVar11 + 6)) goto LAB_009fb8d0;
this_00 = (CBaseEntity *)*puVar11;
if (((byte)this[0x14d] & 8) == 0) break;
LAB_009fbaf0:
/* try { // try from 009fbaf3 to 009fbbf2 has its CatchHandler @ 009fbc09 */
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
CVar2 = this_00[0x14d];
}
} while( true );
}
}
LAB_009fb8d0:
uVar10 = 0;
LAB_009fb8d2:
iVar3 = _DAT_0105db00;
if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
(iVar8 = ThreadGetCurrentId(), iVar3 == iVar8)) {
cVar5 = CVProfNode::ExitScope();
if (cVar5 != '\0') {
_DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
}
DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
}
if (local_20 != 0) {
(**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,0,0);
}
return uVar10;
}
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.