CTerrorPlayer::DecayLineOfScrimmage
0x009f8020 · 1340 bytes · __thiscall
_ZN13CTerrorPlayer20DecayLineOfScrimmageEv
Decompiled
undefined (1 param)
/* CTerrorPlayer::DecayLineOfScrimmage() */
void __thiscall CTerrorPlayer::DecayLineOfScrimmage(CTerrorPlayer *this)
{
float fVar1;
CBaseEdict *pCVar2;
char cVar3;
int iVar4;
undefined4 uVar5;
longdouble lVar6;
float fVar7;
float fVar8;
float local_28;
float local_24;
float local_20;
float local_1c;
float local_18;
float local_14;
float local_10;
cVar3 = (**(code **)(*(int *)this + 300))(this);
if (cVar3 == '\0') {
iVar4 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
if (iVar4 == 3) {
lVar6 = (longdouble)CountdownTimer::Now();
if (*(float *)(this + 0x2c28) <= (float)lVar6) {
lVar6 = (longdouble)CountdownTimer::Now();
if ((float)lVar6 + 0.5 != *(float *)(this + 0x2c28)) {
(**(code **)(*(int *)(this + 0x2c20) + 4))(this + 0x2c20,this + 0x2c28);
*(float *)(this + 0x2c28) = (float)lVar6 + 0.5;
}
if (*(float *)(this + 0x2c24) != 0.5) {
(**(code **)(*(int *)(this + 0x2c20) + 4))(this + 0x2c20,this + 0x2c24);
*(undefined4 *)(this + 0x2c24) = 0x3f000000;
}
if (*(int *)(this + 0x2c14) == 1) {
fVar7 = 99999.9;
if (0.0 < *(float *)(this + 0x23c4)) {
lVar6 = (longdouble)IntervalTimer::Now();
fVar7 = (float)lVar6 - *(float *)(this + 0x23c4);
}
fVar7 = fVar7 - *(float *)(ZombieScrimmageCreepDelay._28_4_ + 0x2c);
if (0.0 < fVar7) {
fVar7 = fVar7 * *(float *)(ZombieScrimmageCreepRate._28_4_ + 0x2c);
if (0.0 < *(float *)(this + 0x2bc0)) {
fVar8 = *(float *)(this + 0x2bc4) - fVar7;
cVar3 = FindPotentialLineOfScrimmage
(this,true,fVar8,&local_28,(Vector *)&local_24,(QAngle *)&local_18);
if (((cVar3 != '\0') && (local_28 < *(float *)(this + 0x2bc0))) && (0.0 < fVar8)) {
*(float *)(this + 0x2bc0) = local_28;
if (((local_24 != *(float *)(this + 0x2bc8)) ||
(local_20 != *(float *)(this + 0x2bcc))) ||
(local_1c != *(float *)(this + 0x2bd0))) {
if (this[0x6c] == (CTerrorPlayer)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar4 + 2) = 0;
}
}
else {
this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
}
*(float *)(this + 0x2bc8) = local_24;
*(float *)(this + 0x2bcc) = local_20;
*(float *)(this + 0x2bd0) = local_1c;
}
if (((local_18 != *(float *)(this + 0x2bd4)) ||
(local_14 != *(float *)(this + 0x2bd8))) ||
(local_10 != *(float *)(this + 0x2bdc))) {
if (this[0x6c] == (CTerrorPlayer)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar4 + 2) = 0;
}
}
else {
this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
}
*(float *)(this + 0x2bd4) = local_18;
*(float *)(this + 0x2bd8) = local_14;
*(float *)(this + 0x2bdc) = local_10;
}
fVar1 = *(float *)(this + 0x2bc0);
uVar5 = (**(code **)(*(int *)this + 0xb8))(this);
UTIL_LogPrintf("DecayLineOfScrimmage: %s has a front line of scrimmage of %f flow (wanted %f flow)\n"
,uVar5,(double)fVar1,(double)fVar8);
UpdateYardLines(this,0.0);
}
}
if (0.0 < *(float *)(this + 0x2be0)) {
fVar7 = fVar7 + *(float *)(this + 0x2be4);
cVar3 = FindPotentialLineOfScrimmage
(this,true,fVar7,&local_28,(Vector *)&local_24,(QAngle *)&local_18);
if (((cVar3 != '\0') &&
(*(float *)(this + 0x2be0) <= local_28 && local_28 != *(float *)(this + 0x2be0)))
&& (0.0 < fVar7)) {
*(float *)(this + 0x2bc0) = local_28;
if (((local_24 != *(float *)(this + 0x2bc8)) ||
(local_20 != *(float *)(this + 0x2bcc))) ||
(local_1c != *(float *)(this + 0x2bd0))) {
if (this[0x6c] == (CTerrorPlayer)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar4 + 2) = 0;
}
}
else {
this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
}
*(float *)(this + 0x2bc8) = local_24;
*(float *)(this + 0x2bcc) = local_20;
*(float *)(this + 0x2bd0) = local_1c;
}
if (((local_18 != *(float *)(this + 0x2bd4)) ||
(local_14 != *(float *)(this + 0x2bd8))) ||
(local_10 != *(float *)(this + 0x2bdc))) {
if (this[0x6c] == (CTerrorPlayer)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar4 + 2) = 0;
}
}
else {
this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
}
*(float *)(this + 0x2bd4) = local_18;
*(float *)(this + 0x2bd8) = local_14;
*(float *)(this + 0x2bdc) = local_10;
}
fVar8 = *(float *)(this + 0x2be0);
uVar5 = (**(code **)(*(int *)this + 0xb8))(this);
UTIL_LogPrintf("DecayLineOfScrimmage: %s has a rear line of scrimmage of %f flow (wanted %f flow)\n"
,uVar5,(double)fVar8,(double)fVar7);
}
}
}
}
}
}
}
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.