This commit is contained in:
aozhiwei 2024-03-06 11:10:51 +08:00
parent bef93e4fc2
commit eb918193e6
2 changed files with 18 additions and 3 deletions

View File

@ -20,14 +20,29 @@ void SelectTargetWithSpecPosBuff::Activate()
meta->GetBuffParam7(this)
);
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
(
[this, &targets, &center] (Creature* c, bool& stop)
[this, &targets, &center, include_car, exclude_passenger] (Creature* c, bool& stop)
{
if (c->dead ||
c->IsCar()) {
(c->IsCar() && !include_car) ||
a8::HasBitFlag(c->status, CS_Disable) ||
c->HasBuffEffect(kBET_Dive)
) {
return;
}
if (exclude_passenger) {
if (c->HasBuffEffect(kBET_Driver) &&
c->HasBuffEffect(kBET_Passenger)) {
return;
}
}
float distance = c->GetPos().Distance2D2(center);
#ifdef MYDEBUG
if (c->IsPlayer()) {

View File

@ -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",
{
GetAttackDir().x,