Vector3 coords = RADAR::GET_WAYPOINT_COORDS_3D(); //获取地图标记点的3D坐标
if (!GAMEPLAY::GET_GROUND_Z_FOR_3D_COORD(coords.x, coords.y, 100.0, &coords.z, FALSE)) //如果没有获取到地图标记点的Z轴坐标
{
static const float groundCheckHeight[] = { //检测高度
100.0, 150.0, 50.0, 0.0, 200.0, 250.0, 300.0, 350.0, 400.0,
450.0, 500.0, 550.0, 600.0, 650.0, 700.0, 750.0, 800.0
};
for each (float height in groundCheckHeight)
{
ENTITY::SET_ENTITY_COORDS_NO_OFFSET(e, coords.x, coords.y, height, 0, 0, 1); //设置实体无延迟
WaitAndDraw(100); //等待0.1秒
if (GAMEPLAY::GET_GROUND_Z_FOR_3D_COORD(coords.x, coords.y, height, &coords.z, FALSE)) //如果获取到了Z轴坐标
{
coords.z += 3.0; //Z坐标+3.0
break; //跳出循环
}
}
}
ENTITY::SET_ENTITY_COORDS(e, coords.x, coords.y, coords.z, 0, 0, 1, FALSE); //将玩家传送到标记点