This commit is contained in:
aozhiwei 2021-07-20 06:02:29 +00:00
parent 7d50b5df6f
commit 31646952f4

View File

@ -80,7 +80,7 @@ void Buff::ProcBatchAddBuff()
std::shared_ptr<Ability> old_context_ability = owner->context_ability;
a8::Vec2 old_context_dir = owner->context_dir;
a8::Vec2 old_context_pos = owner->context_pos;
owner->context_dir = owner->GetAttackDir()();
owner->context_dir = owner->GetAttackDir();
owner->context_pos = owner->GetPos();
for (auto& tuple : meta->batch_add_list) {
@ -570,7 +570,17 @@ void Buff::ProcAutoShot()
void Buff::ProcBeatBack()
{
if (caster_.Get()) {
if (std::abs(caster_.Get()->context_dir.x) > FLT_EPSILON ||
std::abs(caster_.Get()->context_dir.x) > FLT_EPSILON) {
if (std::abs(meta->int_param1) > 0) {
a8::Vec2 old_move_dir = owner->GetMoveDir();
owner->SetMoveDir(caster_.Get()->context_dir);
owner->_UpdateMove(meta->param1);
owner->SetMoveDir(old_move_dir);
}
}
}
}
void Buff::ProcDisperse()