Vocalizer::TryToWarnAboutSpecial
0x00a09750 · 1068 bytes · __thiscall
_ZN9Vocalizer21TryToWarnAboutSpecialEP20CBaseCombatCharacter
Decompiled
undefined (2 params)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* Vocalizer::TryToWarnAboutSpecial(CBaseCombatCharacter*) */
undefined4 __thiscall
Vocalizer::TryToWarnAboutSpecial(Vocalizer *this,CBaseCombatCharacter *param_1)
{
int iVar1;
float fVar2;
char cVar3;
Infected *pIVar4;
Infected *pIVar5;
int iVar6;
undefined4 uVar7;
undefined4 *puVar8;
undefined4 uVar9;
char *pcVar10;
int in_GS_OFFSET;
longdouble lVar11;
Infected *pIVar12;
undefined4 local_130;
int local_12c;
undefined4 local_128;
char local_124;
char local_120 [256];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
if (param_1 == (CBaseCombatCharacter *)0x0) {
pIVar12 = (Infected *)0x0;
cVar3 = (**(code **)(_DAT_00000000 + 0x16c))(0);
if (cVar3 != '\0') {
pIVar12 = (Infected *)0x0;
cVar3 = (**(code **)(_DAT_00000000 + 0x16c))(0);
if (cVar3 != '\0') {
pIVar4 = (Infected *)0x0;
goto LAB_00a09973;
}
}
}
else {
pIVar4 = (Infected *)
__dynamic_cast(param_1,&CBaseCombatCharacter::typeinfo,&Infected::typeinfo,0);
pIVar12 = (Infected *)param_1;
cVar3 = (**(code **)(*(int *)param_1 + 0x16c))(param_1);
if ((cVar3 == '\0') ||
(pIVar12 = (Infected *)param_1, cVar3 = (**(code **)(*(int *)param_1 + 0x16c))(param_1),
cVar3 == '\0')) {
pIVar5 = (Infected *)0x0;
if (pIVar4 != (Infected *)0x0) {
LAB_00a097ba:
if (pIVar4 == (Infected *)0x0) {
iVar6 = (**(code **)(*(int *)pIVar5 + 0x544))(pIVar5);
pIVar12 = pIVar5;
}
else {
pIVar12 = pIVar4;
iVar6 = (**(code **)(*(int *)pIVar4 + 0x544))(pIVar4);
}
if (iVar6 == 0) {
pIVar12 = pIVar4;
uVar7 = Infected::IsUncommonCommon(pIVar4);
if ((char)uVar7 != '\0') {
local_12c = CBaseEntity::GetGender((CBaseEntity *)pIVar4);
pIVar12 = (Infected *)&local_12c;
/* try { // try from 00a099c9 to 00a099cd has its CatchHandler @ 00a09b55 */
pcVar10 = (char *)UncommonGenderToString(pIVar12);
if (*pcVar10 != '\0') {
local_128 = *(undefined4 *)(param_1 + 0x1a38);
local_124 = '\0';
local_12c = 0;
ForEachTerrorPlayer<SpecialSpottedScan>((SpecialSpottedScan *)&local_12c);
pcVar10 = "PlayerAlsoWarnSpecial";
if (local_124 == '\0') {
pcVar10 = "PlayerWarnSpecial";
}
local_130 = CBaseEntity::GetGender((CBaseEntity *)pIVar4);
uVar9 = UncommonGenderToString((gender_t *)&local_130);
V_snprintf(local_120,0x100,"SpecialType:%s",uVar9);
pIVar12 = (Infected *)this;
cVar3 = Say(this,pcVar10,1,local_120);
if (cVar3 != '\0') {
pIVar4 = (Infected *)(this + 0x3c);
pIVar12 = pIVar4;
lVar11 = (longdouble)IntervalTimer::Now();
if ((float)lVar11 != *(float *)(this + 0x40)) {
(**(code **)(*(int *)(this + 0x3c) + 4))(pIVar4,this + 0x40);
*(float *)(this + 0x40) = (float)lVar11;
pIVar12 = pIVar4;
}
*(undefined4 *)(this + 0x84) = *(undefined4 *)(param_1 + 0x1a38);
}
goto LAB_00a09942;
}
}
}
else if (*(int *)(this + iVar6 * 4 + 0x84) != *(int *)(param_1 + 0x1a38)) {
fVar2 = *(float *)(MinSpecialWarnInterval._28_4_ + 0x2c);
iVar1 = iVar6 * 8;
pIVar4 = (Infected *)(this + iVar1 + 0x3c);
pIVar12 = pIVar4;
lVar11 = (longdouble)IntervalTimer::Now();
if (fVar2 < (float)lVar11 - *(float *)(this + iVar1 + 0x40)) {
local_128 = *(undefined4 *)(param_1 + 0x1a38);
local_124 = '\0';
local_12c = iVar6;
ForEachTerrorPlayer<SpecialSpottedScan>((SpecialSpottedScan *)&local_12c);
pcVar10 = "PlayerAlsoWarnSpecial";
if (local_124 == '\0') {
pcVar10 = "PlayerWarnSpecial";
}
uVar7 = ZombieClassName(iVar6);
V_snprintf(local_120,0x100,"SpecialType:%s",uVar7);
uVar7 = TheTutor();
cVar3 = Tutor::GiveBossInfectedLesson(uVar7,iVar6,param_1);
if ((cVar3 != '\0') ||
(pIVar12 = (Infected *)this, cVar3 = Say(this,pcVar10,1,local_120), cVar3 != '\0')) {
pIVar12 = pIVar4;
lVar11 = (longdouble)IntervalTimer::Now();
if ((float)lVar11 != *(float *)(this + iVar1 + 0x40)) {
(**(code **)(*(int *)(this + iVar1 + 0x3c) + 4))(pIVar4,this + iVar1 + 0x40);
*(float *)(this + iVar1 + 0x40) = (float)lVar11;
pIVar12 = pIVar4;
}
*(undefined4 *)(this + iVar6 * 4 + 0x84) = *(undefined4 *)(param_1 + 0x1a38);
if (iVar6 == 7) {
puVar8 = (undefined4 *)(**(code **)(*(int *)param_1 + 0xc))(param_1);
*(undefined4 *)(this + 0xf0) = *puVar8;
pIVar12 = (Infected *)param_1;
}
}
uVar7 = 1;
goto LAB_00a09942;
}
}
}
}
else {
LAB_00a09973:
pIVar12 = (Infected *)param_1;
cVar3 = (**(code **)(*(int *)param_1 + 0x7e8))(param_1);
if ((cVar3 == '\0') &&
(pIVar12 = (Infected *)param_1, cVar3 = (**(code **)(*(int *)param_1 + 0x558))(param_1),
pIVar5 = (Infected *)param_1, cVar3 == '\0')) goto LAB_00a097ba;
}
}
uVar7 = 0;
LAB_00a09942:
if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail(pIVar12);
}
return uVar7;
}
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.