add perf.alive_count
This commit is contained in:
parent
e728ab7442
commit
7241eb96a2
@ -169,6 +169,7 @@ void Room::AddPlayer(Player* hum)
|
|||||||
accountid_hash_[hum->account_id] = hum;
|
accountid_hash_[hum->account_id] = hum;
|
||||||
human_hash_[hum->entity_uniid] = hum;
|
human_hash_[hum->entity_uniid] = hum;
|
||||||
++alive_count_;
|
++alive_count_;
|
||||||
|
++App::Instance()->perf.alive_count,
|
||||||
grid_service.AddHuman(hum);
|
grid_service.AddHuman(hum);
|
||||||
hum->FindLocation();
|
hum->FindLocation();
|
||||||
hum->RefreshView();
|
hum->RefreshView();
|
||||||
@ -263,6 +264,7 @@ void Room::CreateAndroid(int robot_num)
|
|||||||
moveable_hash_[hum->entity_uniid] = hum;
|
moveable_hash_[hum->entity_uniid] = hum;
|
||||||
human_hash_[hum->entity_uniid] = hum;
|
human_hash_[hum->entity_uniid] = hum;
|
||||||
++alive_count_;
|
++alive_count_;
|
||||||
|
++App::Instance()->perf.alive_count
|
||||||
grid_service.AddHuman(hum);
|
grid_service.AddHuman(hum);
|
||||||
hum->FindLocation();
|
hum->FindLocation();
|
||||||
hum->RefreshView();
|
hum->RefreshView();
|
||||||
@ -628,6 +630,7 @@ void Room::OnHumanDie(Human* hum)
|
|||||||
frame_event.AddExplosionEx(hum, 0, hum->pos, 1);
|
frame_event.AddExplosionEx(hum, 0, hum->pos, 1);
|
||||||
}
|
}
|
||||||
--alive_count_;
|
--alive_count_;
|
||||||
|
--App::Instance()->perf.alive_count;
|
||||||
NotifyUiUpdate();
|
NotifyUiUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1384,6 +1387,7 @@ void Room::RandRemoveAndroid()
|
|||||||
human_hash_.erase(hum->entity_uniid);
|
human_hash_.erase(hum->entity_uniid);
|
||||||
removed_robot_hash_[hum->entity_uniid] = hum;
|
removed_robot_hash_[hum->entity_uniid] = hum;
|
||||||
--alive_count_;
|
--alive_count_;
|
||||||
|
--App::Instance()->perf.alive_count;
|
||||||
for (auto& pair : human_hash_) {
|
for (auto& pair : human_hash_) {
|
||||||
pair.second->RemovePartObjects(hum);
|
pair.second->RemovePartObjects(hum);
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
#include "framework/cpp/httpclientpool.h"
|
#include "framework/cpp/httpclientpool.h"
|
||||||
|
|
||||||
const int ROOM_NUM_LIMIT = 20;
|
const int ROOM_NUM_LIMIT = 0;
|
||||||
|
|
||||||
void RoomMgr::Init()
|
void RoomMgr::Init()
|
||||||
{
|
{
|
||||||
|
@ -12,6 +12,7 @@ struct PerfMonitor
|
|||||||
long long test_times = 0;
|
long long test_times = 0;
|
||||||
long long ray_times = 0;
|
long long ray_times = 0;
|
||||||
long long ray_time = 0;
|
long long ray_time = 0;
|
||||||
|
long long alive_count = 0;
|
||||||
std::array<long long, 30> params = {};
|
std::array<long long, 30> params = {};
|
||||||
std::array<int, 30> entity_num = {};
|
std::array<int, 30> entity_num = {};
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user