CDirector::GetScriptValue
0x0087d530 · 370 bytes · __cdecl
_ZN9CDirector14GetScriptValueEPKc6Vector
Decompiled
undefined (2 params)
/* CDirector::GetScriptValue(char const*, Vector) */
undefined4 *
CDirector::GetScriptValue
(undefined4 *param_1,int param_2,undefined4 param_3,undefined4 param_4,undefined4 param_5,
undefined4 param_6)
{
char cVar1;
int iVar2;
char *pcVar3;
char *local_28 [2];
ushort local_20;
ushort local_1e;
if ((*(int *)(param_2 + 0x4b8) == -1) || (g_pScriptVM == (int *)0x0)) goto LAB_0087d5d6;
local_28[0] = (char *)0x0;
local_1e = 0;
local_20 = 0;
/* try { // try from 0087d581 to 0087d671 has its CatchHandler @ 0087d6ae */
cVar1 = (**(code **)(*g_pScriptVM + 0x90))(g_pScriptVM,*(int *)(param_2 + 0x4b8),param_3,local_28)
;
if (cVar1 != '\0') {
if (local_20 == 3) {
LAB_0087d5ab:
param_4 = *(undefined4 *)local_28[0];
param_5 = *(undefined4 *)(local_28[0] + 4);
param_6 = *(undefined4 *)(local_28[0] + 8);
}
else {
if ((short)local_20 < 4) {
if (local_20 == 0) goto LAB_0087d60d;
LAB_0087d650:
pcVar3 = "unknown_variant_type";
if (local_20 < 0x29) {
pcVar3 = *(char **)(CSWTCH_3966 + (uint)local_20 * 4);
}
Warning("No free conversion of %s variant to Vector right now\n",pcVar3);
}
else {
if (local_20 != 0x1f) {
if (local_20 != 0x28) goto LAB_0087d650;
goto LAB_0087d5ab;
}
iVar2 = sscanf(local_28[0],"%f %f %f",¶m_4,¶m_5,¶m_6);
if (iVar2 == 3) goto joined_r0x0087d5d4;
LAB_0087d60d:
param_4 = vec3_origin;
param_5 = DAT_01053d4c;
param_6 = DAT_01053d50;
}
(**(code **)(*g_pScriptVM + 0x9c))(g_pScriptVM,local_28);
}
}
joined_r0x0087d5d4:
if ((local_1e & 1) != 0) {
free(local_28[0]);
}
LAB_0087d5d6:
*param_1 = param_4;
param_1[1] = param_5;
param_1[2] = param_6;
return param_1;
}
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.