1
This commit is contained in:
parent
0051d3f12b
commit
baabbb4328
@ -1448,6 +1448,14 @@ void CallFuncBuff::Shot()
|
|||||||
if (bullet_meta) {
|
if (bullet_meta) {
|
||||||
glm::vec3 target_pos = glm::vec3(x, y, z);
|
glm::vec3 target_pos = glm::vec3(x, y, z);
|
||||||
glm::vec3 attack_dir = target_pos - owner->GetPos().ToGlmVec3();
|
glm::vec3 attack_dir = target_pos - owner->GetPos().ToGlmVec3();
|
||||||
|
glm::vec3 old_attack_dir = owner->GetAttackDir();
|
||||||
|
float fly_distance = 0.0f;
|
||||||
|
if (GlmHelper::IsZero(attack_dir)) {
|
||||||
|
attack_dir = owner->GetAttackDir();
|
||||||
|
} else {
|
||||||
|
GlmHelper::Normalize(attack_dir);
|
||||||
|
}
|
||||||
|
owner->SetAttackDir(old_attack_dir);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user