1
This commit is contained in:
parent
675d17f1bb
commit
1b9aa8c34a
@ -951,7 +951,7 @@ void Room::CombineTeam()
|
||||
hum->auto_fill = true;
|
||||
hum->team_uuid = a8::XValue(room_uuid_).GetString();
|
||||
}
|
||||
for (size_t i = 0; i < 4 - accountid_hash_.size(); ++i) {
|
||||
for (size_t i = 0; i < MAX_TEAM_NUM - accountid_hash_.size(); ++i) {
|
||||
for (auto& pair : human_hash_) {
|
||||
Human* hum = pair.second;
|
||||
if (hum->IsAndroid() &&
|
||||
@ -1289,7 +1289,7 @@ void Room::RandRemoveAndroid()
|
||||
RemoveFromMoveableHash(hum);
|
||||
RemoveFromEntityHash(hum);
|
||||
RemoveFromHuamnHash(hum);
|
||||
removed_robot_hash_[hum->entity_uniid] = hum;
|
||||
AddToRemovedRobotHash(hum);
|
||||
--alive_count_;
|
||||
--App::Instance()->perf.alive_count;
|
||||
for (auto& pair : human_hash_) {
|
||||
@ -1300,7 +1300,8 @@ void Room::RandRemoveAndroid()
|
||||
|
||||
void Room::NotifyUiUpdate()
|
||||
{
|
||||
xtimer.AddDeadLineTimerAndAttach(0,
|
||||
xtimer.AddDeadLineTimerAndAttach
|
||||
(0,
|
||||
a8::XParams()
|
||||
.SetSender(this),
|
||||
[] (const a8::XParams& param)
|
||||
@ -1375,7 +1376,8 @@ bool Room::HaveMyTeam(const std::string& team_uuid)
|
||||
|
||||
void Room::NotifyWxVoip()
|
||||
{
|
||||
xtimer.AddDeadLineTimerAndAttach(0,
|
||||
xtimer.AddDeadLineTimerAndAttach
|
||||
(0,
|
||||
a8::XParams()
|
||||
.SetSender(this),
|
||||
[] (const a8::XParams& param)
|
||||
@ -1418,7 +1420,8 @@ BornPoint* Room::AllocBornPoint(Human* hum)
|
||||
}
|
||||
} else {
|
||||
for (auto& pair : born_point_hash_) {
|
||||
if (pair.second.player_num + pair.second.android_num < pair.second.thing_tpl->i->param1()) {
|
||||
if (pair.second.player_num + pair.second.android_num <
|
||||
pair.second.thing_tpl->i->param1()) {
|
||||
born_point = &pair.second;
|
||||
break;
|
||||
}
|
||||
@ -1454,7 +1457,6 @@ void Room::CreateSpawnPoints()
|
||||
|
||||
void Room::CreateLoots()
|
||||
{
|
||||
if (loots_) {
|
||||
for (auto& thing_tpl : *loots_) {
|
||||
int thing_id = thing_tpl->RandThing();
|
||||
MetaData::Equip* equip_meta = MetaMgr::Instance()->GetEquip(thing_id);
|
||||
@ -1484,15 +1486,14 @@ void Room::CreateLoots()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Room::CreateDropObjs()
|
||||
{
|
||||
if (buildings_) {
|
||||
for (auto& building : *buildings_) {
|
||||
for (auto& obj : building->meta->i->dropobj()) {
|
||||
CreateLoot(obj.id(),
|
||||
a8::Vec2(
|
||||
a8::Vec2
|
||||
(
|
||||
building->GetX() + obj.x() - building->meta->i->tilewidth() / 2.0,
|
||||
building->GetY() + obj.y() - building->meta->i->tileheight() / 2.0
|
||||
),
|
||||
@ -1502,7 +1503,6 @@ void Room::CreateDropObjs()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Room::IncBornPointHumanNum(BornPoint* point, Human* hum)
|
||||
{
|
||||
@ -1605,7 +1605,9 @@ void Room::SecondRandPoint()
|
||||
#endif
|
||||
for (auto& pair : accountid_hash_) {
|
||||
if (room_type_ == RT_MidBrid) {
|
||||
pair.second->on_grid_chg = std::bind(&Room::OnHumanGridChg, this, std::placeholders::_1);
|
||||
pair.second->on_grid_chg = std::bind(&Room::OnHumanGridChg,
|
||||
this,
|
||||
std::placeholders::_1);
|
||||
}
|
||||
}
|
||||
#ifdef DEBUG
|
||||
|
Loading…
x
Reference in New Issue
Block a user