This commit is contained in:
aozhiwei 2022-09-26 14:13:44 +08:00
parent cbae8c054d
commit 991831f46e

View File

@ -1213,7 +1213,7 @@ void Creature::ProcSkillPhase(MetaData::SkillPhase* phase)
target_distance = skill_distance_;
room->xtimer.AddDeadLineTimerAndAttach
(
(target_distance / weapon_meta->i->bullet_speed()) * 1000.0f / FRAME_RATE_MS,
(target_distance / weapon_meta->i->bullet_speed() + 0.3) * 1000.0f / FRAME_RATE_MS,
a8::XParams()
.SetSender(this)
.SetParam1(context_pos.x)
@ -1226,10 +1226,10 @@ void Creature::ProcSkillPhase(MetaData::SkillPhase* phase)
a8::Vec2 context_pos;
context_pos.x = param.param1.GetDouble();
context_pos.x = param.param2.GetDouble();
context_pos.y = param.param2.GetDouble();
a8::Vec2 old_context_pos = c->context_pos;
c->TryAddBuff(c, equip_meta->int_param1);
c->context_pos = context_pos;
c->TryAddBuff(c, equip_meta->int_param1);
c->context_pos = old_context_pos;
},
&xtimer_attacher.timer_list_,
@ -2339,7 +2339,14 @@ void Creature::SummonObstacle(Buff* buff, int id, const a8::Vec2& target_pos)
obstacle->context_ability = context_ability;
slave_things_.push_back(std::make_tuple(buff->meta->i->buff_id(), obstacle));
#ifdef DEBUG
SendDebugMsg(a8::Format("召唤物件 buff_id:%d thing_id:%d", {buff->meta->i->buff_id(), id}));
SendDebugMsg(a8::Format("召唤物件 buff_id:%d thing_id:%d pos:%f,%f target_pos:%f,%f",
{buff->meta->i->buff_id(),
id,
GetPos().x,
GetPos().y,
pos.x,
pos.y
}));
#endif
} else {
#ifdef DEBUG