EvaluateExpression
0x0026fc30 · 282 bytes · __cdecl
_Z18EvaluateExpressionPKcf
Decompiled
undefined (2 params)
/* EvaluateExpression(char const*, float) */
longdouble EvaluateExpression(char *param_1,float param_2)
{
char cVar1;
float local_70;
CUtlString local_6c [16];
undefined4 local_5c;
undefined4 local_58;
undefined4 local_54;
undefined4 local_50;
undefined4 local_4c;
undefined4 local_48;
undefined4 local_44;
undefined4 local_40;
undefined4 local_3c;
undefined4 local_38;
undefined4 local_34;
undefined4 local_30;
undefined4 local_2c;
undefined4 local_28;
undefined4 local_24;
CUtlString::CUtlString(local_6c,param_1);
local_5c = 0;
local_58 = 0;
local_54 = 0;
local_50 = 0;
local_4c = 0;
local_48 = 0;
local_44 = 0;
local_40 = 0;
local_3c = 0;
local_38 = 0;
local_34 = 0;
local_30 = 0;
local_2c = 0;
local_28 = 0;
local_24 = 0;
/* try { // try from 0026fcbe to 0026fcc2 has its CatchHandler @ 0026fd4a */
cVar1 = CExpressionCalculator::Evaluate((CExpressionCalculator *)local_6c,&local_70);
if (cVar1 != '\0') {
param_2 = local_70;
}
local_28 = 0;
CUtlMemory<float,int>::Purge((CUtlMemory<float,int> *)&local_34);
local_24 = local_34;
CUtlMemory<float,int>::Purge((CUtlMemory<float,int> *)&local_34);
local_3c = 0;
CUtlMemory<float,int>::Purge((CUtlMemory<float,int> *)&local_48);
local_38 = local_48;
CUtlMemory<float,int>::Purge((CUtlMemory<float,int> *)&local_48);
CUtlVector<CUtlString,CUtlMemory<CUtlString,int>>::RemoveAll
((CUtlVector<CUtlString,CUtlMemory<CUtlString,int>> *)&local_5c);
CUtlMemory<CUtlString,int>::Purge((CUtlMemory<CUtlString,int> *)&local_5c);
local_4c = local_5c;
CUtlMemory<CUtlString,int>::Purge((CUtlMemory<CUtlString,int> *)&local_5c);
CUtlMemory<unsigned_char,int>::Purge((CUtlMemory<unsigned_char,int> *)local_6c);
return (longdouble)param_2;
}
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.