CBasePropDoor::Blocked
0x007f51b0 · 736 bytes · __thiscall
_ZN13CBasePropDoor7BlockedEP11CBaseEntity
Decompiled
undefined (2 params)
/* CBasePropDoor::Blocked(CBaseEntity*) */
void __thiscall CBasePropDoor::Blocked(CBasePropDoor *this,CBaseEntity *param_1)
{
float fVar1;
bool bVar2;
int iVar3;
char cVar4;
int iVar5;
longdouble lVar6;
CTakeDamageInfo local_7c [108];
if ((this[0x162d] != (CBasePropDoor)0x0) && (param_1[0x186] == (CBaseEntity)0x6)) {
if ((byte)param_1[0x105] < 2) {
EntityPhysics_CreateSolver((CBaseEntity *)this,param_1,true,4.0);
}
else if (param_1[0x105] == (CBaseEntity)0x2) {
CTakeDamageInfo::CTakeDamageInfo
(local_7c,(CBaseEntity *)this,(CBaseEntity *)this,(float)*(int *)(param_1 + 0x100),1
,0);
CBaseEntity::TakeDamage(param_1,local_7c);
}
}
iVar5 = (**(code **)(*(int *)param_1 + 0x14c))(param_1);
if (iVar5 == 0) {
cVar4 = (**(code **)(*(int *)param_1 + 0x16c))(param_1);
if (cVar4 == '\0') {
if (this[0x162d] != (CBasePropDoor)0x0) {
return;
}
bVar2 = false;
goto LAB_007f5224;
}
iVar5 = CBaseEntity::GetTeamNumber(param_1);
if ((iVar5 == 3) && (cVar4 = (**(code **)(*(int *)param_1 + 0x16c))(param_1), cVar4 != '\0')) {
CTerrorPlayer::OnStaggered((CTerrorPlayer *)param_1,(CBaseEntity *)this,(Vector *)0x0);
}
}
else {
(**(code **)(*(int *)(iVar5 + 0x1a3c) + 0x74))(iVar5 + 0x1a3c,this);
cVar4 = (**(code **)(*(int *)this + 0x478))(this);
if ((cVar4 != '\0') && (*(int *)(this + 0x15f4) == 3)) {
CTakeDamageInfo::CTakeDamageInfo(local_7c,(CBaseEntity *)this,(CBaseEntity *)this,25.0,1,0);
CBaseEntity::TakeDamage(param_1,local_7c);
}
}
bVar2 = true;
LAB_007f5224:
lVar6 = (longdouble)CountdownTimer::Now();
if (*(float *)(this + 0x1638) <= (float)lVar6) {
fVar1 = *(float *)(ZombieDoorRetryInterval._28_4_ + 0x2c);
lVar6 = (longdouble)CountdownTimer::Now();
if ((float)lVar6 + fVar1 != *(float *)(this + 0x1638)) {
(**(code **)(*(int *)(this + 0x1630) + 4))(this + 0x1630,this + 0x1638);
*(float *)(this + 0x1638) = (float)lVar6 + fVar1;
}
if (fVar1 == *(float *)(this + 0x1634)) {
iVar5 = *(int *)(this + 0x15f4);
iVar3 = maxCloseAttempts._28_4_;
}
else {
(**(code **)(*(int *)(this + 0x1630) + 4))(this + 0x1630,this + 0x1634);
iVar5 = *(int *)(this + 0x15f4);
*(float *)(this + 0x1634) = fVar1;
iVar3 = maxCloseAttempts._28_4_;
}
maxCloseAttempts._28_4_ = iVar3;
if (iVar5 != 3) {
DoorClose(this);
return;
}
if ((!bVar2) ||
(iVar5 = *(int *)(this + 0x1660), *(int *)(this + 0x1660) = iVar5 + 1,
iVar5 + 1 < *(int *)(iVar3 + 0x30))) {
DoorOpen(this,param_1);
return;
}
CCollisionProperty::SetSolidFlags
((CCollisionProperty *)(this + 0x194),(uint)(*(ushort *)(this + 0x1b4) | 4));
}
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.