CBaseEntity::PhysicsSimulate
0x004794e0 · 4465 bytes · __thiscall
_ZN11CBaseEntity15PhysicsSimulateEv
Decompiled
undefined (1 param)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CBaseEntity::PhysicsSimulate() */
void __thiscall CBaseEntity::PhysicsSimulate(CBaseEntity *this)
{
uint uVar1;
float fVar2;
int iVar3;
CBaseEntity CVar4;
char cVar5;
int iVar6;
undefined *puVar7;
undefined1 *puVar8;
char *pcVar9;
float fVar10;
undefined4 local_54;
undefined4 local_50;
float local_4c;
float local_48;
undefined4 local_40;
undefined4 local_3c;
CBaseEntity *local_38;
float local_34;
float local_30;
CBaseEntity *local_2c;
float local_28;
float local_24;
CBaseEntity *local_20;
local_54 = 0;
local_50 = 0;
if (___atan2f_finite == (CBaseEntity *)0x0) {
local_38 = (CBaseEntity *)0x0;
}
else {
(**(code **)(___atan2f_finite + 0x50))
(___atan2f_finite,&local_54,0,0,0,0,
"/data/src/game/server/../../game/shared/physics_main_shared.cpp",0x714,
&PhysicsSimulate()::tm_fmt,"(%s)%s","Unaccounted","CBaseEntity::PhysicsSimulate");
local_38 = ___atan2f_finite;
}
iVar3 = _DAT_0105db00;
local_40 = local_54;
local_3c = local_50;
/* try { // try from 00479666 to 004796b4 has its CatchHandler @ 0047a7d6 */
if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
(iVar6 = ThreadGetCurrentId(), iVar3 == iVar6)) {
if (*(char **)_DAT_0105d15c != "CBaseEntity::PhysicsSimulate") {
_DAT_0105d15c =
(CBaseEntity *)
CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xc17db0,(char *)0x1,0xbfafa1);
}
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
if (*(int *)(this + 300) == *(int *)(gpGlobals + 0x18)) goto LAB_00479601;
*(int *)(this + 300) = *(int *)(gpGlobals + 0x18);
uVar1 = *(uint *)(this + 0x188);
if (((uVar1 == 0xffffffff) ||
(puVar7 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar7 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar7 + 8) != uVar1 >> 0xc)) {
CVar4 = this[0x186];
if (CVar4 != (CBaseEntity)0x0) {
pcVar9 = (char *)0x0;
LAB_004795f0:
if (CVar4 != (CBaseEntity)0x6) {
LAB_0047973a:
uVar1 = *(uint *)(this + 600);
if (((uVar1 == 0xffffffff) ||
(puVar7 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar7 == (undefined *)0xfffffffc)) ||
((*(uint *)(puVar7 + 8) != uVar1 >> 0xc || (*(int *)(puVar7 + 4) == 0)))) {
/* try { // try from 00479770 to 004797f4 has its CatchHandler @ 0047a762 */
RemoveFlag(this,1);
}
if ((CBaseEntity *)pcVar9 == (CBaseEntity *)0x0) {
local_4c = 0.0;
local_48 = 0.0;
if (___atan2f_finite == (CBaseEntity *)0x0) {
local_2c = (CBaseEntity *)0x0;
}
else {
/* try { // try from 0047a3d5 to 0047a3d7 has its CatchHandler @ 0047a762 */
(**(code **)(___atan2f_finite + 0x50))
(___atan2f_finite,&local_4c,0,0,0,0,
"/data/src/game/server/../../game/shared/physics_main_shared.cpp",0x735,
&PhysicsSimulate()::tm_fmt,"(%s)%s","Unaccounted",
"CBaseEntity::PhysicsSimulate-BaseVelocity");
local_2c = ___atan2f_finite;
}
iVar3 = _DAT_0105db00;
local_34 = local_4c;
local_30 = local_48;
/* try { // try from 0047a405 to 0047a409 has its CatchHandler @ 0047a766 */
if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
(iVar6 = ThreadGetCurrentId(), iVar3 == iVar6)) {
if (*(char **)_DAT_0105d15c != "CBaseEntity::PhysicsSimulate-BaseVelocity") {
/* try { // try from 0047a658 to 0047a669 has its CatchHandler @ 0047a766 */
_DAT_0105d15c =
(CBaseEntity *)
CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xc1808c,(char *)0x1,0xbfafa1);
}
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
/* try { // try from 0047a415 to 0047a584 has its CatchHandler @ 0047a775 */
UpdateBaseVelocity(this);
if ((((byte)this[0x152] & 0x80) == 0) &&
(((fVar10 = *(float *)(this + 0x268), fVar10 != vec3_origin ||
(DAT_01053d4c != *(float *)(this + 0x26c))) ||
(DAT_01053d50 != *(float *)(this + 0x270))))) {
fVar2 = *(float *)(gpGlobals + 0x10) * 0.5 + 1.0;
if (((byte)this[0x14d] & 0x10) != 0) {
CalcAbsoluteVelocity(this);
fVar10 = *(float *)(this + 0x268);
}
local_28 = fVar10 * fVar2 + *(float *)(this + 0x274);
local_24 = *(float *)(this + 0x26c) * fVar2 + *(float *)(this + 0x278);
local_20 = (CBaseEntity *)(*(float *)(this + 0x270) * fVar2 + *(float *)(this + 0x27c));
SetAbsVelocity(this,(Vector *)&local_28);
if (((vec3_origin != *(float *)(this + 0x268)) ||
(DAT_01053d4c != *(float *)(this + 0x26c))) ||
(DAT_01053d50 != *(float *)(this + 0x270))) {
(**(code **)(*(int *)this + 0x2fc))(this,this + 0x268);
fVar2 = DAT_01053d50;
fVar10 = DAT_01053d4c;
*(float *)(this + 0x268) = vec3_origin;
*(float *)(this + 0x26c) = fVar10;
*(float *)(this + 0x270) = fVar2;
}
}
pcVar9 = (char *)this;
RemoveFlag(this,0x800000);
iVar3 = _DAT_0105db00;
if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
(iVar6 = ThreadGetCurrentId(), iVar3 == iVar6)) {
pcVar9 = (char *)_DAT_0105d15c;
cVar5 = CVProfNode::ExitScope();
if (cVar5 != '\0') {
_DAT_0105d15c = *(CBaseEntity **)(_DAT_0105d15c + 100);
}
DAT_0105d158 = _DAT_0105d15c == (CBaseEntity *)0x105d160;
}
if (local_2c != (CBaseEntity *)0x0) {
pcVar9 = (char *)local_2c;
(**(code **)(local_2c + 0x54))(local_2c,local_34,local_30,0,0,0);
}
}
else {
local_34 = 0.0;
local_30 = 0.0;
if (___atan2f_finite == (CBaseEntity *)0x0) {
local_20 = (CBaseEntity *)0x0;
}
else {
(**(code **)(___atan2f_finite + 0x50))
(___atan2f_finite,&local_34,0,0,0,0,
"/data/src/game/server/../../game/shared/physics_main_shared.cpp",0x730,
&PhysicsSimulate()::tm_fmt,"(%s)%s","Unaccounted",
"CBaseEntity::PhysicsSimulate-MoveParent");
local_20 = ___atan2f_finite;
}
iVar3 = _DAT_0105db00;
local_28 = local_34;
local_24 = local_30;
/* try { // try from 00479822 to 00479826 has its CatchHandler @ 0047a756 */
if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
(iVar6 = ThreadGetCurrentId(), iVar3 == iVar6)) {
if (*(char **)_DAT_0105d15c != "CBaseEntity::PhysicsSimulate-MoveParent") {
/* try { // try from 0047a310 to 0047a321 has its CatchHandler @ 0047a756 */
_DAT_0105d15c =
(CBaseEntity *)
CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xc18064,(char *)0x1,0xbfafa1);
}
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
/* try { // try from 00479834 to 00479839 has its CatchHandler @ 0047a6eb */
(**(code **)(*(int *)pcVar9 + 0x1c8))(pcVar9);
iVar3 = _DAT_0105db00;
if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
(iVar6 = ThreadGetCurrentId(), iVar3 == iVar6)) {
pcVar9 = (char *)_DAT_0105d15c;
cVar5 = CVProfNode::ExitScope();
if (cVar5 != '\0') {
_DAT_0105d15c = *(CBaseEntity **)(_DAT_0105d15c + 100);
}
DAT_0105d158 = _DAT_0105d15c == (CBaseEntity *)0x105d160;
}
if (local_20 != (CBaseEntity *)0x0) {
pcVar9 = (char *)local_20;
(**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,0,0);
}
}
switch(this[0x186]) {
case (CBaseEntity)0x0:
local_34 = 0.0;
local_30 = 0.0;
if (___atan2f_finite == (CBaseEntity *)0x0) {
local_20 = (CBaseEntity *)0x0;
}
else {
/* try { // try from 00479fc5 to 00479fc7 has its CatchHandler @ 0047a762 */
pcVar9 = (char *)___atan2f_finite;
(**(code **)(___atan2f_finite + 0x50))
(___atan2f_finite,&local_34,0,0,0,0,
"/data/src/game/server/../../game/shared/physics_main_shared.cpp",0x756,
&PhysicsSimulate()::tm_fmt,"(%s)%s","Unaccounted",
"CBaseEntity::PhysicsSimulate-MOVETYPE_NONE");
local_20 = ___atan2f_finite;
}
iVar3 = _DAT_0105db00;
local_28 = local_34;
local_24 = local_30;
/* try { // try from 00479ff6 to 0047a040 has its CatchHandler @ 0047a723 */
if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
(iVar6 = ThreadGetCurrentId(pcVar9), iVar3 == iVar6)) {
if (*(char **)_DAT_0105d15c != "CBaseEntity::PhysicsSimulate-MOVETYPE_NONE") {
_DAT_0105d15c =
(CBaseEntity *)
CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xc180e4,(char *)0x1,0xbfafa1);
}
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
/* try { // try from 0047a04b to 0047a04f has its CatchHandler @ 0047a7ab */
PhysicsRigidChild(this);
iVar3 = _DAT_0105db00;
if (((DAT_0105d158 == '\0') || (pcVar9 = (char *)this, _DAT_0105d154 != 0)) &&
(iVar6 = ThreadGetCurrentId(), pcVar9 = (char *)this, iVar3 == iVar6)) {
pcVar9 = (char *)_DAT_0105d15c;
cVar5 = CVProfNode::ExitScope();
if (cVar5 != '\0') {
_DAT_0105d15c = *(CBaseEntity **)(_DAT_0105d15c + 100);
}
DAT_0105d158 = _DAT_0105d15c == (CBaseEntity *)0x105d160;
}
if (local_20 != (CBaseEntity *)0x0) {
pcVar9 = (char *)local_20;
(**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,0,0);
}
break;
default:
pcVar9 = "PhysicsSimulate: %s bad movetype %d";
puVar8 = &DAT_00d539c2;
if (*(undefined1 **)(this + 0x7c) != (undefined1 *)0x0) {
puVar8 = *(undefined1 **)(this + 0x7c);
}
/* try { // try from 0047a28c to 0047a290 has its CatchHandler @ 0047a762 */
Warning("PhysicsSimulate: %s bad movetype %d",puVar8,this[0x186]);
break;
case (CBaseEntity)0x3:
local_34 = 0.0;
local_30 = 0.0;
if (___atan2f_finite == (CBaseEntity *)0x0) {
local_20 = (CBaseEntity *)0x0;
}
else {
/* try { // try from 00479ca5 to 00479ca7 has its CatchHandler @ 0047a762 */
pcVar9 = (char *)___atan2f_finite;
(**(code **)(___atan2f_finite + 0x50))
(___atan2f_finite,&local_34,0,0,0,0,
"/data/src/game/server/../../game/shared/physics_main_shared.cpp",0x765,
&PhysicsSimulate()::tm_fmt,"(%s)%s","Unaccounted",
"CBaseEntity::PhysicsSimulate-MOVETYPE_STEP");
local_20 = ___atan2f_finite;
}
iVar3 = _DAT_0105db00;
local_28 = local_34;
local_24 = local_30;
/* try { // try from 00479cd5 to 00479d1f has its CatchHandler @ 0047a752 */
if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
(iVar6 = ThreadGetCurrentId(pcVar9), iVar3 == iVar6)) {
if (*(char **)_DAT_0105d15c != "CBaseEntity::PhysicsSimulate-MOVETYPE_STEP") {
_DAT_0105d15c =
(CBaseEntity *)
CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xc18140,(char *)0x1,0xbfafa1);
}
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
/* try { // try from 00479d2a to 00479d2e has its CatchHandler @ 0047a7be */
PhysicsStep(this);
iVar3 = _DAT_0105db00;
if (((DAT_0105d158 == '\0') || (pcVar9 = (char *)this, _DAT_0105d154 != 0)) &&
(iVar6 = ThreadGetCurrentId(), pcVar9 = (char *)this, iVar3 == iVar6)) {
pcVar9 = (char *)_DAT_0105d15c;
cVar5 = CVProfNode::ExitScope();
if (cVar5 != '\0') {
_DAT_0105d15c = *(CBaseEntity **)(_DAT_0105d15c + 100);
}
DAT_0105d158 = _DAT_0105d15c == (CBaseEntity *)0x105d160;
}
if (local_20 != (CBaseEntity *)0x0) {
pcVar9 = (char *)local_20;
(**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,0,0);
}
break;
case (CBaseEntity)0x4:
case (CBaseEntity)0x5:
local_34 = 0.0;
local_30 = 0.0;
if (___atan2f_finite == (CBaseEntity *)0x0) {
local_20 = (CBaseEntity *)0x0;
}
else {
/* try { // try from 00479b15 to 00479b17 has its CatchHandler @ 0047a762 */
pcVar9 = (char *)___atan2f_finite;
(**(code **)(___atan2f_finite + 0x50))
(___atan2f_finite,&local_34,0,0,0,0,
"/data/src/game/server/../../game/shared/physics_main_shared.cpp",0x76d,
&PhysicsSimulate()::tm_fmt,"(%s)%s","Unaccounted",
"CBaseEntity::PhysicsSimulate-MOVETYPE_FLY");
local_20 = ___atan2f_finite;
}
iVar3 = _DAT_0105db00;
local_28 = local_34;
local_24 = local_30;
/* try { // try from 00479b45 to 00479b8f has its CatchHandler @ 0047a7d1 */
if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
(iVar6 = ThreadGetCurrentId(pcVar9), iVar3 == iVar6)) {
if (*(char **)_DAT_0105d15c != "CBaseEntity::PhysicsSimulate-MOVETYPE_FLY") {
_DAT_0105d15c =
(CBaseEntity *)
CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xc1816c,(char *)0x1,0xbfafa1);
}
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
/* try { // try from 00479b9a to 00479b9e has its CatchHandler @ 0047a732 */
PhysicsToss(this);
iVar3 = _DAT_0105db00;
if (((DAT_0105d158 == '\0') || (pcVar9 = (char *)this, _DAT_0105d154 != 0)) &&
(iVar6 = ThreadGetCurrentId(), pcVar9 = (char *)this, iVar3 == iVar6)) {
pcVar9 = (char *)_DAT_0105d15c;
cVar5 = CVProfNode::ExitScope();
if (cVar5 != '\0') {
_DAT_0105d15c = *(CBaseEntity **)(_DAT_0105d15c + 100);
}
DAT_0105d158 = _DAT_0105d15c == (CBaseEntity *)0x105d160;
}
if (local_20 != (CBaseEntity *)0x0) {
pcVar9 = (char *)local_20;
(**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,0,0);
}
break;
case (CBaseEntity)0x6:
break;
case (CBaseEntity)0x7:
local_34 = 0.0;
local_30 = 0.0;
if (___atan2f_finite == (CBaseEntity *)0x0) {
local_20 = (CBaseEntity *)0x0;
}
else {
/* try { // try from 00479925 to 00479927 has its CatchHandler @ 0047a762 */
pcVar9 = (char *)___atan2f_finite;
(**(code **)(___atan2f_finite + 0x50))
(___atan2f_finite,&local_34,0,0,0,0,
"/data/src/game/server/../../game/shared/physics_main_shared.cpp",0x749,
&PhysicsSimulate()::tm_fmt,"(%s)%s","Unaccounted",
"CBaseEntity::PhysicsSimulate-MOVETYPE_PUSH");
local_20 = ___atan2f_finite;
}
iVar3 = _DAT_0105db00;
local_28 = local_34;
local_24 = local_30;
/* try { // try from 00479956 to 004799a0 has its CatchHandler @ 0047a729 */
if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
(iVar6 = ThreadGetCurrentId(pcVar9), iVar3 == iVar6)) {
if (*(char **)_DAT_0105d15c != "CBaseEntity::PhysicsSimulate-MOVETYPE_PUSH") {
_DAT_0105d15c =
(CBaseEntity *)
CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xc180b8,(char *)0x1,0xbfafa1);
}
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
/* try { // try from 004799ab to 004799af has its CatchHandler @ 0047a785 */
PhysicsPusher(this);
iVar3 = _DAT_0105db00;
if (((DAT_0105d158 == '\0') || (pcVar9 = (char *)this, _DAT_0105d154 != 0)) &&
(iVar6 = ThreadGetCurrentId(), pcVar9 = (char *)this, iVar3 == iVar6)) {
pcVar9 = (char *)_DAT_0105d15c;
cVar5 = CVProfNode::ExitScope();
if (cVar5 != '\0') {
_DAT_0105d15c = *(CBaseEntity **)(_DAT_0105d15c + 100);
}
DAT_0105d158 = _DAT_0105d15c == (CBaseEntity *)0x105d160;
}
if (local_20 != (CBaseEntity *)0x0) {
pcVar9 = (char *)local_20;
(**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,0,0);
}
break;
case (CBaseEntity)0x8:
local_34 = 0.0;
local_30 = 0.0;
if (___atan2f_finite == (CBaseEntity *)0x0) {
local_20 = (CBaseEntity *)0x0;
}
else {
/* try { // try from 0047a155 to 0047a157 has its CatchHandler @ 0047a762 */
pcVar9 = (char *)___atan2f_finite;
(**(code **)(___atan2f_finite + 0x50))
(___atan2f_finite,&local_34,0,0,0,0,
"/data/src/game/server/../../game/shared/physics_main_shared.cpp",0x75e,
&PhysicsSimulate()::tm_fmt,"(%s)%s","Unaccounted",
"CBaseEntity::PhysicsSimulate-MOVETYPE_NOCLIP");
local_20 = ___atan2f_finite;
}
iVar3 = _DAT_0105db00;
local_28 = local_34;
local_24 = local_30;
/* try { // try from 0047a185 to 0047a1cf has its CatchHandler @ 0047a727 */
if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
(iVar6 = ThreadGetCurrentId(pcVar9), iVar3 == iVar6)) {
if (*(char **)_DAT_0105d15c != "CBaseEntity::PhysicsSimulate-MOVETYPE_NOCLIP") {
_DAT_0105d15c =
(CBaseEntity *)
CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xc18110,(char *)0x1,0xbfafa1);
}
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
/* try { // try from 0047a1da to 0047a1de has its CatchHandler @ 0047a798 */
PhysicsNoclip(this);
iVar3 = _DAT_0105db00;
if (((DAT_0105d158 == '\0') || (pcVar9 = (char *)this, _DAT_0105d154 != 0)) &&
(iVar6 = ThreadGetCurrentId(), pcVar9 = (char *)this, iVar3 == iVar6)) {
pcVar9 = (char *)_DAT_0105d15c;
cVar5 = CVProfNode::ExitScope();
if (cVar5 != '\0') {
_DAT_0105d15c = *(CBaseEntity **)(_DAT_0105d15c + 100);
}
DAT_0105d158 = _DAT_0105d15c == (CBaseEntity *)0x105d160;
}
if (local_20 != (CBaseEntity *)0x0) {
pcVar9 = (char *)local_20;
(**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,0,0);
}
break;
case (CBaseEntity)0xb:
local_34 = 0.0;
local_30 = 0.0;
if (___atan2f_finite == (CBaseEntity *)0x0) {
local_20 = (CBaseEntity *)0x0;
}
else {
/* try { // try from 00479e35 to 00479e37 has its CatchHandler @ 0047a762 */
pcVar9 = (char *)___atan2f_finite;
(**(code **)(___atan2f_finite + 0x50))
(___atan2f_finite,&local_34,0,0,0,0,
"/data/src/game/server/../../game/shared/physics_main_shared.cpp",0x774,
&PhysicsSimulate()::tm_fmt,"(%s)%s","Unaccounted",
"CBaseEntity::PhysicsSimulate-MOVETYPE_CUSTOM");
local_20 = ___atan2f_finite;
}
iVar3 = _DAT_0105db00;
local_28 = local_34;
local_24 = local_30;
/* try { // try from 00479e66 to 00479eb0 has its CatchHandler @ 0047a754 */
if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
(iVar6 = ThreadGetCurrentId(pcVar9), iVar3 == iVar6)) {
if (*(char **)_DAT_0105d15c != "CBaseEntity::PhysicsSimulate-MOVETYPE_CUSTOM") {
_DAT_0105d15c =
(CBaseEntity *)
CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xc18198,(char *)0x1,0xbfafa1);
}
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
/* try { // try from 00479ebb to 00479ebf has its CatchHandler @ 0047a742 */
PhysicsCustom(this);
iVar3 = _DAT_0105db00;
if (((DAT_0105d158 == '\0') || (pcVar9 = (char *)this, _DAT_0105d154 != 0)) &&
(iVar6 = ThreadGetCurrentId(), pcVar9 = (char *)this, iVar3 == iVar6)) {
pcVar9 = (char *)_DAT_0105d15c;
cVar5 = CVProfNode::ExitScope();
if (cVar5 != '\0') {
_DAT_0105d15c = *(CBaseEntity **)(_DAT_0105d15c + 100);
}
DAT_0105d158 = _DAT_0105d15c == (CBaseEntity *)0x105d160;
}
if (local_20 != (CBaseEntity *)0x0) {
pcVar9 = (char *)local_20;
(**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,0,0);
}
}
iVar3 = _DAT_0105db00;
if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
(iVar6 = ThreadGetCurrentId(pcVar9), iVar3 == iVar6)) {
cVar5 = CVProfNode::ExitScope();
if (cVar5 != '\0') {
_DAT_0105d15c = *(CBaseEntity **)(_DAT_0105d15c + 100);
}
DAT_0105d158 = _DAT_0105d15c == (CBaseEntity *)0x105d160;
}
if (local_38 == (CBaseEntity *)0x0) {
return;
}
(**(code **)(local_38 + 0x54))(local_38,local_40,local_3c,0,0,0);
return;
}
}
}
else {
CVar4 = this[0x186];
pcVar9 = *(char **)(puVar7 + 4);
if (CVar4 != (CBaseEntity)0x0) goto LAB_004795f0;
if ((CBaseEntity *)pcVar9 != (CBaseEntity *)0x0) goto LAB_0047973a;
}
/* try { // try from 004795fc to 00479600 has its CatchHandler @ 0047a762 */
PhysicsNone(this);
LAB_00479601:
iVar3 = _DAT_0105db00;
if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
(iVar6 = ThreadGetCurrentId(), iVar3 == iVar6)) {
cVar5 = CVProfNode::ExitScope();
if (cVar5 != '\0') {
_DAT_0105d15c = *(CBaseEntity **)(_DAT_0105d15c + 100);
}
DAT_0105d158 = _DAT_0105d15c == (CBaseEntity *)0x105d160;
}
if (local_38 != (CBaseEntity *)0x0) {
(**(code **)(local_38 + 0x54))(local_38,local_40,local_3c,0,0,0);
}
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.