1
This commit is contained in:
parent
bef93e4fc2
commit
eb918193e6
@ -20,14 +20,29 @@ void SelectTargetWithSpecPosBuff::Activate()
|
|||||||
meta->GetBuffParam7(this)
|
meta->GetBuffParam7(this)
|
||||||
);
|
);
|
||||||
std::vector<Creature*> targets;
|
std::vector<Creature*> targets;
|
||||||
|
bool include_car = false;
|
||||||
|
bool exclude_passenger = false;
|
||||||
|
if (!meta->_buff_param8_int_set.empty()) {
|
||||||
|
include_car = meta->_buff_param8_int_set.find(1) != meta->_buff_param8_int_set.end();
|
||||||
|
exclude_passenger = meta->_buff_param8_int_set.find(2) != meta->_buff_param8_int_set.end();
|
||||||
|
}
|
||||||
owner->TraverseCreatures
|
owner->TraverseCreatures
|
||||||
(
|
(
|
||||||
[this, &targets, ¢er] (Creature* c, bool& stop)
|
[this, &targets, ¢er, include_car, exclude_passenger] (Creature* c, bool& stop)
|
||||||
{
|
{
|
||||||
if (c->dead ||
|
if (c->dead ||
|
||||||
c->IsCar()) {
|
(c->IsCar() && !include_car) ||
|
||||||
|
a8::HasBitFlag(c->status, CS_Disable) ||
|
||||||
|
c->HasBuffEffect(kBET_Dive)
|
||||||
|
) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (exclude_passenger) {
|
||||||
|
if (c->HasBuffEffect(kBET_Driver) &&
|
||||||
|
c->HasBuffEffect(kBET_Passenger)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
float distance = c->GetPos().Distance2D2(center);
|
float distance = c->GetPos().Distance2D2(center);
|
||||||
#ifdef MYDEBUG
|
#ifdef MYDEBUG
|
||||||
if (c->IsPlayer()) {
|
if (c->IsPlayer()) {
|
||||||
|
@ -1038,7 +1038,7 @@ void Player::_CMMove(f8::MsgHdr* hdr, const cs::CMMove& msg)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef MYDEBUG1
|
#ifdef MYDEBUG
|
||||||
a8::XPrintf("attack_dir:%f,%f,%f cli_dir:%f,%f,%f\n",
|
a8::XPrintf("attack_dir:%f,%f,%f cli_dir:%f,%f,%f\n",
|
||||||
{
|
{
|
||||||
GetAttackDir().x,
|
GetAttackDir().x,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user