CMaterialModifyControl::SetMaterialVarToCurrentTime
0x006f3aa0 · 244 bytes · __cdecl
_ZN22CMaterialModifyControl27SetMaterialVarToCurrentTimeER11inputdata_t
Decompiled
undefined (1 param)
/* CMaterialModifyControl::SetMaterialVarToCurrentTime(inputdata_t&) */
void CMaterialModifyControl::SetMaterialVarToCurrentTime(inputdata_t *param_1)
{
undefined4 uVar1;
CBaseEdict *pCVar2;
int iVar3;
int in_GS_OFFSET;
char local_30 [32];
int local_10;
local_10 = *(int *)(in_GS_OFFSET + 0x14);
V_snprintf(local_30,0x20,"%f",(double)*(float *)(gpGlobals + 0xc));
if (param_1[0x6c] == (inputdata_t)0x0) {
pCVar2 = *(CBaseEdict **)(param_1 + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
param_1[0x70] = (inputdata_t)((byte)param_1[0x70] | 1);
}
uVar1 = *(undefined4 *)(gpGlobals + 0xc);
*(undefined4 *)(param_1 + 0x78) = 0;
*(undefined4 *)(param_1 + 0x74) = uVar1;
V_strncpy((char *)(param_1 + 0x63e),local_30,0xff);
if (*(int *)(param_1 + 0x760) != 1) {
if (param_1[0x6c] == (inputdata_t)0x0) {
pCVar2 = *(CBaseEdict **)(param_1 + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
param_1[0x70] = (inputdata_t)((byte)param_1[0x70] | 1);
}
*(undefined4 *)(param_1 + 0x760) = 1;
}
if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.