Added respawning rabbits
This commit is contained in:
@@ -32,11 +32,11 @@ BarrierManager::~BarrierManager() {
|
||||
}
|
||||
|
||||
//arg: a list of barriers to be updated in the clients
|
||||
void BarrierManager::Update(std::list<std::pair<const int, BarrierData*>>* barrierList) {
|
||||
void BarrierManager::Update(std::list<std::pair<const int, BarrierData*>>* barrierList, bool updateAll) {
|
||||
int ret;
|
||||
for (auto& it : elementMap) {
|
||||
ret = it.second.Update(lua);
|
||||
if (ret) {
|
||||
if (ret || updateAll) {
|
||||
barrierList->push_back(std::pair<const int, BarrierData*>(it.first, &it.second));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ public:
|
||||
~BarrierManager();
|
||||
|
||||
//common public methods
|
||||
void Update(std::list<std::pair<const int, BarrierData*>>* barrierList);
|
||||
void Update(std::list<std::pair<const int, BarrierData*>>* barrierList, bool updateAll);
|
||||
|
||||
int Create(int instanceIndex);
|
||||
void Unload(int uid);
|
||||
|
||||
Reference in New Issue
Block a user