1
This commit is contained in:
parent
278d02c292
commit
1db811e366
@ -52,6 +52,10 @@ bool MoveHelper::GetMovePosition(glm::vec3& out_pos)
|
||||
next_point.dir.z = dir.y;
|
||||
}
|
||||
}
|
||||
if (owner_->GetPos().x < 0 ||
|
||||
owner_->GetPos().y < 0) {
|
||||
abort();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@ -84,7 +88,8 @@ void MoveHelper::CalcTargetPos(float distance)
|
||||
bool is_hit = false;
|
||||
MovePathPoint point;
|
||||
if (c->HasBuffEffect(kBET_ThroughWall) ||
|
||||
c->HasBuffEffect(kBET_Fly)) {
|
||||
c->HasBuffEffect(kBET_Fly) ||
|
||||
c->HasBuffEffect(kBET_Jump)) {
|
||||
point.tar_pos = end * 10.f;
|
||||
if (point.tar_pos.x > owner_->room->GetMapMeta()->i->map_width() + 10) {
|
||||
point.tar_pos.x = owner_->room->GetMapMeta()->i->map_width() - 10;
|
||||
@ -95,8 +100,8 @@ void MoveHelper::CalcTargetPos(float distance)
|
||||
if (point.tar_pos.x < 10) {
|
||||
point.tar_pos.x = 10;
|
||||
}
|
||||
if (point.tar_pos.y < 10) {
|
||||
point.tar_pos.y = 10;
|
||||
if (point.tar_pos.z < 10) {
|
||||
point.tar_pos.z = 10;
|
||||
}
|
||||
} else {
|
||||
int ret = owner_->room->map_instance->Raycast(0, start, end, hit_point);
|
||||
@ -115,7 +120,11 @@ void MoveHelper::CalcTargetPos(float distance)
|
||||
point.src_pos.z = owner_->GetPos().y;
|
||||
point.frameno = owner_->room->GetFrameNo() - 1;
|
||||
|
||||
#ifdef DEBUG
|
||||
if (point.tar_pos.x < 0 ||
|
||||
point.tar_pos.z < 0) {
|
||||
abort();
|
||||
}
|
||||
#ifdef DEBUG1
|
||||
a8::XPrintf("CalcTargetPos src_pos:%f,%f tar_pos:%f,%f is_hit:%d start:%f,%f,%f end:%f,%f,%f\n",
|
||||
{
|
||||
point.src_pos.x,
|
||||
|
Loading…
x
Reference in New Issue
Block a user