1
This commit is contained in:
parent
b224941ddd
commit
79bdb05b9e
@ -26,6 +26,7 @@ bool MoveHelper::UpdatePosition()
|
||||
a8::Vec2 dir = a8::Vec2(curr_point.dir.x, curr_point.dir.z);
|
||||
float h = 0.0f;
|
||||
if (owner_->room->map_instance->GetPosHeight(curr_point.curr_pos, h)) {
|
||||
#ifdef DEBUG1
|
||||
a8::XPrintf("pos:%f,%f,%f h1:%f\n",
|
||||
{
|
||||
owner_->GetPos().x,
|
||||
@ -33,6 +34,7 @@ bool MoveHelper::UpdatePosition()
|
||||
owner_->GetPos().z,
|
||||
h
|
||||
});
|
||||
#endif
|
||||
curr_point.curr_pos.y = h;
|
||||
} else {
|
||||
//abort();
|
||||
@ -40,6 +42,7 @@ bool MoveHelper::UpdatePosition()
|
||||
curr_point.curr_pos.AddVec2(dir * owner_->GetSpeed());
|
||||
owner_->SetPos(curr_point.curr_pos);
|
||||
if (owner_->room->map_instance->GetPosHeight(owner_->GetPos(), h)) {
|
||||
#ifdef DEBUG1
|
||||
a8::XPrintf("pos:%f,%f,%f h2:%f\n",
|
||||
{
|
||||
owner_->GetPos().x,
|
||||
@ -47,6 +50,7 @@ bool MoveHelper::UpdatePosition()
|
||||
owner_->GetPos().z,
|
||||
h
|
||||
});
|
||||
#endif
|
||||
auto new_pos = owner_->GetPos();
|
||||
new_pos.y = h;
|
||||
owner_->SetPos(new_pos);
|
||||
|
Loading…
x
Reference in New Issue
Block a user