L L4D2node

CIKTarget::SetNormal

0x00b87710 · 298 bytes · __thiscall

_ZN9CIKTarget9SetNormalERK6Vector

Decompiled

undefined (2 params)

/* CIKTarget::SetNormal(Vector const&) */

void __thiscall CIKTarget::SetNormal(CIKTarget *this,Vector *param_1)

{
  float fVar1;
  float fVar2;
  float fVar3;
  float local_70;
  float local_6c;
  float local_68;
  float local_64;
  float local_60;
  float local_5c;
  Vector local_58 [12];
  matrix3x4_t local_4c [60];
  
  QuaternionMatrix((Quaternion *)(this + 0x6c),local_4c);
  MatrixGetColumn(local_4c,1,(Vector *)&local_64);
  fVar1 = *(float *)(param_1 + 4);
  fVar2 = *(float *)param_1;
  fVar3 = *(float *)(param_1 + 8);
  local_68 = fVar1 * local_64 - fVar2 * local_60;
  local_6c = local_5c * fVar2 - local_64 * fVar3;
  local_70 = local_60 * fVar3 - local_5c * fVar1;
  local_64 = local_68 * fVar1 - local_6c * fVar3;
  local_60 = fVar3 * local_70 - local_68 * fVar2;
  local_5c = local_6c * fVar2 - local_70 * fVar1;
  MatrixSetColumn((Vector *)&local_70,0,local_4c);
  MatrixSetColumn((Vector *)&local_64,1,local_4c);
  MatrixSetColumn(param_1,2,local_4c);
  MatrixAngles(local_4c,(Quaternion *)(this + 0x6c),local_58);
  return;
}

SourceMod gamedata

paste into addons/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.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)