1
This commit is contained in:
commit
1d9e75e5bf
@ -62,7 +62,6 @@ void Buff::FillMFBuff(cs::MFBuff* buff_pb)
|
|||||||
if (owner->IsHuman() &&
|
if (owner->IsHuman() &&
|
||||||
(meta->i->buff_effect() == kBET_Driver ||
|
(meta->i->buff_effect() == kBET_Driver ||
|
||||||
meta->i->buff_effect() == kBET_Passenger)) {
|
meta->i->buff_effect() == kBET_Passenger)) {
|
||||||
buff_pb->add_params(((Human*)owner)->GetCar()->meta->i->id());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1102,21 +1102,27 @@ void Creature::ProcSkillPhase(MetaData::SkillPhase* phase)
|
|||||||
{
|
{
|
||||||
a8::Vec2 old_dir = GetMoveDir();
|
a8::Vec2 old_dir = GetMoveDir();
|
||||||
a8::Vec2 old_pos = GetPos();
|
a8::Vec2 old_pos = GetPos();
|
||||||
if (CurrentSkill()->GetMinorType() != SMT_NONE) {
|
if (CurrentSkill()->GetMinorType() == SMT_NONE) {
|
||||||
|
int buff_id = phase->param3.GetInt();
|
||||||
|
//TryAddBuff(this, buff_id);
|
||||||
|
a8::XPrintf("old_pos:%f,%f", {GetPos().x, GetPos().y});
|
||||||
_UpdateMove(phase->param1.GetInt());
|
_UpdateMove(phase->param1.GetInt());
|
||||||
a8::Vec2 pre_dir = old_dir;
|
a8::Vec2 pre_dir = old_dir;
|
||||||
a8::Vec2 pre_pos = old_pos;
|
a8::Vec2 pre_pos = old_pos;
|
||||||
|
a8::XPrintf("new_pos:%f,%f", {GetPos().x, GetPos().y});
|
||||||
CurrentSkill()->AddMinorMode
|
CurrentSkill()->AddMinorMode
|
||||||
(
|
(
|
||||||
SMT_BLINK,
|
SMT_BLINK,
|
||||||
phase->param2.GetInt(),
|
phase->param2.GetInt(),
|
||||||
[this, pre_pos, pre_dir] () {
|
[this, pre_pos, pre_dir, buff_id] () {
|
||||||
a8::Vec2 old_dir = GetMoveDir();
|
a8::Vec2 old_dir = GetMoveDir();
|
||||||
a8::Vec2 old_pos = GetPos();
|
a8::Vec2 old_pos = GetPos();
|
||||||
float distance = GetPos().Distance(pre_pos);
|
float distance = GetPos().Distance(pre_pos);
|
||||||
if (distance > 0.0001f) {
|
if (distance > 0.0001f) {
|
||||||
a8::Vec2 new_dir = pre_pos - GetPos();
|
a8::Vec2 new_dir = pre_pos - GetPos();
|
||||||
new_dir.Normalize();
|
new_dir.Normalize();
|
||||||
|
SetMoveDir(new_dir);
|
||||||
|
//TryAddBuff(this, buff_id);
|
||||||
_UpdateMove(distance);
|
_UpdateMove(distance);
|
||||||
}
|
}
|
||||||
SetMoveDir(old_dir);
|
SetMoveDir(old_dir);
|
||||||
@ -1342,6 +1348,7 @@ void Creature::ProcBuffEffect(Creature* caster, Buff* buff)
|
|||||||
break;
|
break;
|
||||||
case kBET_FlashMove:
|
case kBET_FlashMove:
|
||||||
{
|
{
|
||||||
|
if (buff->meta->int_param1 == 0) {
|
||||||
a8::Vec2 old_pos = GetPos();
|
a8::Vec2 old_pos = GetPos();
|
||||||
a8::Vec2 new_pos = GetPos() + skill_dir_ * std::max(skill_distance_, 300.0f);
|
a8::Vec2 new_pos = GetPos() + skill_dir_ * std::max(skill_distance_, 300.0f);
|
||||||
SetPos(new_pos);
|
SetPos(new_pos);
|
||||||
@ -1351,6 +1358,7 @@ void Creature::ProcBuffEffect(Creature* caster, Buff* buff)
|
|||||||
room->grid_service->MoveCreature(this);
|
room->grid_service->MoveCreature(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case kBET_BatchAddBuff:
|
case kBET_BatchAddBuff:
|
||||||
{
|
{
|
||||||
|
@ -658,7 +658,11 @@ void Human::GetAabbBox(AabbCollider& aabb_box)
|
|||||||
aabb_box._min.y = -meta->i->radius();
|
aabb_box._min.y = -meta->i->radius();
|
||||||
aabb_box._max.x = meta->i->radius();
|
aabb_box._max.x = meta->i->radius();
|
||||||
aabb_box._max.y = meta->i->radius();
|
aabb_box._max.y = meta->i->radius();
|
||||||
|
#if 1
|
||||||
|
aabb_box.MoveCenter(0, 0);
|
||||||
|
#else
|
||||||
aabb_box.MoveCenter(meta->i->move_offset_x(), meta->i->move_offset_y());
|
aabb_box.MoveCenter(meta->i->move_offset_x(), meta->i->move_offset_y());
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,6 +76,11 @@ void Skill::FillMFSkill(cs::MFSkill* skill_pb)
|
|||||||
#if 1
|
#if 1
|
||||||
skill_pb->set_left_time(GetCd());
|
skill_pb->set_left_time(GetCd());
|
||||||
#endif
|
#endif
|
||||||
|
a8::XPrintf("type: %d, lefttime:%d cd_time:%d\n", {
|
||||||
|
minor_type_,
|
||||||
|
minor_left_time,
|
||||||
|
minor_cd_time_
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -212,6 +217,7 @@ void Skill::AddMinorMode(
|
|||||||
.SetSender(this),
|
.SetSender(this),
|
||||||
[] (const a8::XParams& param)
|
[] (const a8::XParams& param)
|
||||||
{
|
{
|
||||||
|
Skill* skill = (Skill*)param.sender.GetUserData();
|
||||||
},
|
},
|
||||||
&xtimer_attacher.timer_list_,
|
&xtimer_attacher.timer_list_,
|
||||||
[] (const a8::XParams& param)
|
[] (const a8::XParams& param)
|
||||||
@ -224,6 +230,7 @@ void Skill::AddMinorMode(
|
|||||||
skill->minor_mode_timer_ = nullptr;
|
skill->minor_mode_timer_ = nullptr;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
owner->need_sync_active_player = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Skill::DoMinorMode()
|
void Skill::DoMinorMode()
|
||||||
@ -234,5 +241,6 @@ void Skill::DoMinorMode()
|
|||||||
minor_cd_time_ = 0;
|
minor_cd_time_ = 0;
|
||||||
minor_cb_ = nullptr;
|
minor_cb_ = nullptr;
|
||||||
ResetSkillCd();
|
ResetSkillCd();
|
||||||
|
owner->need_sync_active_player = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user