1
This commit is contained in:
parent
12e837a113
commit
6b19afac51
@ -2366,7 +2366,18 @@ void Creature::UpdateMove()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
room->grid_service->MoveCreature(this);
|
room->grid_service->MoveCreature(this);
|
||||||
if (room->IsPveRoom() && IsEntityType(ET_Hero) && IsNearGas()) {
|
if (a8::HasBitFlag(status, CS_CrazeMode) && IsNearGas()) {
|
||||||
|
GetMutablePos() = old_pos;
|
||||||
|
GetMovement()->ClearPath();
|
||||||
|
glm::vec3 dir = GetPos().ToGlmVec3() - old_pos.ToGlmVec3();
|
||||||
|
if (std::abs(dir.x) > FLT_EPSILON ||
|
||||||
|
std::abs(dir.y) > FLT_EPSILON ||
|
||||||
|
std::abs(dir.z) > FLT_EPSILON
|
||||||
|
) {
|
||||||
|
GlmHelper::Normalize(dir);
|
||||||
|
SetMoveDir(dir);
|
||||||
|
}
|
||||||
|
} else if (room->IsPveRoom() && IsEntityType(ET_Hero) && IsNearGas()) {
|
||||||
GetMutablePos() = old_pos;
|
GetMutablePos() = old_pos;
|
||||||
GetMovement()->ClearPath();
|
GetMovement()->ClearPath();
|
||||||
glm::vec3 dir = GetPos().ToGlmVec3() - old_pos.ToGlmVec3();
|
glm::vec3 dir = GetPos().ToGlmVec3() - old_pos.ToGlmVec3();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user