DisableNoClip
0x00643ec0 · 353 bytes · __cdecl
_Z13DisableNoClipP11CBasePlayer
Decompiled
undefined (1 param)
/* DisableNoClip(CBasePlayer*) */
void DisableNoClip(CBasePlayer *param_1)
{
char cVar1;
uint uVar2;
CEventLog *this;
undefined4 uVar3;
undefined4 local_4c;
undefined4 local_48;
undefined4 local_44;
Vector local_40 [12];
Vector local_34 [12];
Vector local_28 [24];
*(uint *)(param_1 + 0x14c) = *(uint *)(param_1 + 0x14c) & 0xfffffffb;
CBaseEntity::SetMoveType((CBaseEntity *)param_1,2,0);
ClientPrint(param_1,2,"noclip OFF\n",(char *)0x0,(char *)0x0,(char *)0x0,(char *)0x0);
if (((byte)param_1[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_1);
}
local_4c = *(undefined4 *)(param_1 + 0x2e0);
local_48 = *(undefined4 *)(param_1 + 0x2e4);
local_44 = *(undefined4 *)(param_1 + 0x2e8);
uVar2 = (**(code **)(*(int *)param_1 + 0x7a0))(param_1,0);
if (*(int *)(noclip_fixup._28_4_ + 0x30) != 0) {
cVar1 = TestEntityPosition((CBaseEntity *)param_1,uVar2);
if (cVar1 == '\0') {
AngleVectors((QAngle *)(param_1 + 0x1c84),local_40,local_34,local_28);
cVar1 = FindEmptySpace((CBaseEntity *)param_1,uVar2,local_40,local_34,local_28,
(Vector *)&local_4c);
if (cVar1 == '\0') {
Msg("Can\'t find the world\n");
}
CBaseEntity::SetAbsOrigin((CBaseEntity *)param_1,(Vector *)&local_4c);
}
}
this = (CEventLog *)TheLog();
uVar3 = CEventLog::FormatPlayer(this,(CBaseEntity *)param_1);
UTIL_LogPrintf("%s left NOCLIP mode\n",uVar3);
return;
}
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.