添加处理
This commit is contained in:
parent
31356be871
commit
80a229baa0
@ -26,6 +26,7 @@
|
|||||||
#include "entityfactory.h"
|
#include "entityfactory.h"
|
||||||
|
|
||||||
const int ROOM_MAX_PLAYER_NUM = 40;
|
const int ROOM_MAX_PLAYER_NUM = 40;
|
||||||
|
const int SHUA_RANGE = 731;
|
||||||
|
|
||||||
static long long RoomXGetTickCount(void* context)
|
static long long RoomXGetTickCount(void* context)
|
||||||
{
|
{
|
||||||
@ -1836,7 +1837,7 @@ void Room::ProcShuaAndroid(int shua_time, int shua_num)
|
|||||||
a8::Vec2 pos = target->GetPos();
|
a8::Vec2 pos = target->GetPos();
|
||||||
a8::Vec2 dir = a8::Vec2::UP;
|
a8::Vec2 dir = a8::Vec2::UP;
|
||||||
dir.Rotate(a8::RandAngle());
|
dir.Rotate(a8::RandAngle());
|
||||||
pos = pos + dir * 400;
|
pos = pos + dir * SHUA_RANGE;
|
||||||
if (OverBorder(pos, hum->GetRadius())) {
|
if (OverBorder(pos, hum->GetRadius())) {
|
||||||
pos.x = target->GetPos().x;
|
pos.x = target->GetPos().x;
|
||||||
if (OverBorder(pos, hum->GetRadius())) {
|
if (OverBorder(pos, hum->GetRadius())) {
|
||||||
@ -1982,6 +1983,7 @@ void Room::CheckAutoDie(Human* target,
|
|||||||
},
|
},
|
||||||
&target->xtimer_attacher.timer_list_);
|
&target->xtimer_attacher.timer_list_);
|
||||||
} else {
|
} else {
|
||||||
|
bool killed = false;
|
||||||
for (auto& pair : human_hash_) {
|
for (auto& pair : human_hash_) {
|
||||||
if (pair.second->GetEntityUniId() != target->GetEntityUniId() &&
|
if (pair.second->GetEntityUniId() != target->GetEntityUniId() &&
|
||||||
pair.second->IsAndroid() &&
|
pair.second->IsAndroid() &&
|
||||||
@ -1993,9 +1995,16 @@ void Room::CheckAutoDie(Human* target,
|
|||||||
hum->name,
|
hum->name,
|
||||||
hum->curr_weapon->weapon_id);
|
hum->curr_weapon->weapon_id);
|
||||||
}
|
}
|
||||||
|
killed = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!killed) {
|
||||||
|
a8::UnSetBitFlag(target->status, HS_Disable);
|
||||||
|
target->BeKill(VP_SafeArea,
|
||||||
|
"毒圈",
|
||||||
|
VW_SafeArea);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user