This commit is contained in:
aozhiwei 2024-03-05 17:06:05 +08:00
parent 329937a74e
commit 3155c9edaf
2 changed files with 4 additions and 2 deletions

View File

@ -14,10 +14,11 @@ void BeatBackBuff::Activate()
#if 1
if (std::abs(caster_.Get()->GetAttackDir().x) > FLT_EPSILON ||
std::abs(caster_.Get()->GetAttackDir().y) > FLT_EPSILON) {
if (std::abs(meta->_int_buff_param1) > 0) {
float distance = meta->GetBuffParam1(this);
if (std::abs(distance) > 0) {
glm::vec3 old_move_dir = owner->GetMoveDir();
owner->SetMoveDir(caster_.Get()->GetAttackDir());
owner->ForwardMove(meta->_buff_param1);
owner->ForwardMove(distance);
owner->SetMoveDir(old_move_dir);
}
}

View File

@ -3825,6 +3825,7 @@ void Creature::CheckShotHold()
if (shot_hold) {
if (!remove_shot_hold_timer.expired()) {
room->xtimer.Delete(remove_shot_hold_timer);
// RemoveBuffByEffectId(kBET_HoldGun);
}
Buff* buff = GetBuffByEffectId(kBET_HoldGun);
if (buff) {