This commit is contained in:
aozhiwei 2023-05-17 15:17:54 +08:00
parent 0a93092c23
commit ad9b5de45c

View File

@ -164,6 +164,14 @@ void Player::InternalUpdate(int delta_time)
moving = true;
moved_frames = 0;
}
if (room->GetGasData().GetGasMode() == GasInactive &&
room->IsSandTableRoom()
) {
if (sand_table_target_pos) {
} else {
moving = false;
}
}
if (moving) {
UpdateMoving();
}
@ -1031,6 +1039,11 @@ void Player::_CMMove(f8::MsgHdr& hdr, const cs::CMMove& msg)
sand_table_target_pos = std::make_shared<glm::vec3>();
}
TypeConvert::FromPb(*sand_table_target_pos, &msg.sand_table_target_pos());
if (GlmHelper::IsEqual2D(*sand_table_target_pos, GetPos().ToGlmVec3())) {
sand_table_target_pos = nullptr;
} else {
glm::vec3 dir = *sand_table_target_pos - GetPos().ToGlmVec3();
}
} else {
sand_table_target_pos = nullptr;
}