CWindowPane::CreateWindowPane
0x006b6f50 · 337 bytes · __cdecl
_ZN11CWindowPane16CreateWindowPaneERK6VectorRK6QAngle
Decompiled
undefined (2 params)
/* CWindowPane::CreateWindowPane(Vector const&, QAngle const&) */
CBaseEntity * CWindowPane::CreateWindowPane(Vector *param_1,QAngle *param_2)
{
CBaseEdict *this;
CBaseEntity *this_00;
int iVar1;
int iVar2;
int iVar3;
float local_28;
float local_24;
float local_20;
this_00 = (CBaseEntity *)CreateEntityByName("window_pane",-1,true);
if (this_00 == (CBaseEntity *)0x0) {
Msg("NULL Ent in CreateWindowPane!\n");
this_00 = (CBaseEntity *)0x0;
}
else if (*(int *)(this_00 + 0x30) != 0) {
CBaseEntity::SetLocalOrigin(this_00,param_1);
CBaseEntity::SetLocalAngles(this_00,param_2);
(**(code **)(*(int *)this_00 + 100))(this_00);
*(code **)(this_00 + 0xd8) = PaneTouch;
*(undefined4 *)(this_00 + 0xdc) = 0;
iVar1 = rand();
iVar2 = rand();
iVar3 = rand();
local_28 = (float)iVar1 * 0.003051851 - 50.0;
local_24 = (float)iVar2 * 0.003051851 - 50.0;
local_20 = (float)iVar3 * 0.003051851 - 50.0;
CBaseEntity::SetLocalAngularVelocity(this_00,(QAngle *)&local_28);
iVar1 = (**(code **)(*random_valve + 8))(random_valve,0,2);
if (iVar1 != *(int *)(this_00 + 0x45c)) {
if (this_00[0x6c] == (CBaseEntity)0x0) {
this = *(CBaseEdict **)(this_00 + 0x30);
if (this != (CBaseEdict *)0x0) {
*(uint *)this = *(uint *)this | 0x101;
iVar2 = CBaseEdict::GetChangeAccessor(this);
*(undefined2 *)(iVar2 + 2) = 0;
}
*(int *)(this_00 + 0x45c) = iVar1;
}
else {
this_00[0x70] = (CBaseEntity)((byte)this_00[0x70] | 1);
*(int *)(this_00 + 0x45c) = iVar1;
}
}
}
return this_00;
}
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.