Added respawning rabbits
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
~CreatureManager();
|
||||
|
||||
//common public methods
|
||||
void Update(std::list<std::pair<const int, CreatureData*>>* creatureList);
|
||||
void Update(std::list<std::pair<const int, CreatureData*>>* creatureList, bool updateAll);
|
||||
|
||||
int Create(std::string avatar, int scriptRef);
|
||||
void Unload(int uid);
|
||||
|
||||
Reference in New Issue
Block a user