1
This commit is contained in:
parent
540db91267
commit
abfe1e71d8
@ -114,10 +114,6 @@ void Room::UnInit()
|
||||
delete pair.second;
|
||||
}
|
||||
later_add_hash_.clear();
|
||||
for (auto& pair : removed_robot_hash_) {
|
||||
delete pair.second;
|
||||
}
|
||||
removed_robot_hash_.clear();
|
||||
grid_service.UnInit();
|
||||
map_service.UnInit();
|
||||
}
|
||||
@ -909,37 +905,6 @@ void Room::AddObjectLater(Entity* entity)
|
||||
&entity->xtimer_attacher.timer_list_);
|
||||
}
|
||||
|
||||
void Room::RandRemoveAndroid()
|
||||
{
|
||||
Human* hum = nullptr;
|
||||
for (auto& pair : human_hash_) {
|
||||
if (pair.second->entity_subtype == kEST_Android) {
|
||||
hum = pair.second;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (hum) {
|
||||
if (hum->team_id != 0) {
|
||||
team_hash_.erase(hum->team_id);
|
||||
}
|
||||
for (auto& cell : hum->grid_list) {
|
||||
for (Human* target : cell->human_list) {
|
||||
target->AddOutObjects(hum);
|
||||
}
|
||||
cell->human_list.erase(hum);
|
||||
}
|
||||
born_point_human_hash_.erase(hum->born_point);
|
||||
moveable_hash_.erase(hum->entity_uniid);
|
||||
uniid_hash_.erase(hum->entity_uniid);
|
||||
human_hash_.erase(hum->entity_uniid);
|
||||
removed_robot_hash_[hum->entity_uniid] = hum;
|
||||
--alive_count_;
|
||||
for (auto& pair : human_hash_) {
|
||||
pair.second->RemovePartObjects(hum);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Room::NotifyUiUpdate()
|
||||
{
|
||||
xtimer.AddDeadLineTimerAndAttach(0,
|
||||
|
@ -126,7 +126,6 @@ private:
|
||||
Obstacle* InternalCreateObstacle(int id, float x, float y,
|
||||
std::function<void (Obstacle*)> on_precreate);
|
||||
void AddObjectLater(Entity* entity);
|
||||
void RandRemoveAndroid();
|
||||
void NotifyUiUpdate();
|
||||
void NotifyWxVoip();
|
||||
void BattleReport();
|
||||
@ -148,7 +147,6 @@ private:
|
||||
std::vector<MetaData::MapTplThing>* born_points_ = nullptr;
|
||||
xtimer_list* battle_report_timer_ = nullptr;
|
||||
|
||||
std::set<int> refreshed_robot_set_;
|
||||
std::map<int, std::set<Human*>> team_hash_;
|
||||
std::map<std::string, Player*> accountid_hash_;
|
||||
std::map<int, Entity*> moveable_hash_;
|
||||
@ -157,7 +155,5 @@ private:
|
||||
std::map<int, Human*> human_hash_;
|
||||
|
||||
std::map<int, std::set<int>> airdrop_hash_;
|
||||
std::map<int, Human*> removed_robot_hash_;
|
||||
|
||||
std::map<std::string, RoomMember> members_hash_;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user