1
This commit is contained in:
parent
4912209451
commit
1c2414342f
@ -2471,47 +2471,6 @@ bool Room::HasPlayerInRound(const glm::vec3& pos, float rad)
|
||||
|
||||
void Room::CheckPartObjects(Human* testa, Human* testb)
|
||||
{
|
||||
#if 0
|
||||
for (auto& pair1 : human_hash_) {
|
||||
Human* a = pair1.second;
|
||||
for (auto& pair2 : human_hash_) {
|
||||
Human* b = pair2.second;
|
||||
if (testa && testb) {
|
||||
if ((a == testa && b == testb) ||
|
||||
(a == testb && b == testa)) {
|
||||
}
|
||||
}
|
||||
if (a->InPartObjects(b)) {
|
||||
if (!b->InPartObjects(a)) {
|
||||
A8_ABORT();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (auto& pair1 : human_hash_) {
|
||||
Human* huma = pair1.second;
|
||||
huma->TraverseAllLayerHumanList
|
||||
(
|
||||
[&huma, testa, testb] (Human* humb, bool& stop)
|
||||
{
|
||||
if (testa && testb) {
|
||||
if ((huma == testa && humb == testb) ||
|
||||
(huma == testb && humb == testa)) {
|
||||
}
|
||||
}
|
||||
if (a8::HasBitFlag(huma->status, CS_Disable) ||
|
||||
a8::HasBitFlag(humb->status, CS_Disable) ||
|
||||
huma->GetPartObjectsCount() <= 0
|
||||
) {
|
||||
return;
|
||||
}
|
||||
if (!huma->InPartObjects(humb)) {
|
||||
A8_ABORT();
|
||||
}
|
||||
});
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
bool Room::RuningInTimer()
|
||||
@ -2631,11 +2590,15 @@ std::shared_ptr<BornPoint> Room::ForceTakeBornPoint(Human* hum, std::shared_ptr<
|
||||
if (pre_point) {
|
||||
DecBornPointHumanNum(pre_point, hum);
|
||||
}
|
||||
for (auto& pair : human_hash_) {
|
||||
if (pair.second->GetBornPoint() == reserve_born_point) {
|
||||
ForceSetBornPoint(pair.second, pre_point);
|
||||
}
|
||||
}
|
||||
TraverseHumanList
|
||||
(
|
||||
[this, reserve_born_point, pre_point] (Human* ele_hum) -> bool
|
||||
{
|
||||
if (ele_hum->GetBornPoint() == reserve_born_point) {
|
||||
ForceSetBornPoint(ele_hum, pre_point);
|
||||
}
|
||||
return true;
|
||||
});
|
||||
return reserve_born_point;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user