This commit is contained in:
aozhiwei 2022-08-11 19:39:37 +08:00
parent ff00226f3d
commit 2ef15fc823
2 changed files with 17 additions and 1 deletions

View File

@ -471,6 +471,22 @@ void Bullet::Check(float distance)
{
Buff* hold_shield_buff = c->GetBuffByEffectId(kBET_HoldShield);
if (hold_shield_buff && !IsBomb()) {
float shot_angle = 0.0f;
if (c->GetMoveDir().IsZero()) {
shot_angle = dir.CalcAngleEx(a8::Vec2::UP);
} else {
shot_angle = dir.CalcAngleEx(c->GetMoveDir());
}
if (shot_angle < A8_PI / 4) {
eat = true;
stop = true;
return;
} else if (fabs(shot_angle) < 0.000001f &&
shot_angle + A8_PI < A8_PI / 4){
eat = true;
stop = true;
return;
}
}
}
AabbCollider aabb_box;

@ -1 +1 @@
Subproject commit 11776870c4cf0c2c9d0a423a4cc597c9d0927a94
Subproject commit 3e5ad07a23e6157161c7971994d349e5fdcb4e31