From fd392c16c0a1236ca4ea124b5ebbd309df1c5064 Mon Sep 17 00:00:00 2001 From: Guillaume Melquiond Date: Thu, 28 Jun 2007 15:23:09 +0000 Subject: Delegated creature insertion to the State class so that it does not disturb object updating. --- src/game-server/spawnarea.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/game-server') diff --git a/src/game-server/spawnarea.cpp b/src/game-server/spawnarea.cpp index bded9cc0..9d7687ff 100644 --- a/src/game-server/spawnarea.cpp +++ b/src/game-server/spawnarea.cpp @@ -65,7 +65,8 @@ SpawnArea::update() being->setMapId(1); being->setPosition(Point(mZone.x + rand() % mZone.w, mZone.y + rand() % mZone.h)); - gameState->insert(being); + DelayedEvent e = { EVENT_INSERT }; + gameState->enqueueEvent(being, e); mNumBeings++; } -- cgit v1.2.3-70-g09d2