summaryrefslogtreecommitdiff
path: root/src/game-server/spawnareacomponent.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2013-05-03 15:40:57 +0200
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2013-05-03 15:40:57 +0200
commited8fba0a47d2e498267cbfbf1271bacb76c400e9 (patch)
treed9e2bec54c051edb9d6c4175c3e5e5532e8d35ce /src/game-server/spawnareacomponent.cpp
parent769030e6bd22faeb760731172c221ae801c04dcc (diff)
parentf6f27a9ffaf72f9856240db1bb788a9efa3e86f0 (diff)
downloadmanaserv-ed8fba0a47d2e498267cbfbf1271bacb76c400e9.tar.gz
manaserv-ed8fba0a47d2e498267cbfbf1271bacb76c400e9.tar.bz2
manaserv-ed8fba0a47d2e498267cbfbf1271bacb76c400e9.tar.xz
manaserv-ed8fba0a47d2e498267cbfbf1271bacb76c400e9.zip
Merge branch 'master' into lpc2012
Diffstat (limited to 'src/game-server/spawnareacomponent.cpp')
-rw-r--r--src/game-server/spawnareacomponent.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/game-server/spawnareacomponent.cpp b/src/game-server/spawnareacomponent.cpp
index 54cb017f..33bd5acd 100644
--- a/src/game-server/spawnareacomponent.cpp
+++ b/src/game-server/spawnareacomponent.cpp
@@ -58,7 +58,6 @@ void SpawnAreaComponent::update(Entity &entity)
}
// Find a free spawn location. Give up after 10 tries
- int triesLeft = 10;
Point position;
const int x = mZone.x;
const int y = mZone.y;
@@ -81,6 +80,7 @@ void SpawnAreaComponent::update(Entity &entity)
if (being)
{
+ int triesLeft = 10;
do
{
position = Point(x + rand() % width, y + rand() % height);