summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-06-28 15:23:09 +0000
committerGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-06-28 15:23:09 +0000
commitfd392c16c0a1236ca4ea124b5ebbd309df1c5064 (patch)
tree793694244eccb5997fdb7fef5e40771d26a96a5f
parent29ca04c5ddffd056535529a2491924883724f227 (diff)
downloadmanaserv-fd392c16c0a1236ca4ea124b5ebbd309df1c5064.tar.gz
manaserv-fd392c16c0a1236ca4ea124b5ebbd309df1c5064.tar.bz2
manaserv-fd392c16c0a1236ca4ea124b5ebbd309df1c5064.tar.xz
manaserv-fd392c16c0a1236ca4ea124b5ebbd309df1c5064.zip
Delegated creature insertion to the State class so that it does not disturb object updating.
-rw-r--r--ChangeLog5
-rw-r--r--src/game-server/spawnarea.cpp3
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 9605741f..8fe0f0c7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-06-16 Guillaume Melquiond <guillaume.melquiong@gmail.com>
+
+ * src/game-server/spawnarea.cpp: Delegated creature insertion to the
+ State class so that it does not disturb object updating.
+
2007-06-26 Eugenio Favalli <elvenprogrammer@gmail.com>
* accountserver.cbp: Updated project file.
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++;
}