This commit is contained in:
aozhiwei 2019-07-13 15:35:24 +08:00
parent 3630f73b8e
commit b573c649bf
4 changed files with 14 additions and 0 deletions

View File

@ -205,6 +205,15 @@ void FrameEvent::RemoveBuff(Human* hum, int buff_id)
}
}
void FrameEvent::AddPropertyChg(Human* hum)
{
for (auto& cell : hum->grid_list) {
for (auto& hum : cell->human_list) {
hum->property_chged_humans_.insert(hum);
}
}
}
void FrameEvent::Clear()
{
if (!explosions_.empty()) {

View File

@ -22,6 +22,7 @@ public:
void AddRevive(Human* hum);
void AddBuff(Human* hum, Buff* buff);
void RemoveBuff(Human* hum, int buff_id);
void AddPropertyChg(Human* hum);
void Clear();
private:

View File

@ -1694,6 +1694,9 @@ void Human::ClearFrameData()
if (!dead_objs_.empty()) {
dead_objs_.clear();
}
if (!property_chged_humans_.empty()) {
property_chged_humans_.clear();
}
}
void Human::DeadDrop()

View File

@ -250,6 +250,7 @@ protected:
std::vector<int> chged_buffs_;
std::vector<int> revive_objs_;
std::vector<int> dead_objs_;
std::set<Human*> property_chged_humans_;
std::set<Human*> observers_;
Human* follow_target_ = nullptr;
bool follow_synced_active_player = false;