add tracing for performance profiling
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include <algorithm>
|
||||
|
||||
#include "ShipSystem.h"
|
||||
#include "tracing.h"
|
||||
|
||||
WaveSystem::WaveSystem(const GameConfig& config, std::mt19937& rng)
|
||||
: m_config(config)
|
||||
@@ -15,6 +16,7 @@ WaveSystem::WaveSystem(const GameConfig& config, std::mt19937& rng)
|
||||
void WaveSystem::tickWaveScheduler(Tick currentTick, ShipSystem& ships,
|
||||
int worldHeightTiles)
|
||||
{
|
||||
TRACE();
|
||||
// 1. Advance boss countdown.
|
||||
--m_bossCountdownTicks;
|
||||
|
||||
@@ -75,6 +77,7 @@ void WaveSystem::tickWaveScheduler(Tick currentTick, ShipSystem& ships,
|
||||
|
||||
void WaveSystem::tickThreatAccumulation()
|
||||
{
|
||||
TRACE();
|
||||
const double x = static_cast<double>(m_bossWaveCounter);
|
||||
const double rate = m_config.world.waves.threatRateFormula.evaluate(x);
|
||||
if (rate > 0.0)
|
||||
|
||||
Reference in New Issue
Block a user