CDirectorChallengeMode::ConvertWeaponSpawn
0x008a0820 · 399 bytes · __thiscall
_ZNK22CDirectorChallengeMode18ConvertWeaponSpawnE10CSWeaponIDPci
Decompiled
undefined (4 params)
/* CDirectorChallengeMode::ConvertWeaponSpawn(CSWeaponID, char*, int) const */
CDirectorChallengeMode __thiscall
CDirectorChallengeMode::ConvertWeaponSpawn
(CDirectorChallengeMode *this,undefined4 param_2,char *param_3,int param_4)
{
CDirectorChallengeMode CVar1;
int iVar2;
int iVar3;
char *local_34 [2];
short local_2c;
ushort local_2a;
void *local_28;
undefined4 local_24;
undefined2 local_20;
ushort local_1e;
CVar1 = this[1];
if (CVar1 != (CDirectorChallengeMode)0x0) {
iVar2 = (**(code **)(*g_pScriptVM + 0x48))
(g_pScriptVM,"ConvertWeaponSpawn",*(undefined4 *)(TheDirector + 0x4b8),0);
(**(code **)(*g_pScriptVM + 0x4c))(g_pScriptVM,iVar2);
if (iVar2 != 0) {
local_2c = 0;
local_2a = 0;
local_34[0] = (char *)0x0;
/* try { // try from 008a089d to 008a08a1 has its CatchHandler @ 008a09d3 */
local_28 = (void *)WeaponIDToClassname(param_2);
iVar2 = TheDirector;
local_1e = 0;
local_20 = 0x1f;
local_24 = 0;
/* try { // try from 008a08f1 to 008a0949 has its CatchHandler @ 008a09b3 */
iVar3 = (**(code **)(*g_pScriptVM + 0x48))
(g_pScriptVM,"ConvertWeaponSpawn",*(undefined4 *)(TheDirector + 0x4b8),0);
if (iVar3 != 0) {
(**(code **)(*g_pScriptVM + 0x50))
(g_pScriptVM,iVar3,&local_28,1,local_34,*(undefined4 *)(iVar2 + 0x4b8),1);
(**(code **)(*g_pScriptVM + 0x4c))(g_pScriptVM,iVar3);
}
if ((local_1e & 1) != 0) {
free(local_28);
}
if (local_2c == 0x1f) {
/* try { // try from 008a0994 to 008a0998 has its CatchHandler @ 008a09d3 */
V_strncpy(param_3,local_34[0],param_4);
if ((local_2a & 1) == 0) {
return CVar1;
}
free(local_34[0]);
return CVar1;
}
if ((local_2a & 1) != 0) {
free(local_34[0]);
}
}
}
return (CDirectorChallengeMode)0x0;
}
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.