CMaterialModifyControl::InputStartFloatLerp
0x006f3d00 · 762 bytes · __thiscall
_ZN22CMaterialModifyControl19InputStartFloatLerpER11inputdata_t
Decompiled
undefined (2 params)
/* CMaterialModifyControl::InputStartFloatLerp(inputdata_t&) */
void __thiscall
CMaterialModifyControl::InputStartFloatLerp(CMaterialModifyControl *this,inputdata_t *param_1)
{
CMaterialModifyControl CVar1;
CBaseEdict *pCVar2;
short sVar3;
char *pcVar4;
undefined4 uVar5;
int iVar6;
undefined1 *puVar7;
int in_GS_OFFSET;
double dVar8;
double dVar9;
double dVar10;
char local_10f [255];
int local_10;
local_10 = *(int *)(in_GS_OFFSET + 0x14);
if (*(int *)(param_1 + 0x18) == 2) {
pcVar4 = "";
if (*(char **)(param_1 + 8) != (char *)0x0) {
pcVar4 = *(char **)(param_1 + 8);
}
}
else {
pcVar4 = (char *)variant_t::ToString((variant_t *)(param_1 + 8));
}
V_strncpy(local_10f,pcVar4,0xff);
pcVar4 = strtok(local_10f," ");
if ((pcVar4 != (char *)0x0) && (*pcVar4 != '\0')) {
dVar8 = strtod(pcVar4,(char **)0x0);
pcVar4 = strtok((char *)0x0," ");
if ((pcVar4 != (char *)0x0) && (*pcVar4 != '\0')) {
dVar9 = strtod(pcVar4,(char **)0x0);
pcVar4 = strtok((char *)0x0," ");
if ((pcVar4 != (char *)0x0) && (*pcVar4 != '\0')) {
dVar10 = strtod(pcVar4,(char **)0x0);
pcVar4 = strtok((char *)0x0," ");
if ((pcVar4 != (char *)0x0) && (*pcVar4 != '\0')) {
strtol(pcVar4,(char **)0x0,10);
sVar3 = (short)this;
if ((float)dVar8 != *(float *)(this + 0x754)) {
CServerNetworkProperty::NetworkStateChanged(sVar3 + 0x24);
*(float *)(this + 0x754) = (float)dVar8;
}
if ((float)dVar9 != *(float *)(this + 0x758)) {
CServerNetworkProperty::NetworkStateChanged(sVar3 + 0x24);
*(float *)(this + 0x758) = (float)dVar9;
}
if ((float)dVar10 != *(float *)(this + 0x75c)) {
CServerNetworkProperty::NetworkStateChanged(sVar3 + 0x24);
*(float *)(this + 0x75c) = (float)dVar10;
}
if (*(int *)(this + 0x760) != 3) {
if (this[0x6c] == (CMaterialModifyControl)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar6 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar6 + 2) = 0;
}
}
else {
this[0x70] = (CMaterialModifyControl)((byte)this[0x70] | 1);
}
*(undefined4 *)(this + 0x760) = 3;
}
CVar1 = this[0x750];
if (CVar1 != (CMaterialModifyControl)((byte)CVar1 ^ 1)) {
if (this[0x6c] == (CMaterialModifyControl)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar6 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar6 + 2) = 0;
}
}
else {
this[0x70] = (CMaterialModifyControl)((byte)this[0x70] | 1);
}
this[0x750] = (CMaterialModifyControl)((byte)CVar1 ^ 1);
}
goto LAB_006f3d8e;
}
}
}
}
uVar5 = CBaseEntity::GetDebugName((CBaseEntity *)this);
puVar7 = &DAT_00d539c2;
if (*(undefined1 **)(this + 0x7c) != (undefined1 *)0x0) {
puVar7 = *(undefined1 **)(this + 0x7c);
}
Warning("%s (%s) received StartFloatLerp input without correct parameters. Syntax: <Start Value> <End Value> <Transition Time> <Loop>\n<Loop> should be 1 or 0.\n"
,puVar7,uVar5);
LAB_006f3d8e:
if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.