CDirectorScriptedEventManager::UpdateGauntlet
0x008b6400 · 926 bytes · __thiscall
_ZN29CDirectorScriptedEventManager14UpdateGauntletEv
Decompiled
undefined (1 param)
/* CDirectorScriptedEventManager::UpdateGauntlet() */
void __thiscall CDirectorScriptedEventManager::UpdateGauntlet(CDirectorScriptedEventManager *this)
{
CDirector *pCVar1;
float fVar2;
undefined4 uVar3;
CDirector *pCVar4;
longdouble lVar5;
longdouble lVar6;
pCVar1 = TheDirector;
uVar3 = DirectorPrivate_DirectorGauntletMovementThreshold._28_4_;
if (*(int *)this == 1) {
if (*(float *)(this + 0x9c) <= *(float *)(TheDirector + 0x24c) &&
*(float *)(TheDirector + 0x24c) != *(float *)(this + 0x9c)) {
*(undefined4 *)(this + 0xa0) = 0;
fVar2 = *(float *)(pCVar1 + 0x24c);
lVar5 = (longdouble)
CDirector::GetScriptValue(pCVar1,"GauntletMovementThreshold",*(float *)(uVar3 + 0x2c))
;
uVar3 = DirectorPrivate_DirectorGauntletMovementTimerLength._28_4_;
*(float *)(this + 0x9c) = (float)lVar5 + fVar2;
lVar5 = (longdouble)
CDirector::GetScriptValue
(TheDirector,"GauntletMovementTimerLength",*(float *)(uVar3 + 0x2c));
fVar2 = (float)lVar5;
lVar5 = (longdouble)CountdownTimer::Now();
if ((float)lVar5 + fVar2 != *(float *)(this + 0xac)) {
(**(code **)(*(int *)(this + 0xa4) + 4))(this + 0xa4,this + 0xac);
*(float *)(this + 0xac) = (float)lVar5 + fVar2;
}
if (fVar2 != *(float *)(this + 0xa8)) {
(**(code **)(*(int *)(this + 0xa4) + 4))(this + 0xa4,this + 0xa8);
*(float *)(this + 0xa8) = fVar2;
}
if (*(float *)(this + 0xb8) != -1.0) {
(**(code **)(*(int *)(this + 0xb0) + 4))(this + 0xb0,this + 0xb8);
*(undefined4 *)(this + 0xb8) = 0xbf800000;
}
pCVar4 = TheDirector;
pCVar1 = TheDirector + 0x294;
lVar5 = (longdouble)CountdownTimer::Now();
if ((float)lVar5 + 1.0 != *(float *)(pCVar4 + 0x29c)) {
(**(code **)(*(int *)(pCVar4 + 0x294) + 4))(pCVar1,pCVar4 + 0x29c);
*(float *)(pCVar4 + 0x29c) = (float)lVar5 + 1.0;
}
if (*(float *)(pCVar4 + 0x298) != 1.0) {
(**(code **)(*(int *)(pCVar4 + 0x294) + 4))(pCVar1,pCVar4 + 0x298);
*(undefined4 *)(pCVar4 + 0x298) = 0x3f800000;
}
}
lVar5 = (longdouble)CountdownTimer::Now();
if (*(float *)(this + 0xac) <= (float)lVar5) {
lVar5 = (longdouble)
CDirector::GetScriptValue
(TheDirector,"GauntletMovementTimerLength",
*(float *)(DirectorPrivate_DirectorGauntletMovementTimerLength._28_4_ +
0x2c));
fVar2 = (float)lVar5;
lVar5 = (longdouble)CountdownTimer::Now();
if ((float)lVar5 + fVar2 != *(float *)(this + 0xac)) {
(**(code **)(*(int *)(this + 0xa4) + 4))(this + 0xa4,this + 0xac);
*(float *)(this + 0xac) = (float)lVar5 + fVar2;
}
if (fVar2 != *(float *)(this + 0xa8)) {
(**(code **)(*(int *)(this + 0xa4) + 4))(this + 0xa4,this + 0xa8);
*(float *)(this + 0xa8) = fVar2;
}
lVar5 = (longdouble)
CDirector::GetScriptValue
(TheDirector,"GauntletMovementBonus",
*(float *)(DirectorPrivate_DirectorGauntletMovementBonus._28_4_ + 0x2c));
uVar3 = DirectorPrivate_DirectorGauntletMovementBonusMax._28_4_;
fVar2 = *(float *)(this + 0xa0);
*(float *)(this + 0xa0) = (float)lVar5 + fVar2;
lVar6 = (longdouble)
CDirector::GetScriptValue
(TheDirector,"GauntletMovementBonusMax",*(float *)(uVar3 + 0x2c));
if ((float)lVar6 < (float)lVar5 + fVar2) {
lVar5 = (longdouble)
CDirector::GetScriptValue
(TheDirector,"GauntletMovementBonusMax",
*(float *)(DirectorPrivate_DirectorGauntletMovementBonusMax._28_4_ + 0x2c
));
*(float *)(this + 0xa0) = (float)lVar5;
}
}
}
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.