1
This commit is contained in:
parent
e28fc373ba
commit
84816503e5
@ -3566,5 +3566,16 @@ void Creature::SetLastAttacker(CreatureWeakPtr attacker)
|
|||||||
|
|
||||||
void Creature::ActivateTargetValidPos()
|
void Creature::ActivateTargetValidPos()
|
||||||
{
|
{
|
||||||
|
if (target_valid_pos_activated) {
|
||||||
|
glm::vec3 center = context_pos.ToGlmVec3();
|
||||||
|
room->map_instance->Scale(center);
|
||||||
|
glm::vec3 point;
|
||||||
|
bool ok = room->map_instance->FindConnectableNearestPoint(center, 0.3f, point);
|
||||||
|
if (ok) {
|
||||||
|
room->map_instance->UnScale(point);
|
||||||
|
target_valid_pos = point;
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
target_valid_pos_activated = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user