diff options
author | Erik Schilling <ablu.erikschilling@googlemail.com> | 2013-04-28 11:52:08 +0200 |
---|---|---|
committer | Erik Schilling <ablu.erikschilling@googlemail.com> | 2013-05-02 21:45:54 +0200 |
commit | 0261eb73e5588f5732aef5df753311d488c45d06 (patch) | |
tree | d641b0cad81ea58b8d8680b002197a4f592ef4a9 /src/game-server/spawnareacomponent.cpp | |
parent | 23ccc8080a5283adce9f06909fc89b63d0e25452 (diff) | |
download | manaserv-0261eb73e5588f5732aef5df753311d488c45d06.tar.gz manaserv-0261eb73e5588f5732aef5df753311d488c45d06.tar.bz2 manaserv-0261eb73e5588f5732aef5df753311d488c45d06.tar.xz manaserv-0261eb73e5588f5732aef5df753311d488c45d06.zip |
Fixed a bunch of cppcheck warnings
Diffstat (limited to 'src/game-server/spawnareacomponent.cpp')
-rw-r--r-- | src/game-server/spawnareacomponent.cpp | 2 |
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); |