CDirector::Update
0x00888370 · 8306 bytes · __thiscall
_ZN9CDirector6UpdateEv
Decompiled
undefined (1 param)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CDirector::Update() */
void __thiscall CDirector::Update(CDirector *this)
{
uint *puVar1;
undefined4 uVar2;
int *piVar3;
char cVar4;
char cVar5;
int iVar6;
CBaseEntity *this_00;
int iVar7;
CTerrorPlayer *pCVar8;
CLogicBranch *this_01;
int *piVar9;
CDirector *pCVar10;
int iVar11;
longdouble lVar12;
float fVar13;
float fVar14;
float fVar15;
float fVar16;
CDirectorItemManager *pCVar17;
CDirectorMusicBanks *this_02;
CDirectorScriptedEventManager *this_03;
CDirectorItemManager *pCVar18;
DispatchSurvivorsLeavingSpawn local_45;
undefined4 local_44;
undefined4 local_40;
undefined4 local_3c;
float local_38;
undefined4 local_34;
undefined4 local_30;
int local_2c;
undefined4 local_28;
float local_24;
CDirectorItemManager *local_20;
local_44 = 0;
local_40 = 0;
if (_towlower == 0) {
local_2c = 0;
}
else {
(**(code **)(_towlower + 0x50))
(_towlower,&local_44,0,0,0,0,"/data/src/game/server/terror/director.cpp",0xe68,
0xffff80,"(%s)%s","ZOMBIE","Director::Update");
local_2c = _towlower;
}
iVar11 = _DAT_0105db00;
local_34 = local_44;
local_30 = local_40;
/* try { // try from 00888eae to 00888f0e has its CatchHandler @ 0088a565 */
if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
(iVar6 = ThreadGetCurrentId(), iVar11 == iVar6)) {
if (*(char **)_DAT_0105d15c != "Director::Update") {
_DAT_0105d15c =
(CDirectorItemManager *)
CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xcdc59e,(char *)0x0,0xc0db47);
}
puVar1 = (uint *)(_DAT_0105d1e8 + 4 + *(int *)(_DAT_0105d15c + 0x70) * 8);
*puVar1 = *puVar1 | 4;
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
piVar3 = mdlcache;
/* try { // try from 00888432 to 00888434 has its CatchHandler @ 0088a464 */
(**(code **)(*mdlcache + 0x68))(mdlcache);
local_3c = 0;
local_38 = 0.0;
if (___atan2f_finite == (CDirectorItemManager *)0x0) {
local_20 = (CDirectorItemManager *)0x0;
}
else {
/* try { // try from 008884aa to 008884ac has its CatchHandler @ 0088a556 */
(**(code **)(___atan2f_finite + 0x50))
(___atan2f_finite,&local_3c,0,0,0,0,"/data/src/game/server/terror/director.cpp",0xe6c,
&Update()::tm_fmt,"(%s)%s","Unaccounted","Director::Update - preamble");
local_20 = ___atan2f_finite;
}
iVar11 = _DAT_0105db00;
local_28 = local_3c;
local_24 = local_38;
/* try { // try from 00888e46 to 00888e94 has its CatchHandler @ 0088a460 */
if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
(iVar6 = ThreadGetCurrentId(), iVar11 == iVar6)) {
if (*(char **)_DAT_0105d15c != "Director::Update - preamble") {
_DAT_0105d15c =
(CDirectorItemManager *)
CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xcdc5af,(char *)0x1,0xbfafa1);
}
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
/* try { // try from 008884df to 008884f1 has its CatchHandler @ 0088a4ce */
UpdateTestLoop(this);
cVar4 = (**(code **)(**(int **)(this + 0x634) + 8))(*(int **)(this + 0x634));
cVar5 = '\0';
if (cVar4 == '\0') {
iVar11 = *(int *)(DirectorDebug._28_4_ + 0x30);
}
else {
/* try { // try from 00889a1e to 00889a3c has its CatchHandler @ 0088a4ce */
cVar5 = UpdateTransition(this);
iVar11 = *(int *)(DirectorDebug._28_4_ + 0x30);
}
if (iVar11 != 0) {
DrawDebug(this);
}
iVar11 = _DAT_0105db00;
if (cVar5 == '\0') {
if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
(iVar6 = ThreadGetCurrentId(), iVar11 == iVar6)) {
cVar5 = CVProfNode::ExitScope();
if (cVar5 != '\0') {
_DAT_0105d15c = *(CDirectorItemManager **)(_DAT_0105d15c + 100);
}
DAT_0105d158 = _DAT_0105d15c == (CDirectorItemManager *)0x105d160;
}
if (local_20 != (CDirectorItemManager *)0x0) {
(**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,0,0);
}
(**(code **)(*piVar3 + 0x6c))(piVar3);
iVar11 = _DAT_0105db00;
if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
(iVar6 = ThreadGetCurrentId(), iVar11 == iVar6)) {
cVar5 = CVProfNode::ExitScope();
if (cVar5 != '\0') {
_DAT_0105d15c = *(CDirectorItemManager **)(_DAT_0105d15c + 100);
}
DAT_0105d158 = _DAT_0105d15c == (CDirectorItemManager *)0x105d160;
}
if (local_2c != 0) {
(**(code **)(local_2c + 0x54))(local_2c,local_34,local_30,0,0,0);
return;
}
}
else {
if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
(iVar6 = ThreadGetCurrentId(), iVar11 == iVar6)) {
cVar5 = CVProfNode::ExitScope();
if (cVar5 != '\0') {
_DAT_0105d15c = *(CDirectorItemManager **)(_DAT_0105d15c + 100);
}
DAT_0105d158 = _DAT_0105d15c == (CDirectorItemManager *)0x105d160;
}
if (local_20 != (CDirectorItemManager *)0x0) {
(**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,0,0);
}
pCVar17 = *(CDirectorItemManager **)(this + 0x638);
/* try { // try from 00888576 to 008885f2 has its CatchHandler @ 0088a556 */
CDirectorScriptedEventManager::UpdateScriptedEvents();
local_3c = 0;
local_38 = 0.0;
if (___atan2f_finite == (CDirectorItemManager *)0x0) {
local_20 = (CDirectorItemManager *)0x0;
}
else {
pCVar17 = ___atan2f_finite;
(**(code **)(___atan2f_finite + 0x50))
(___atan2f_finite,&local_3c,0,0,0,0,"/data/src/game/server/terror/director.cpp",
0xe89,&Update()::tm_fmt,"(%s)%s","Unaccounted","UpdateMobSpawns()");
local_20 = ___atan2f_finite;
}
iVar11 = _DAT_0105db00;
local_28 = local_3c;
local_24 = local_38;
/* try { // try from 00888621 to 00888625 has its CatchHandler @ 0088a551 */
if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
(iVar6 = ThreadGetCurrentId(pCVar17), iVar11 == iVar6)) {
if (*(char **)_DAT_0105d15c != "UpdateMobSpawns()") {
/* try { // try from 0088a0e1 to 0088a0f2 has its CatchHandler @ 0088a551 */
_DAT_0105d15c =
(CDirectorItemManager *)
CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xcdc5cb,(char *)0x1,0xbfafa1);
}
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
/* try { // try from 00888631 to 00888635 has its CatchHandler @ 0088a482 */
UpdateMobSpawns(this);
iVar11 = _DAT_0105db00;
if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
(iVar6 = ThreadGetCurrentId(), iVar11 == iVar6)) {
cVar5 = CVProfNode::ExitScope();
if (cVar5 != '\0') {
_DAT_0105d15c = *(CDirectorItemManager **)(_DAT_0105d15c + 100);
}
DAT_0105d158 = _DAT_0105d15c == (CDirectorItemManager *)0x105d160;
}
if (local_20 != (CDirectorItemManager *)0x0) {
(**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,0,0);
}
/* try { // try from 0088868e to 00888712 has its CatchHandler @ 0088a556 */
cVar5 = CTerrorGameRules::HasPlayerControlledZombies();
if (cVar5 == '\0') {
local_3c = 0;
local_38 = 0.0;
if (___atan2f_finite == (CDirectorItemManager *)0x0) {
local_20 = (CDirectorItemManager *)0x0;
}
else {
(**(code **)(___atan2f_finite + 0x50))
(___atan2f_finite,&local_3c,0,0,0,0,"/data/src/game/server/terror/director.cpp",
0xe8f,&Update()::tm_fmt,"(%s)%s","Unaccounted","UpdateSpecialSpawns()");
local_20 = ___atan2f_finite;
}
iVar11 = _DAT_0105db00;
local_28 = local_3c;
local_24 = local_38;
/* try { // try from 00888f63 to 00888fb1 has its CatchHandler @ 0088a4b7 */
if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
(iVar6 = ThreadGetCurrentId(), iVar11 == iVar6)) {
if (*(char **)_DAT_0105d15c != "UpdateSpecialSpawns()") {
_DAT_0105d15c =
(CDirectorItemManager *)
CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xcdc5dd,(char *)0x1,0xbfafa1);
}
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
/* try { // try from 00888747 to 00888749 has its CatchHandler @ 0088a41d */
(**(code **)(*(int *)this + 0x58))(this);
iVar11 = _DAT_0105db00;
if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
(iVar6 = ThreadGetCurrentId(), iVar11 == iVar6)) {
cVar5 = CVProfNode::ExitScope();
if (cVar5 != '\0') {
_DAT_0105d15c = *(CDirectorItemManager **)(_DAT_0105d15c + 100);
}
DAT_0105d158 = _DAT_0105d15c == (CDirectorItemManager *)0x105d160;
}
if (local_20 != (CDirectorItemManager *)0x0) {
(**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,0,0);
}
}
else {
UpdateTankSpawns(this);
ForEachTerrorPlayer<GhostIndividualSpawn>((GhostIndividualSpawn *)&local_28);
cVar5 = CDirectorChallengeMode::TankRun(*(CDirectorChallengeMode **)(TheDirector + 0x648));
if ((cVar5 == '\0') && (*(int *)(director_allow_infected_bots._28_4_ + 0x30) != 0)) {
(**(code **)(*(int *)this + 0x58))(this);
}
}
/* try { // try from 0088879a to 00888850 has its CatchHandler @ 0088a556 */
UpdateTempHealthDecayRate(this);
iVar6 = GetScriptValue(this,"WaterSlowsMovement",1);
iVar11 = g_pGameRules;
if ((iVar6 != 0) != (bool)*(char *)(g_pGameRules + 0x495)) {
CGameRulesProxy::NotifyNetworkStateChanged();
*(bool *)(iVar11 + 0x495) = iVar6 != 0;
}
local_3c = 0;
local_38 = 0.0;
if (___atan2f_finite == (CDirectorItemManager *)0x0) {
local_20 = (CDirectorItemManager *)0x0;
}
else {
(**(code **)(___atan2f_finite + 0x50))
(___atan2f_finite,&local_3c,0,0,0,0,"/data/src/game/server/terror/director.cpp",
0xea6,&Update()::tm_fmt,"(%s)%s","Unaccounted","CreateRescuableSurvivors()");
local_20 = ___atan2f_finite;
}
iVar11 = _DAT_0105db00;
local_28 = local_3c;
local_24 = local_38;
/* try { // try from 0088887e to 00888882 has its CatchHandler @ 0088a4e6 */
if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
(iVar6 = ThreadGetCurrentId(), iVar11 == iVar6)) {
if (*(char **)_DAT_0105d15c != "CreateRescuableSurvivors()") {
/* try { // try from 0088a20a to 0088a21b has its CatchHandler @ 0088a4e6 */
_DAT_0105d15c =
(CDirectorItemManager *)
CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xcdc606,(char *)0x1,0xbfafa1);
}
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
pCVar10 = this;
/* try { // try from 0088888e to 00888892 has its CatchHandler @ 0088a52b */
CreateRescuableSurvivors(this);
iVar11 = _DAT_0105db00;
if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
(iVar6 = ThreadGetCurrentId(), iVar11 == iVar6)) {
pCVar10 = (CDirector *)_DAT_0105d15c;
cVar5 = CVProfNode::ExitScope();
if (cVar5 != '\0') {
_DAT_0105d15c = *(CDirectorItemManager **)(_DAT_0105d15c + 100);
}
DAT_0105d158 = _DAT_0105d15c == (CDirectorItemManager *)0x105d160;
}
if (local_20 != (CDirectorItemManager *)0x0) {
pCVar10 = (CDirector *)local_20;
(**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,0,0);
}
local_3c = 0;
local_38 = 0.0;
if (___atan2f_finite == (CDirectorItemManager *)0x0) {
local_20 = (CDirectorItemManager *)0x0;
}
else {
/* try { // try from 00888960 to 00888962 has its CatchHandler @ 0088a556 */
pCVar10 = (CDirector *)___atan2f_finite;
(**(code **)(___atan2f_finite + 0x50))
(___atan2f_finite,&local_3c,0,0,0,0,"/data/src/game/server/terror/director.cpp",
0xea8,&Update()::tm_fmt,"(%s)%s","Unaccounted","GetItemManager()->UpdateItems()");
local_20 = ___atan2f_finite;
}
iVar11 = _DAT_0105db00;
local_28 = local_3c;
local_24 = local_38;
/* try { // try from 00888991 to 00888995 has its CatchHandler @ 0088a4f5 */
if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
(iVar6 = ThreadGetCurrentId(pCVar10), iVar11 == iVar6)) {
if (*(char **)_DAT_0105d15c != "GetItemManager()->UpdateItems()") {
/* try { // try from 0088a2d5 to 0088a2e6 has its CatchHandler @ 0088a4f5 */
_DAT_0105d15c =
(CDirectorItemManager *)
CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xcdf108,(char *)0x1,0xbfafa1);
}
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
pCVar17 = *(CDirectorItemManager **)(this + 0x62c);
/* try { // try from 008889a7 to 008889ab has its CatchHandler @ 0088a505 */
CDirectorItemManager::UpdateItems(pCVar17);
iVar11 = _DAT_0105db00;
if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
(iVar6 = ThreadGetCurrentId(), iVar11 == iVar6)) {
pCVar17 = _DAT_0105d15c;
cVar5 = CVProfNode::ExitScope();
if (cVar5 != '\0') {
_DAT_0105d15c = *(CDirectorItemManager **)(_DAT_0105d15c + 100);
}
DAT_0105d158 = _DAT_0105d15c == (CDirectorItemManager *)0x105d160;
}
if (local_20 != (CDirectorItemManager *)0x0) {
pCVar17 = local_20;
(**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,0,0);
}
local_3c = 0;
local_38 = 0.0;
if (___atan2f_finite == (CDirectorItemManager *)0x0) {
local_20 = (CDirectorItemManager *)0x0;
}
else {
/* try { // try from 00888a7a to 00888a7c has its CatchHandler @ 0088a556 */
pCVar17 = ___atan2f_finite;
(**(code **)(___atan2f_finite + 0x50))
(___atan2f_finite,&local_3c,0,0,0,0,"/data/src/game/server/terror/director.cpp",
0xea9,&Update()::tm_fmt,"(%s)%s","Unaccounted","GetMusicBanks()->UpdateMusic()");
local_20 = ___atan2f_finite;
}
iVar11 = _DAT_0105db00;
local_28 = local_3c;
local_24 = local_38;
/* try { // try from 00888aab to 00888aaf has its CatchHandler @ 0088a4e1 */
if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
(iVar6 = ThreadGetCurrentId(pCVar17), iVar11 == iVar6)) {
if (*(char **)_DAT_0105d15c != "GetMusicBanks()->UpdateMusic()") {
/* try { // try from 0088a258 to 0088a269 has its CatchHandler @ 0088a4e1 */
_DAT_0105d15c =
(CDirectorItemManager *)
CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xcdf128,(char *)0x1,0xbfafa1);
}
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
this_02 = *(CDirectorMusicBanks **)(this + 0x630);
/* try { // try from 00888ac1 to 00888ac5 has its CatchHandler @ 0088a518 */
CDirectorMusicBanks::UpdateMusic(this_02);
iVar11 = _DAT_0105db00;
if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
(iVar6 = ThreadGetCurrentId(), iVar11 == iVar6)) {
this_02 = (CDirectorMusicBanks *)_DAT_0105d15c;
cVar5 = CVProfNode::ExitScope();
if (cVar5 != '\0') {
_DAT_0105d15c = *(CDirectorItemManager **)(_DAT_0105d15c + 100);
}
DAT_0105d158 = _DAT_0105d15c == (CDirectorItemManager *)0x105d160;
}
if (local_20 != (CDirectorItemManager *)0x0) {
this_02 = (CDirectorMusicBanks *)local_20;
(**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,0,0);
}
local_3c = 0;
local_38 = 0.0;
if (___atan2f_finite == (CDirectorItemManager *)0x0) {
local_20 = (CDirectorItemManager *)0x0;
}
else {
/* try { // try from 00888b94 to 00888b96 has its CatchHandler @ 0088a556 */
this_02 = (CDirectorMusicBanks *)___atan2f_finite;
(**(code **)(___atan2f_finite + 0x50))
(___atan2f_finite,&local_3c,0,0,0,0,"/data/src/game/server/terror/director.cpp",
0xeab,&Update()::tm_fmt,"(%s)%s","Unaccounted",
"GetScriptedEventManager()->UpdatePanicEvents()");
local_20 = ___atan2f_finite;
}
iVar11 = _DAT_0105db00;
local_28 = local_3c;
local_24 = local_38;
/* try { // try from 00888bc4 to 00888bc8 has its CatchHandler @ 0088a4a2 */
if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
(iVar6 = ThreadGetCurrentId(this_02), iVar11 == iVar6)) {
if (*(char **)_DAT_0105d15c != "GetScriptedEventManager()->UpdatePanicEvents()") {
/* try { // try from 0088a15e to 0088a16f has its CatchHandler @ 0088a4a2 */
_DAT_0105d15c =
(CDirectorItemManager *)
CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xcdf148,(char *)0x1,0xbfafa1);
}
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
this_03 = *(CDirectorScriptedEventManager **)(this + 0x638);
/* try { // try from 00888bda to 00888bde has its CatchHandler @ 0088a4a4 */
CDirectorScriptedEventManager::UpdatePanicEvents(this_03);
iVar11 = _DAT_0105db00;
if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
(iVar6 = ThreadGetCurrentId(), iVar11 == iVar6)) {
this_03 = (CDirectorScriptedEventManager *)_DAT_0105d15c;
cVar5 = CVProfNode::ExitScope();
if (cVar5 != '\0') {
_DAT_0105d15c = *(CDirectorItemManager **)(_DAT_0105d15c + 100);
}
DAT_0105d158 = _DAT_0105d15c == (CDirectorItemManager *)0x105d160;
}
if (local_20 != (CDirectorItemManager *)0x0) {
this_03 = (CDirectorScriptedEventManager *)local_20;
(**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,0,0);
}
local_3c = 0;
local_38 = 0.0;
if (___atan2f_finite == (CDirectorItemManager *)0x0) {
local_20 = (CDirectorItemManager *)0x0;
}
else {
/* try { // try from 00888cac to 00888cae has its CatchHandler @ 0088a556 */
this_03 = (CDirectorScriptedEventManager *)___atan2f_finite;
(**(code **)(___atan2f_finite + 0x50))
(___atan2f_finite,&local_3c,0,0,0,0,"/data/src/game/server/terror/director.cpp",
0xeac,&Update()::tm_fmt,"(%s)%s","Unaccounted","FadeOutQueuedEntities()");
local_20 = ___atan2f_finite;
}
iVar11 = _DAT_0105db00;
local_28 = local_3c;
local_24 = local_38;
/* try { // try from 00888cdc to 00888ce0 has its CatchHandler @ 0088a47c */
if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
(iVar6 = ThreadGetCurrentId(this_03), iVar11 == iVar6)) {
if (*(char **)_DAT_0105d15c != "FadeOutQueuedEntities()") {
/* try { // try from 0088a093 to 0088a0a4 has its CatchHandler @ 0088a47c */
_DAT_0105d15c =
(CDirectorItemManager *)
CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xcdc621,(char *)0x1,0xbfafa1);
}
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
/* try { // try from 00888cec to 00888cf0 has its CatchHandler @ 0088a492 */
FadeOutQueuedEntities(this);
iVar11 = _DAT_0105db00;
if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
(iVar6 = ThreadGetCurrentId(), iVar11 == iVar6)) {
cVar5 = CVProfNode::ExitScope();
if (cVar5 != '\0') {
_DAT_0105d15c = *(CDirectorItemManager **)(_DAT_0105d15c + 100);
}
DAT_0105d158 = _DAT_0105d15c == (CDirectorItemManager *)0x105d160;
}
if (local_20 != (CDirectorItemManager *)0x0) {
(**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,0,0);
}
*(undefined4 *)(this + 0x1c8) = 0;
iVar11 = *(int *)(this + 0x1c0);
*(undefined4 *)(this + 0x1cc) = 0;
*(undefined4 *)(this + 0x1c0) = 0;
if (0 < *(int *)(gpGlobals + 0x14)) {
iVar6 = 1;
do {
/* try { // try from 00888da4 to 00888e27 has its CatchHandler @ 0088a556 */
this_00 = (CBaseEntity *)UTIL_PlayerByIndex(iVar6);
/* try { // try from 008899f5 to 008899fa has its CatchHandler @ 0088a556 */
if (((this_00 != (CBaseEntity *)0x0) &&
(cVar5 = (**(code **)(*(int *)this_00 + 0x16c))(this_00), cVar5 != '\0')) &&
(((*(int *)(this_00 + 0x30) != 0 &&
((*(int *)(this_00 + 0x30) - *(int *)(gpGlobals + 0x58) >> 4 != 0 &&
(iVar7 = CBaseEntity::GetTeamNumber(this_00), iVar7 == 3)))) &&
((cVar5 = (**(code **)(*(int *)this_00 + 300))(this_00), cVar5 != '\0' ||
(cVar5 = (**(code **)(*(int *)this_00 + 0x778))(this_00), cVar5 == '\0')))))) {
iVar7 = CBaseEntity::GetTeamNumber(this_00);
/* try { // try from 00889853 to 008898a7 has its CatchHandler @ 0088a556 */
if ((iVar7 == 3) && (iVar7 = (**(code **)(*(int *)this_00 + 0x544))(this_00), iVar7 == 8))
{
piVar9 = (int *)(**(code **)(*(int *)this_00 + 0x148))(this_00);
cVar5 = (**(code **)(*(int *)this_00 + 300))(this_00);
if (cVar5 != '\0') {
if (piVar9 != (int *)0x0) {
piVar9 = (int *)(**(code **)(*piVar9 + 0xc4))(piVar9);
cVar5 = (**(code **)(*piVar9 + 0x114))(piVar9,0);
if (cVar5 != '\0') goto LAB_00888e1d;
}
*(int *)(this + 0x1c0) = *(int *)(this + 0x1c0) + 1;
}
}
else {
iVar7 = CBaseEntity::GetTeamNumber(this_00);
/* try { // try from 00889a4d to 00889bb8 has its CatchHandler @ 0088a556 */
if ((iVar7 != 3) ||
(iVar7 = (**(code **)(*(int *)this_00 + 0x544))(this_00), iVar7 != 7)) {
*(int *)(this + 0x1c8) = *(int *)(this + 0x1c8) + 1;
}
}
LAB_00888e1d:
cVar5 = (**(code **)(*(int *)this_00 + 0x778))(this_00);
if (cVar5 == '\0') {
*(int *)(this + 0x1cc) = *(int *)(this + 0x1cc) + 1;
}
}
iVar6 = iVar6 + 1;
} while (iVar6 <= *(int *)(gpGlobals + 0x14));
if ((*(int *)(this + 0x1c0) != 0) && (iVar11 == 0)) {
/* try { // try from 00888fe2 to 00889087 has its CatchHandler @ 0088a556 */
pCVar8 = (CTerrorPlayer *)
CDirectorTacticalServices::GetHighestFlowSurvivor
(*(CDirectorTacticalServices **)(this + 0x628),0);
if (pCVar8 == (CTerrorPlayer *)0x0) {
fVar13 = -9999.0;
}
else {
lVar12 = (longdouble)CTerrorPlayer::GetFlowDistance(pCVar8,0);
fVar13 = (float)lVar12;
}
*(float *)(this + 0x1c4) = fVar13;
}
}
local_3c = 0;
local_38 = 0.0;
if (___atan2f_finite == (CDirectorItemManager *)0x0) {
local_20 = (CDirectorItemManager *)0x0;
}
else {
(**(code **)(___atan2f_finite + 0x50))
(___atan2f_finite,&local_3c,0,0,0,0,"/data/src/game/server/terror/director.cpp",
0xeda,&Update()::tm_fmt,"(%s)%s","Unaccounted","UpdateTempo()");
local_20 = ___atan2f_finite;
}
iVar11 = _DAT_0105db00;
local_28 = local_3c;
local_24 = local_38;
/* try { // try from 008890b6 to 008890ba has its CatchHandler @ 0088a4cc */
if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
(iVar6 = ThreadGetCurrentId(), iVar11 == iVar6)) {
if (*(char **)_DAT_0105d15c != "UpdateTempo()") {
/* try { // try from 0088a016 to 0088a027 has its CatchHandler @ 0088a4cc */
_DAT_0105d15c =
(CDirectorItemManager *)
CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xcdc639,(char *)0x1,0xbfafa1);
}
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
/* try { // try from 008890c8 to 008890ca has its CatchHandler @ 0088a4b9 */
(**(code **)(*(int *)this + 0x18))(this);
iVar11 = _DAT_0105db00;
if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
(iVar6 = ThreadGetCurrentId(), iVar11 == iVar6)) {
cVar5 = CVProfNode::ExitScope();
if (cVar5 != '\0') {
_DAT_0105d15c = *(CDirectorItemManager **)(_DAT_0105d15c + 100);
}
DAT_0105d158 = _DAT_0105d15c == (CDirectorItemManager *)0x105d160;
}
if (local_20 != (CDirectorItemManager *)0x0) {
(**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,0,0);
}
/* try { // try from 0088912d to 0088926b has its CatchHandler @ 0088a556 */
CDirectorVersusMode::UpdateNonVirtual(*(CDirectorVersusMode **)(this + 0x63c));
if (this[0x161] != (CDirector)0x0) {
fVar13 = *(float *)(gpGlobals + 0x10);
lVar12 = (longdouble)
GetScriptValue(this,"MobRechargeRate",
*(float *)(DirectorPrivate_DirectorMobRechargeRate._28_4_ + 0x2c));
iVar11 = gpGlobals;
fVar13 = (float)lVar12 * fVar13 + *(float *)(this + 0x388);
*(float *)(this + 0x388) = fVar13;
uVar2 = DirectorPrivate_DirectorMobMaxSize._28_4_;
fVar13 = fVar13 * *(float *)(iVar11 + 0x10) + *(float *)(this + 900);
*(float *)(this + 900) = fVar13;
lVar12 = (longdouble)GetScriptValue(this,"MobMaxSize",*(float *)(uVar2 + 0x2c));
if ((float)lVar12 < fVar13) {
/* try { // try from 0088a388 to 0088a404 has its CatchHandler @ 0088a556 */
lVar12 = (longdouble)
GetScriptValue(this,"MobMaxSize",
*(float *)(DirectorPrivate_DirectorMobMaxSize._28_4_ + 0x2c));
*(float *)(this + 900) = (float)lVar12;
}
}
ForEachSurvivor<DispatchSurvivorsLeavingSpawn>(&local_45);
(**(code **)(*(int *)this + 0x50))(this);
local_3c = 0;
local_38 = 0.0;
if (___atan2f_finite == (CDirectorItemManager *)0x0) {
local_20 = (CDirectorItemManager *)0x0;
}
else {
(**(code **)(___atan2f_finite + 0x50))
(___atan2f_finite,&local_3c,0,0,0,0,"/data/src/game/server/terror/director.cpp",
0xef4,&Update()::tm_fmt,"(%s)%s","Unaccounted","UpdateScenarioState()");
local_20 = ___atan2f_finite;
}
iVar11 = _DAT_0105db00;
local_28 = local_3c;
local_24 = local_38;
/* try { // try from 0088929a to 0088929e has its CatchHandler @ 0088a47a */
if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
(iVar6 = ThreadGetCurrentId(), iVar11 == iVar6)) {
if (*(char **)_DAT_0105d15c != "UpdateScenarioState()") {
/* try { // try from 00889f99 to 00889faa has its CatchHandler @ 0088a47a */
_DAT_0105d15c =
(CDirectorItemManager *)
CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xcdc657,(char *)0x1,0xbfafa1);
}
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
/* try { // try from 008892aa to 008892ae has its CatchHandler @ 0088a53e */
UpdateScenarioState(this);
iVar11 = _DAT_0105db00;
if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
(iVar6 = ThreadGetCurrentId(), iVar11 == iVar6)) {
cVar5 = CVProfNode::ExitScope();
if (cVar5 != '\0') {
_DAT_0105d15c = *(CDirectorItemManager **)(_DAT_0105d15c + 100);
}
DAT_0105d158 = _DAT_0105d15c == (CDirectorItemManager *)0x105d160;
}
if (local_20 != (CDirectorItemManager *)0x0) {
(**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,0,0);
}
/* try { // try from 0088930a to 008893b9 has its CatchHandler @ 0088a556 */
AuditActivePipeBombs(this);
if (*(float *)(this + 0x240) <= 0.0) {
pCVar17 = (CDirectorItemManager *)(this + 0x238);
fVar13 = *(float *)(DirectorSurvivorMovementWindow._28_4_ + 0x2c) * 0.1;
pCVar18 = pCVar17;
lVar12 = (longdouble)CountdownTimer::Now();
if ((float)lVar12 + fVar13 != *(float *)(this + 0x240)) {
pCVar18 = pCVar17;
(**(code **)(*(int *)(this + 0x238) + 4))(pCVar17,this + 0x240);
*(float *)(this + 0x240) = (float)lVar12 + fVar13;
}
if (fVar13 != *(float *)(this + 0x23c)) {
(**(code **)(*(int *)(this + 0x238) + 4))(pCVar17,this + 0x23c);
*(float *)(this + 0x23c) = fVar13;
pCVar18 = pCVar17;
}
}
else {
pCVar17 = (CDirectorItemManager *)(this + 0x238);
pCVar18 = pCVar17;
lVar12 = (longdouble)CountdownTimer::Now();
if (*(float *)(this + 0x240) <= (float)lVar12) {
local_28 = 0;
local_24 = 0.0;
/* try { // try from 00889c67 to 00889d95 has its CatchHandler @ 0088a556 */
ForEachSurvivor<CalculateSurvivorSpan>((CalculateSurvivorSpan *)&local_28);
iVar11 = *(int *)(this + 0x1e4);
*(undefined4 *)(this + iVar11 * 4 + 0x1e8) = local_28;
*(float *)(this + iVar11 * 4 + 0x210) = local_24;
*(int *)(this + 0x1e4) = (iVar11 + 1) % 10;
if (*(float *)(this + 0x24c) <= local_24 && local_24 != *(float *)(this + 0x24c)) {
*(float *)(this + 0x24c) = local_24;
}
fVar13 = *(float *)(this + 0x210);
fVar16 = 0.0;
*(undefined4 *)(this + 0x244) = 0;
uVar2 = DirectorSurvivorMovementWindow._28_4_;
iVar11 = 0;
pCVar10 = this;
fVar14 = fVar13;
fVar15 = fVar13;
while( true ) {
iVar11 = iVar11 + 1;
if (fVar13 <= fVar14) {
fVar14 = fVar13;
}
if (fVar15 <= fVar13) {
fVar15 = fVar13;
}
fVar16 = fVar16 + (fVar13 - *(float *)(pCVar10 + 0x1e8));
if (iVar11 == 10) break;
fVar13 = *(float *)(pCVar10 + 0x214);
pCVar10 = pCVar10 + 4;
}
*(float *)(this + 0x244) = fVar16 * 0.1;
*(float *)(this + 0x248) = (fVar15 - fVar14) / *(float *)(uVar2 + 0x2c);
fVar13 = *(float *)(uVar2 + 0x2c) * 0.1;
pCVar18 = pCVar17;
lVar12 = (longdouble)CountdownTimer::Now();
if ((float)lVar12 + fVar13 != *(float *)(this + 0x240)) {
pCVar18 = pCVar17;
(**(code **)(*(int *)(this + 0x238) + 4))(pCVar17,this + 0x240);
*(float *)(this + 0x240) = (float)lVar12 + fVar13;
}
if (fVar13 != *(float *)(this + 0x23c)) {
(**(code **)(*(int *)(this + 0x238) + 4))(pCVar17,this + 0x23c);
*(float *)(this + 0x23c) = fVar13;
pCVar18 = pCVar17;
}
}
}
local_3c = 0;
local_38 = 0.0;
if (___atan2f_finite == (CDirectorItemManager *)0x0) {
local_20 = (CDirectorItemManager *)0x0;
}
else {
pCVar18 = ___atan2f_finite;
(**(code **)(___atan2f_finite + 0x50))
(___atan2f_finite,&local_3c,0,0,0,0,"/data/src/game/server/terror/director.cpp",
0xf25,&Update()::tm_fmt,"(%s)%s","Unaccounted",
"GetScriptedEventManager()->UpdateGauntlet()");
local_20 = ___atan2f_finite;
}
iVar11 = _DAT_0105db00;
local_28 = local_3c;
local_24 = local_38;
/* try { // try from 008893e7 to 008893eb has its CatchHandler @ 0088a468 */
if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
(iVar6 = ThreadGetCurrentId(pCVar18), iVar11 == iVar6)) {
if (*(char **)_DAT_0105d15c != "GetScriptedEventManager()->UpdateGauntlet()") {
/* try { // try from 00889f4b to 00889f5c has its CatchHandler @ 0088a468 */
_DAT_0105d15c =
(CDirectorItemManager *)
CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xcdf178,(char *)0x1,0xbfafa1);
}
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
/* try { // try from 008893fd to 00889401 has its CatchHandler @ 0088a46a */
CDirectorScriptedEventManager::UpdateGauntlet(*(CDirectorScriptedEventManager **)(this + 0x638))
;
iVar11 = _DAT_0105db00;
if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
(iVar6 = ThreadGetCurrentId(), iVar11 == iVar6)) {
cVar5 = CVProfNode::ExitScope();
if (cVar5 != '\0') {
_DAT_0105d15c = *(CDirectorItemManager **)(_DAT_0105d15c + 100);
}
DAT_0105d158 = _DAT_0105d15c == (CDirectorItemManager *)0x105d160;
}
if (local_20 != (CDirectorItemManager *)0x0) {
(**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,0,0);
}
if (*(float *)(this + 0x4dc) <= 0.0) {
fVar13 = *(float *)(this + 0x4e0);
pCVar17 = (CDirectorItemManager *)(this + 0x4d4);
pCVar18 = pCVar17;
lVar12 = (longdouble)CountdownTimer::Now();
if ((float)lVar12 + fVar13 != *(float *)(this + 0x4dc)) {
pCVar18 = pCVar17;
(**(code **)(*(int *)(this + 0x4d4) + 4))(pCVar17,this + 0x4dc);
*(float *)(this + 0x4dc) = (float)lVar12 + fVar13;
}
if (fVar13 != *(float *)(this + 0x4d8)) {
(**(code **)(*(int *)(this + 0x4d4) + 4))(pCVar17,this + 0x4d8);
*(float *)(this + 0x4d8) = fVar13;
pCVar18 = pCVar17;
}
}
else {
pCVar17 = (CDirectorItemManager *)(this + 0x4d4);
pCVar18 = pCVar17;
/* try { // try from 00889476 to 00889521 has its CatchHandler @ 0088a556 */
lVar12 = (longdouble)CountdownTimer::Now();
if (*(float *)(this + 0x4dc) <= (float)lVar12) {
pCVar10 = this + 0x4ac;
iVar11 = 3;
do {
if (*(int *)(this + iVar11 * 4 + 0x4c4) != 0) {
local_3c = 0;
local_38 = 0.0;
if (___atan2f_finite == (CDirectorItemManager *)0x0) {
local_20 = (CDirectorItemManager *)0x0;
}
else {
pCVar18 = ___atan2f_finite;
(**(code **)(___atan2f_finite + 0x50))
(___atan2f_finite,&local_3c,0,0,0,0,
"/data/src/game/server/terror/director.cpp",0xf2f,&Update()::tm_fmt,
"(%s)%s","Unaccounted","m_Scripts[i].Call( m_hScriptUpdateFuncs[i] )");
local_20 = ___atan2f_finite;
}
iVar6 = _DAT_0105db00;
local_28 = local_3c;
local_24 = local_38;
/* try { // try from 00889551 to 00889555 has its CatchHandler @ 0088a57f */
if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
(iVar7 = ThreadGetCurrentId(pCVar18), iVar6 == iVar7)) {
if (*(char **)_DAT_0105d15c != "m_Scripts[i].Call( m_hScriptUpdateFuncs[i] )") {
/* try { // try from 00889c06 to 00889c17 has its CatchHandler @ 0088a57f */
_DAT_0105d15c =
(CDirectorItemManager *)
CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xcdf1a4,(char *)0x1,0xbfafa1);
}
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
/* try { // try from 0088959a to 0088959c has its CatchHandler @ 0088a56c */
pCVar18 = g_pScriptVM;
(**(code **)(*(int *)g_pScriptVM + 0x50))
(g_pScriptVM,*(undefined4 *)(this + iVar11 * 4 + 0x4c4),0,0,0,
*(undefined4 *)pCVar10,1);
iVar6 = _DAT_0105db00;
if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
(iVar7 = ThreadGetCurrentId(), iVar6 == iVar7)) {
pCVar18 = _DAT_0105d15c;
cVar5 = CVProfNode::ExitScope();
if (cVar5 != '\0') {
_DAT_0105d15c = *(CDirectorItemManager **)(_DAT_0105d15c + 100);
}
DAT_0105d158 = _DAT_0105d15c == (CDirectorItemManager *)0x105d160;
}
if (local_20 != (CDirectorItemManager *)0x0) {
pCVar18 = local_20;
(**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,0,0);
}
}
iVar11 = iVar11 + -1;
pCVar10 = pCVar10 + -0xc;
} while (iVar11 != -1);
pCVar18 = pCVar17;
/* try { // try from 0088960d to 008896ac has its CatchHandler @ 0088a556 */
lVar12 = (longdouble)CountdownTimer::Now();
fVar13 = *(float *)(this + 0x4d8);
if ((float)lVar12 + fVar13 != *(float *)(this + 0x4dc)) {
(**(code **)(*(int *)(this + 0x4d4) + 4))(pCVar17,this + 0x4dc);
*(float *)(this + 0x4dc) = (float)lVar12 + fVar13;
pCVar18 = pCVar17;
}
}
}
local_3c = 0;
local_38 = 0.0;
if (___atan2f_finite == (CDirectorItemManager *)0x0) {
local_20 = (CDirectorItemManager *)0x0;
}
else {
pCVar18 = ___atan2f_finite;
(**(code **)(___atan2f_finite + 0x50))
(___atan2f_finite,&local_3c,0,0,0,0,"/data/src/game/server/terror/director.cpp",
0xf3b,&Update()::tm_fmt,"(%s)%s","Unaccounted",
"m_SurvivorCachedInfoForResponseRules.Update()");
local_20 = ___atan2f_finite;
}
iVar11 = _DAT_0105db00;
local_28 = local_3c;
local_24 = local_38;
/* try { // try from 008896db to 008896df has its CatchHandler @ 0088a584 */
if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
(iVar6 = ThreadGetCurrentId(pCVar18), iVar11 == iVar6)) {
if (*(char **)_DAT_0105d15c != "m_SurvivorCachedInfoForResponseRules.Update()") {
/* try { // try from 00889ece to 00889edf has its CatchHandler @ 0088a584 */
_DAT_0105d15c =
(CDirectorItemManager *)
CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xcdf1d4,(char *)0x1,0xbfafa1);
}
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
/* try { // try from 008896ee to 008896f2 has its CatchHandler @ 0088a589 */
SurvivorResponseCachedInfo::Update((SurvivorResponseCachedInfo *)(this + 0xc));
iVar11 = _DAT_0105db00;
if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
(iVar6 = ThreadGetCurrentId(), iVar11 == iVar6)) {
cVar5 = CVProfNode::ExitScope();
if (cVar5 != '\0') {
_DAT_0105d15c = *(CDirectorItemManager **)(_DAT_0105d15c + 100);
}
DAT_0105d158 = _DAT_0105d15c == (CDirectorItemManager *)0x105d160;
}
if (local_20 != (CDirectorItemManager *)0x0) {
(**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,0,0);
}
if (this[0x504] != (CDirector)0x0) {
/* try { // try from 00889790 to 008897d3 has its CatchHandler @ 0088a556 */
iVar11 = CGlobalEntityList::FindEntityByName
((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0,"branch_zoey",
(CBaseEntity *)0x0,(CBaseEntity *)0x0,(CBaseEntity *)0x0,
(IEntityFindFilter *)0x0);
if ((iVar11 == 0) ||
(this_01 = (CLogicBranch *)
__dynamic_cast(iVar11,&CBaseEntity::typeinfo,&CLogicBranch::typeinfo,0),
this_01 == (CLogicBranch *)0x0)) {
this[0x504] = (CDirector)0x0;
}
else {
this[0x504] = (CDirector)0x0;
cVar5 = CLogicBranch::GetLogicBranchState(this_01);
*(uint *)(this + 0x500) = ~-(uint)(cVar5 == '\0') + 6;
}
}
(**(code **)(*piVar3 + 0x6c))(piVar3);
iVar11 = _DAT_0105db00;
if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
(iVar6 = ThreadGetCurrentId(), iVar11 == iVar6)) {
cVar5 = CVProfNode::ExitScope();
if (cVar5 != '\0') {
_DAT_0105d15c = *(CDirectorItemManager **)(_DAT_0105d15c + 100);
}
DAT_0105d158 = _DAT_0105d15c == (CDirectorItemManager *)0x105d160;
}
if (local_2c != 0) {
(**(code **)(local_2c + 0x54))(local_2c,local_34,local_30,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.