1
This commit is contained in:
parent
8f2bfd1a15
commit
a19b7331b4
@ -650,6 +650,14 @@ private:
|
||||
parameter_hash[item.pb->param_name()] = &item;
|
||||
}
|
||||
|
||||
{
|
||||
for (auto& meta : map_meta_list) {
|
||||
MetaData::Map& item = a8::FastAppend(map_list);
|
||||
item.pb = &meta;
|
||||
item.Init();
|
||||
gamemap_hash[item.pb->map_id()] = &item;
|
||||
}
|
||||
}
|
||||
for (auto& meta : safearea_meta_list) {
|
||||
MetaData::SafeArea& item = a8::FastAppend(safearea_list);
|
||||
item.pb = &meta;
|
||||
|
@ -22,7 +22,11 @@ bool MoveHelper::GetMovePosition(glm::vec3& out_pos)
|
||||
return false;
|
||||
}
|
||||
MovePathPoint& curr_point = paths_[path_index_];
|
||||
owner_->SetPos(curr_point.curr_pos);
|
||||
{
|
||||
a8::Vec2 dir = a8::Vec2(curr_point.dir.x, curr_point.dir.z);
|
||||
curr_point.curr_pos.AddVec2(dir * owner_->GetSpeed());
|
||||
owner_->SetPos(curr_point.curr_pos);
|
||||
}
|
||||
if (owner_->GetPos().Distance2D2(curr_point.src_pos) - curr_point.distance >= 0.0001f) {
|
||||
owner_->SetPos(curr_point.tar_pos);
|
||||
++path_index_;
|
||||
@ -90,7 +94,7 @@ void MoveHelper::CalcTargetPos(float distance)
|
||||
point.tar_pos.z < 0) {
|
||||
abort();
|
||||
}
|
||||
#ifdef DEBUG1
|
||||
#ifdef DEBUG
|
||||
a8::XPrintf("CalcTargetPos src_pos:%f,%f tar_pos:%f,%f is_hit:%d start:%f,%f,%f end:%f,%f,%f distance:%f\n",
|
||||
{
|
||||
point.src_pos.x,
|
||||
|
Loading…
x
Reference in New Issue
Block a user