1
This commit is contained in:
parent
748b8db8e6
commit
8d63f2dee8
@ -618,7 +618,9 @@ void Buff::ProcTurnOver()
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Global::Instance()->verify_set_pos = 1;
|
||||
owner->_UpdateMove(distance);
|
||||
Global::Instance()->verify_set_pos = 0;
|
||||
owner->SetMoveDir(old_dir);
|
||||
if (phase->param2.GetInt() == 1) {
|
||||
++owner->turn_over_times;
|
||||
|
@ -28,19 +28,26 @@ bool MoveHelper::GetMovePosition(glm::vec3& out_pos)
|
||||
if (path_index_ < paths_.size()) {
|
||||
a8::Vec2 src_pos;
|
||||
a8::Vec2 tar_pos;
|
||||
a8::Vec2 curr_pos;
|
||||
a8::Vec2 dir;
|
||||
|
||||
auto& point = paths_[path_index_];
|
||||
src_pos.x = point->src_pos.x;
|
||||
src_pos.y = point->src_pos.z;
|
||||
|
||||
curr_pos.x = point->curr_pos.x;
|
||||
curr_pos.y = point->curr_pos.z;
|
||||
|
||||
tar_pos.x = point->tar_pos.x;
|
||||
tar_pos.y = point->tar_pos.z;
|
||||
|
||||
dir.x = point->dir.x;
|
||||
dir.y = point->dir.z;
|
||||
|
||||
owner_->SetPos(src_pos + dir * owner_->GetSpeed() * 1);
|
||||
curr_pos = (curr_pos + dir * owner_->GetSpeed() * 1);
|
||||
point->curr_pos.x = curr_pos.x;
|
||||
point->curr_pos.z = curr_pos.y;
|
||||
owner_->SetPos(curr_pos);
|
||||
if (owner_->GetPos().Distance(src_pos) - point->distance >= 0.0001f) {
|
||||
owner_->SetPos(tar_pos);
|
||||
++path_index_;
|
||||
@ -116,6 +123,8 @@ void MoveHelper::CalcTargetPos(float distance)
|
||||
point->distance = v2.Distance(owner_->GetPos());
|
||||
point->src_pos.x = owner_->GetPos().x;
|
||||
point->src_pos.z = owner_->GetPos().y;
|
||||
point->curr_pos.x = owner_->GetPos().x;
|
||||
point->curr_pos.z = owner_->GetPos().y;
|
||||
point->frameno = owner_->room->GetFrameNo() - 1;
|
||||
|
||||
if (point->tar_pos.x < 0 ||
|
||||
|
@ -503,9 +503,11 @@ void InternalShot(Creature* c,
|
||||
}
|
||||
}
|
||||
c->GetTrigger()->Shot(weapon_meta);
|
||||
#if 0
|
||||
if (weapon_meta->i->recoil_force() > 0.000001) {
|
||||
c->DoRecoilForce(weapon_meta->i->recoil_force());
|
||||
}
|
||||
#endif
|
||||
if (c->HasBuffEffect(kBET_Hide)) {
|
||||
c->RemoveBuffByEffectId(kBET_Hide);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user