1
This commit is contained in:
parent
ff00226f3d
commit
2ef15fc823
@ -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;
|
||||
|
2
third_party/a8engine
vendored
2
third_party/a8engine
vendored
@ -1 +1 @@
|
||||
Subproject commit 11776870c4cf0c2c9d0a423a4cc597c9d0927a94
|
||||
Subproject commit 3e5ad07a23e6157161c7971994d349e5fdcb4e31
|
Loading…
x
Reference in New Issue
Block a user