CModelRender::SnapCurrentLightingState
0x00186ed0 · 192 bytes · __thiscall
_ZN12CModelRender24SnapCurrentLightingStateERNS_15ModelInstance_tEP15LightingState_t
Decompiled
undefined (3 params)
/* CModelRender::SnapCurrentLightingState(CModelRender::ModelInstance_t&, LightingState_t*) */
void __thiscall
CModelRender::SnapCurrentLightingState
(CModelRender *this,ModelInstance_t *param_1,LightingState_t *param_2)
{
int iVar1;
ModelInstance_t *pMVar2;
ModelInstance_t *pMVar3;
LightingState_t *pLVar4;
int iVar5;
pMVar2 = param_1 + 0xc;
pLVar4 = param_2;
do {
pMVar3 = pMVar2 + 0xc;
*(undefined4 *)pMVar2 = *(undefined4 *)pLVar4;
*(undefined4 *)(pMVar2 + 4) = *(undefined4 *)(pLVar4 + 4);
*(undefined4 *)(pMVar2 + 8) = *(undefined4 *)(pLVar4 + 8);
pMVar2 = pMVar3;
pLVar4 = pLVar4 + 0xc;
} while (pMVar3 != param_1 + 0x54);
iVar5 = 0;
*(undefined4 *)(param_1 + 0x54) = *(undefined4 *)(param_2 + 0x48);
*(undefined4 *)(param_1 + 0x58) = *(undefined4 *)(param_2 + 0x4c);
*(undefined4 *)(param_1 + 0x5c) = *(undefined4 *)(param_2 + 0x50);
*(undefined4 *)(param_1 + 0x60) = *(undefined4 *)(param_2 + 0x54);
*(undefined4 *)(param_1 + 100) = *(undefined4 *)(param_2 + 0x58);
do {
if (iVar5 < *(int *)(param_2 + 0x48)) {
iVar1 = *(int *)(param_2 + iVar5 * 4 + 0x4c);
*(undefined4 *)(param_1 + 0xc4) = *(undefined4 *)(iVar1 + 0xc);
*(undefined4 *)(param_1 + 200) = *(undefined4 *)(iVar1 + 0x10);
*(undefined4 *)(param_1 + 0xcc) = *(undefined4 *)(iVar1 + 0x14);
}
else {
*(undefined4 *)(param_1 + 0xc4) = 0;
*(undefined4 *)(param_1 + 200) = 0;
*(undefined4 *)(param_1 + 0xcc) = 0;
}
iVar5 = iVar5 + 1;
param_1 = param_1 + 0xc;
} while (iVar5 != 4);
return;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
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.
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.