D4D Bad version
D4D Good version
Load up the bad version and start playing normally. After a few minutes, you'll notice the frame rate starting to chug, and it only keeps getting worse until it comes to an outright crawl. Memory also slowly increases.
The good version doesn't have this issue. So what's the difference?
Under ZD4D/Doom4Player.txt, lines 847-879:
Code: Select all
//A_Overlay(Overlay_Cooldown1,"Overlay.Cooldown1",true);
//A_Overlay(Overlay_Cooldown2,"Overlay.Cooldown2",true);
//A_Overlay(Overlay_Cooldown3,"Overlay.Cooldown3",true);
//A_Overlay(Overlay_MovementHealthArmor,"Overlay.MovementHealthArmor",true); // This one does not cause the lag-downs.
// Don't change these.
A_Overlay(Overlay_LedgeGrab,"Overlay.LedgeGrab",true);
A_Overlay(99,"Overlay.Debug",true);
//A_Overlay(Overlay_AnglePitch,"Overlay.AnglePitch",true);
}
Super.PostBeginPlay();
}
//--------------------------------------------------------------------------
// Active Functions
//--------------------------------------------------------------------------
int CooldownTimer[3];
override void Tick()
{
static const int CooldownCaps[] = { 3, 2, 10 };
for (int i = 0; i < 3; i++)
{
CooldownTimer[i] = (CooldownTimer[i] + 1) % CooldownCaps[i];
}
if (!CooldownTimer[0]) ProcessCooldown1();
if (!CooldownTimer[1]) ProcessCooldown2();
if (!CooldownTimer[2]) ProcessCooldown3();
UpdateHAM(); //This is the cause of the issues.
Super.Tick();
}
UpdateHam(); on line 877
and uncomment
A_Overlay(Overlay_MovementHealthArmor,"Overlay.MovementHealthArmor",true); on line 850,
said issue will not happen.