Creatures update server-side

This commit is contained in:
2016-03-27 09:53:24 +11:00
parent 57f92a8b2e
commit 4ced27a905
7 changed files with 49 additions and 14 deletions
+7 -2
View File
@@ -29,9 +29,14 @@ CreatureManager::~CreatureManager() {
UnloadAll();
}
void CreatureManager::Update() {
//arg: a list of creatures to be updated in the clients
int CreatureManager::Update(std::list<CreatureData*>* creatureList) {
int ret;
for (auto& it : elementMap) {
it.second.Update();
ret = it.second.Update(lua);
if (ret) {
creatureList->push_back(&it.second);
}
}
}