This commit is contained in:
aozhiwei 2023-01-05 17:56:34 +08:00
parent 70cb3f1eb9
commit d933f25c93

View File

@ -28,13 +28,15 @@ bool Movement::UpdatePosition()
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,
owner_->GetPos().y,
owner_->GetPos().z,
h
});
if (owner_->IsPlayer()) {
a8::XPrintf("pos:%f,%f,%f h1:%f\n",
{
owner_->GetPos().x,
owner_->GetPos().y,
owner_->GetPos().z,
h
});
}
#endif
curr_point.curr_pos.y = h;
} else {
@ -45,13 +47,15 @@ bool Movement::UpdatePosition()
owner_->CheckSpecObject();
if (owner_->room->map_instance->GetPosHeight(owner_->GetPos(), h)) {
#ifdef DEBUG1
a8::XPrintf("pos:%f,%f,%f h2:%f\n",
{
owner_->GetPos().x,
owner_->GetPos().y,
owner_->GetPos().z,
h
});
if (owner_->IsPlayer()) {
a8::XPrintf("pos:%f,%f,%f h2:%f\n",
{
owner_->GetPos().x,
owner_->GetPos().y,
owner_->GetPos().z,
h
});
}
#endif
auto new_pos = owner_->GetPos();
new_pos.y = h;