1
This commit is contained in:
parent
3ba8905c44
commit
0784394099
@ -167,6 +167,13 @@ void Human::CarShot(const glm::vec3& target_dir)
|
|||||||
void Human::BeKill(int killer_id, const std::string& killer_name, int weapon_id,
|
void Human::BeKill(int killer_id, const std::string& killer_name, int weapon_id,
|
||||||
int real_killer_id, const std::string& real_killer_name)
|
int real_killer_id, const std::string& real_killer_name)
|
||||||
{
|
{
|
||||||
|
#ifdef DEBUG
|
||||||
|
{
|
||||||
|
if (a8::HasBitFlag(status, CS_CrazeMode)) {
|
||||||
|
int i = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
if (!dead && !room->IsGameOver() && !real_dead && !a8::HasBitFlag(status, CS_PreDieSuspended)) {
|
if (!dead && !room->IsGameOver() && !real_dead && !a8::HasBitFlag(status, CS_PreDieSuspended)) {
|
||||||
GetTrigger()->PreDie(killer_id, weapon_id);
|
GetTrigger()->PreDie(killer_id, weapon_id);
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
@ -92,6 +92,10 @@ void Incubator::AllocAndroid(Human* target, int num, std::vector<Human*>* androi
|
|||||||
if (room->GetFrameNo() < wait_alloc_time_ * SERVER_FRAME_RATE) {
|
if (room->GetFrameNo() < wait_alloc_time_ * SERVER_FRAME_RATE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (hold_humans_.size() <= 6 && room->GetGasData().new_area_meta->GetSmallRingCount() < 3) {
|
||||||
|
ShowHand();
|
||||||
|
return;
|
||||||
|
}
|
||||||
#if 1
|
#if 1
|
||||||
num = 1;
|
num = 1;
|
||||||
#endif
|
#endif
|
||||||
@ -152,9 +156,6 @@ void Incubator::AllocAndroid(Human* target, int num, std::vector<Human*>* androi
|
|||||||
room->BroadcastDebugMsg(a8::Format("投放机器人 分配失败 %d", {hold_humans_.size()}));
|
room->BroadcastDebugMsg(a8::Format("投放机器人 分配失败 %d", {hold_humans_.size()}));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (hold_humans_.size() <= 6 && room->GetGasData().new_area_meta->GetSmallRingCount() < 3) {
|
|
||||||
ShowHand();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Incubator::RecycleAndroid(Human* hum)
|
void Incubator::RecycleAndroid(Human* hum)
|
||||||
@ -214,7 +215,11 @@ bool Incubator::CanSee(Human* hum, Human* exclude_hum)
|
|||||||
(
|
(
|
||||||
[target, exclude_hum, &can_see] (Human* hum) -> bool
|
[target, exclude_hum, &can_see] (Human* hum) -> bool
|
||||||
{
|
{
|
||||||
|
#if 1
|
||||||
|
{
|
||||||
|
#else
|
||||||
if (hum != exclude_hum) {
|
if (hum != exclude_hum) {
|
||||||
|
#endif
|
||||||
if (target->GetPos().ManhattanDistance2D(hum->GetPos()) <
|
if (target->GetPos().ManhattanDistance2D(hum->GetPos()) <
|
||||||
mt::Param::s().incubator_canset_distance) {
|
mt::Param::s().incubator_canset_distance) {
|
||||||
can_see = true;
|
can_see = true;
|
||||||
@ -232,7 +237,7 @@ void Incubator::AutoAllocAndroid()
|
|||||||
case GasWaiting:
|
case GasWaiting:
|
||||||
case GasMoving:
|
case GasMoving:
|
||||||
{
|
{
|
||||||
if (!hold_humans_.empty() && room->AliveCount() > 6) {
|
if (!hold_humans_.empty() && hold_humans_.size() > 6) {
|
||||||
Human* hum = hold_humans_[0];
|
Human* hum = hold_humans_[0];
|
||||||
if (room->GetGasData().GetGasMode() == GasWaiting &&
|
if (room->GetGasData().GetGasMode() == GasWaiting &&
|
||||||
hold_humans_.size() > 1 &&
|
hold_humans_.size() > 1 &&
|
||||||
@ -479,7 +484,7 @@ void Incubator::NextWave()
|
|||||||
void Incubator::ShowHand()
|
void Incubator::ShowHand()
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
a8::XPrintf("ShowHand\n", {});
|
a8::XPrintf("ShowHand hold_humans_.size:%d\n", {hold_humans_.size()});
|
||||||
#endif
|
#endif
|
||||||
for (auto& hum : hold_humans_) {
|
for (auto& hum : hold_humans_) {
|
||||||
glm::vec3 point = glm::vec3(room->GetGasData().new_area_meta->GetLastArea()->x1(),
|
glm::vec3 point = glm::vec3(room->GetGasData().new_area_meta->GetLastArea()->x1(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user