This commit is contained in:
aozhiwei 2022-11-15 21:00:44 +08:00
parent 1ee8021f1a
commit 49286ef147

View File

@ -85,9 +85,9 @@ void Bullet::OnHit(std::set<Entity*>& objects)
if (sender.Get() && !sender.Get()->dead) {
for (auto& target : objects) {
Creature* c = target->IsCreature(room) ? (Creature*)target : nullptr;
if (!(c && c->IsCar())) {
ProcFlyHook(target);
if (!c || (c->team_id != sender.Get()->team_id)) {
if (!c || !c->IsCar()) {
target->OnBulletHit(this);
}
}
@ -865,8 +865,8 @@ void Bullet::ProcFlyHook(Entity* target)
return;
}
if (target->IsCreature(room)) {
Creature* c = (Creature*)target;
if (target->IsCreature(room) && !c->IsCar()) {
room->frame_event.AddPropChg(c->GetWeakPtrRef(), kPropBeHook, 0, sender.Get()->GetUniId());
std::vector<int> buff_uniids;
for (int buff_id : gun_meta->hit_buff_list) {