1
This commit is contained in:
parent
f747efb205
commit
59c2c8ccb1
@ -1040,6 +1040,9 @@ void Bullet::ProcRequestBulletDmg(int shield_hit, int strength_wall_uniid, int t
|
|||||||
if (room->OverBorder(GetPos().ToGlmVec3(), gun_meta->bullet_rad())) {
|
if (room->OverBorder(GetPos().ToGlmVec3(), gun_meta->bullet_rad())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (!sender.Get()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
GetMutablePos().FromGlmVec3(pos);
|
GetMutablePos().FromGlmVec3(pos);
|
||||||
room->grid_service->MoveBullet(this);
|
room->grid_service->MoveBullet(this);
|
||||||
|
@ -1511,6 +1511,7 @@ void Room::CombineTeam()
|
|||||||
int total_count = 0;
|
int total_count = 0;
|
||||||
for (auto& pair : team_hash_) {
|
for (auto& pair : team_hash_) {
|
||||||
Team* team = pair.second;
|
Team* team = pair.second;
|
||||||
|
if (!team->AllIsRunAway()) {
|
||||||
team->TraverseMembers
|
team->TraverseMembers
|
||||||
(
|
(
|
||||||
[this, team, &first_team_id, &total_count, &need_combine_teams] (Human* member) -> bool
|
[this, team, &first_team_id, &total_count, &need_combine_teams] (Human* member) -> bool
|
||||||
@ -1526,6 +1527,7 @@ void Room::CombineTeam()
|
|||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (total_count <= 1) {
|
if (total_count <= 1) {
|
||||||
return;
|
return;
|
||||||
|
@ -213,6 +213,9 @@ void Team::SendTeamBattleReport(Human* sender)
|
|||||||
if (!player) {
|
if (!player) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (AllIsRunAway()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
std::shared_ptr<a8::MutableXObject> post_data = a8::MutableXObject::CreateObject();
|
std::shared_ptr<a8::MutableXObject> post_data = a8::MutableXObject::CreateObject();
|
||||||
GenBattleReportData(player, post_data.get());
|
GenBattleReportData(player, post_data.get());
|
||||||
@ -466,3 +469,13 @@ void Team::RunAway(Human* hum)
|
|||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Team::AllIsRunAway()
|
||||||
|
{
|
||||||
|
for (Human* hum : members_) {
|
||||||
|
if (!hum->stats->is_run_away) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
@ -50,6 +50,7 @@ class Team
|
|||||||
void GenBattleReportData(Human* player, a8::MutableXObject* params);
|
void GenBattleReportData(Human* player, a8::MutableXObject* params);
|
||||||
void GenBattleUuid();
|
void GenBattleUuid();
|
||||||
void RunAway(Human* hum);
|
void RunAway(Human* hum);
|
||||||
|
bool AllIsRunAway();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int team_id_ = 0;
|
int team_id_ = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user