Added respawning rabbits

This commit is contained in:
2016-04-14 23:33:39 +10:00
parent cc6981e35f
commit fb2d49f1e0
8 changed files with 80 additions and 12 deletions
+2 -2
View File
@@ -32,11 +32,11 @@ CreatureManager::~CreatureManager() {
}
//arg: a list of creatures to be updated in the clients
void CreatureManager::Update(std::list<std::pair<const int, CreatureData*>>* creatureList) {
void CreatureManager::Update(std::list<std::pair<const int, CreatureData*>>* creatureList, bool updateAll) {
int ret;
for (auto& it : elementMap) {
ret = it.second.Update(lua);
if (ret) {
if (ret || updateAll) {
creatureList->push_back(std::pair<const int, CreatureData*>(it.first, &it.second));
}
}