diff options
Diffstat (limited to 'src/game-server/spawnarea.cpp')
-rw-r--r-- | src/game-server/spawnarea.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/game-server/spawnarea.cpp b/src/game-server/spawnarea.cpp index 56430473..9d7a4eb2 100644 --- a/src/game-server/spawnarea.cpp +++ b/src/game-server/spawnarea.cpp @@ -30,7 +30,6 @@ /* * TODO: Take into account spawn rate. - * TODO: Be a death listener to spawned monsters, to adjust mNumBeings. * TODO: Allow specifying being type and use it. */ @@ -51,6 +50,7 @@ SpawnArea::update() while (mNumBeings < mMaxBeings) { Being *being = new Monster(); + being->addDeathListener(this); // some bogus stats for testing being->setSpeed(150); @@ -66,3 +66,9 @@ SpawnArea::update() mNumBeings++; } } + +void +SpawnArea::died(Being *being) +{ + mNumBeings--; +} |