1
This commit is contained in:
parent
bfc2917467
commit
7c51eeabc4
@ -36,7 +36,7 @@ void Bullet::Initialize()
|
||||
ability_ = sender.Get()->GetAbility();
|
||||
is_curr_weapon = sender.Get()->GetCurrWeapon()->meta == gun_meta;
|
||||
create_frameno_ = room->GetFrameNo();
|
||||
if (gun_meta->i->equip_subtype() == GUN_SUB_EQUIP_TYPE_FLY_HOOk) {
|
||||
if (IsFlyHook()) {
|
||||
int buff_uniid = sender.Get()->TryAddBuff(sender.Get(), kVertigoBuffId);
|
||||
if (buff_uniid) {
|
||||
Buff* buff = sender.Get()->GetBuffByUniId(buff_uniid);
|
||||
@ -75,7 +75,7 @@ void Bullet::OnHit(std::set<Entity*>& objects)
|
||||
sender.Get()->context_dir = dir;
|
||||
sender.Get()->context_pos = GetPos();
|
||||
|
||||
if (gun_meta->i->equip_subtype() == GUN_SUB_EQUIP_TYPE_FLY_HOOk) {
|
||||
if (IsFlyHook()) {
|
||||
if (sender.Get() && !sender.Get()->dead) {
|
||||
for (auto& target : objects) {
|
||||
ProcFlyHook(target);
|
||||
@ -606,7 +606,7 @@ void Bullet::Check(float distance)
|
||||
}
|
||||
}
|
||||
if (need_remove) {
|
||||
if (gun_meta->i->equip_subtype() == GUN_SUB_EQUIP_TYPE_FLY_HOOk) {
|
||||
if (IsFlyHook()) {
|
||||
if (!hited) {
|
||||
sender.Get()->IncDisableMoveTimes();
|
||||
sender.Get()->IncDisableAttackDirTimes();
|
||||
@ -855,3 +855,8 @@ void Bullet::TriggerHitBuff(Entity* e)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool Bullet::IsFlyHook()
|
||||
{
|
||||
return gun_meta->i->equip_subtype() == GUN_SUB_EQUIP_TYPE_FLY_HOOk;
|
||||
}
|
||||
|
@ -48,6 +48,7 @@ class Bullet : public MoveableEntity
|
||||
void ForceRemove();
|
||||
void OnHit(std::set<Entity*>& objects);
|
||||
void TriggerHitBuff(Entity* e);
|
||||
bool IsFlyHook();
|
||||
|
||||
protected:
|
||||
Bullet();
|
||||
|
Loading…
x
Reference in New Issue
Block a user