1
This commit is contained in:
parent
6b0f74e999
commit
94379056cf
@ -3046,6 +3046,20 @@ void Human::ProcBuffEffect(Human* caster, Buff* buff)
|
||||
if (caster == this) {
|
||||
abort();
|
||||
}
|
||||
float target_distance = caster->GetPos().Distance(GetPos());
|
||||
if (target_distance <= 0.000001f) {
|
||||
SetPos(caster->GetPos());
|
||||
target_pos = caster->GetPos();
|
||||
} else {
|
||||
if (target_distance <= buff->meta->param3) {
|
||||
SetPos(caster->GetPos());
|
||||
target_pos = caster->GetPos();
|
||||
} else {
|
||||
move_dir = caster->GetPos() - GetPos();
|
||||
move_dir.Normalize();
|
||||
target_pos = GetPos() + move_dir * (target_distance - buff->meta->param3);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case kBET_JumpTo:
|
||||
@ -3068,6 +3082,7 @@ void Human::ProcBuffEffect(Human* caster, Buff* buff)
|
||||
}
|
||||
}
|
||||
}
|
||||
target_pos = skill_target_pos;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
@ -149,6 +149,7 @@ class Human : public MoveableEntity
|
||||
xtimer_list* ad_timer_ = nullptr;
|
||||
Human* last_human_target = nullptr;
|
||||
|
||||
a8::Vec2 target_pos;
|
||||
int game_times = 0;
|
||||
int win_times = 0;
|
||||
int kill_times = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user