UTIL_ScreenTilt
0x00b2b8e0 · 424 bytes · __cdecl
_Z15UTIL_ScreenTiltRK6VectorRK6QAnglefff14ShakeCommand_tb
Decompiled
undefined (7 params)
/* UTIL_ScreenTilt(Vector const&, QAngle const&, float, float, float, ShakeCommand_t, bool) */
void UTIL_ScreenTilt(float *param_1,float *param_2,float param_3,float param_4,float param_5,
int param_6,byte param_7)
{
float fVar1;
float fVar2;
float fVar3;
CBasePlayer *pCVar4;
float *pfVar5;
int iVar6;
undefined **local_3c [11];
iVar6 = 1;
if (*(int *)(gpGlobals + 0x14) < 1) {
return;
}
do {
while (pCVar4 = (CBasePlayer *)UTIL_PlayerByIndex(iVar6), pCVar4 == (CBasePlayer *)0x0) {
LAB_00b2b9dc:
iVar6 = iVar6 + 1;
if (*(int *)(gpGlobals + 0x14) < iVar6) {
return;
}
}
if ((param_4 == 0.0) ||
(pfVar5 = (float *)(**(code **)(*(int *)pCVar4 + 0x288))(pCVar4),
SQRT((pfVar5[2] - param_1[2]) * (pfVar5[2] - param_1[2]) +
(pfVar5[1] - param_1[1]) * (pfVar5[1] - param_1[1]) +
(*pfVar5 - *param_1) * (*pfVar5 - *param_1)) <= param_4)) {
fVar1 = *param_2;
fVar2 = param_2[1];
fVar3 = param_2[2];
CRecipientFilter::CRecipientFilter((CRecipientFilter *)local_3c);
local_3c[0] = &PTR__CSingleUserRecipientFilter_00c08ea8;
/* try { // try from 00b2b949 to 00b2b94d has its CatchHandler @ 00b2ba88 */
CRecipientFilter::AddRecipient((CRecipientFilter *)local_3c,pCVar4);
/* try { // try from 00b2b951 to 00b2b9cc has its CatchHandler @ 00b2ba9a */
CRecipientFilter::MakeReliable((CRecipientFilter *)local_3c);
UserMessageBegin((IRecipientFilter *)local_3c,"Tilt");
MessageWriteByte(param_6);
MessageWriteByte((uint)param_7);
MessageWriteFloat(fVar1);
MessageWriteFloat(fVar2);
MessageWriteFloat(fVar3);
MessageWriteFloat(param_3);
MessageWriteFloat(param_5);
MessageEnd();
local_3c[0] = &PTR__CSingleUserRecipientFilter_00c08ea8;
CRecipientFilter::~CRecipientFilter((CRecipientFilter *)local_3c);
goto LAB_00b2b9dc;
}
iVar6 = iVar6 + 1;
if (*(int *)(gpGlobals + 0x14) < iVar6) {
return;
}
} while( true );
}
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.