CWeaponCSBase::DefaultDeploy
0x004405c0 · 784 bytes · __thiscall
_ZN13CWeaponCSBase13DefaultDeployEPcS0_iS0_
Decompiled
undefined (5 params)
/* CWeaponCSBase::DefaultDeploy(char*, char*, int, char*) */
undefined4 __thiscall
CWeaponCSBase::DefaultDeploy
(CWeaponCSBase *this,char *param_1,char *param_2,int param_3,char *param_4)
{
code *pcVar1;
CBaseEdict *pCVar2;
char cVar3;
CBasePlayer *this_00;
undefined4 uVar4;
undefined4 uVar5;
int iVar6;
int iVar7;
CStudioHdr *pCVar8;
CStudioHdr *pCVar9;
longdouble lVar10;
longdouble lVar11;
float fVar12;
float fVar13;
this_00 = (CBasePlayer *)GetPlayerOwner(this);
if ((this_00 == (CBasePlayer *)0x0) ||
(uVar4 = (**(code **)(*(int *)this_00 + 0x16c))(this_00), (char)uVar4 == '\0')) {
return 0;
}
CBasePlayer::SetAnimationExtension(this_00,param_4);
(**(code **)(*(int *)this + 0x3fc))(this);
pcVar1 = *(code **)(*(int *)this + 0x3f0);
uVar5 = (**(code **)(*(int *)this + 0x65c))(this);
(*pcVar1)(this,uVar5);
(**(code **)(*(int *)this_00 + 0x7fc))(this_00,0x41,0);
CTerrorPlayer::InhibitCalm
((CTerrorPlayer *)this_00,*(float *)(SurvivorCalmDeployDelay._28_4_ + 0x2c));
lVar10 = (longdouble)(**(code **)(*(int *)this + 0x5a0))(this);
if (*(float *)(this + 0x468) != 1.0) {
if (this[0x6c] == (CWeaponCSBase)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar6 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar6 + 2) = 0;
}
}
else {
this[0x70] = (CWeaponCSBase)((byte)this[0x70] | 1);
}
*(undefined4 *)(this + 0x468) = 0x3f800000;
}
pCVar8 = *(CStudioHdr **)(this + 0x13e0);
iVar6 = *(int *)(this + 0x494);
if (pCVar8 == (CStudioHdr *)0x0) {
iVar7 = CBaseEntity::GetModel((CBaseEntity *)this);
if (iVar7 == 0) {
pCVar8 = *(CStudioHdr **)(this + 0x13e0);
}
else {
CBaseAnimating::LockStudioHdr((CBaseAnimating *)this);
pCVar8 = *(CStudioHdr **)(this + 0x13e0);
}
pCVar9 = (CStudioHdr *)0x0;
if (pCVar8 == (CStudioHdr *)0x0) goto LAB_0044069f;
}
pCVar9 = (CStudioHdr *)0x0;
if (*(int *)pCVar8 != 0) {
pCVar9 = pCVar8;
}
LAB_0044069f:
lVar11 = (longdouble)CBaseAnimating::SequenceDuration((CBaseAnimating *)this,pCVar9,iVar6);
fVar13 = *(float *)(gpGlobals + 0xc);
if (fVar13 != *(float *)(this_00 + 0x17dc)) {
if (this_00[0x6c] == (CBasePlayer)0x0) {
pCVar2 = *(CBaseEdict **)(this_00 + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar6 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar6 + 2) = 0;
lVar11 = (longdouble)(float)lVar11;
}
}
else {
this_00[0x70] = (CBasePlayer)((byte)this_00[0x70] | 1);
}
*(float *)(this_00 + 0x17dc) = fVar13;
}
cVar3 = (**(code **)(*(int *)this + 0x664))(this);
iVar6 = gpGlobals;
if (cVar3 != '\0') {
fVar13 = *(float *)(gpGlobals + 0xc);
fVar12 = (float)lVar11 * (float)lVar10 + fVar13;
if (fVar12 != *(float *)(this + 0x13fc)) {
if (this[0x6c] == (CWeaponCSBase)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar6 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar6 + 2) = 0;
iVar6 = gpGlobals;
}
}
else {
this[0x70] = (CWeaponCSBase)((byte)this[0x70] | 1);
}
*(float *)(this + 0x13fc) = fVar12;
fVar13 = *(float *)(iVar6 + 0xc);
}
if (fVar13 != *(float *)(this + 0x1400)) {
if (this[0x6c] == (CWeaponCSBase)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar6 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar6 + 2) = 0;
}
}
else {
this[0x70] = (CWeaponCSBase)((byte)this[0x70] | 1);
}
*(float *)(this + 0x1400) = fVar13;
}
}
(**(code **)(*(int *)this + 0x430))(this,1);
CCSPlayer::SetShieldDrawnState(SUB41(this_00,0));
cVar3 = CCSPlayer::HasShield();
if (cVar3 == '\0') {
(**(code **)(*(int *)this + 0x640))(this,param_2);
}
else {
(**(code **)(*(int *)this + 0x640))(this,"models/weapons/w_shield.mdl");
}
CBaseCombatWeapon::QueueAttack((CBaseCombatWeapon *)this,0);
return uVar4;
}
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.