1
This commit is contained in:
parent
9a663e7e19
commit
3da0b2a3b9
@ -1312,7 +1312,7 @@ bool Human::HasNoDownedTeammate()
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Human::CanUseSkill()
|
||||
bool Human::CanUseSkill(int skill_id)
|
||||
{
|
||||
if (downed) {
|
||||
return false;
|
||||
@ -1346,7 +1346,7 @@ void Human::DoSkill(int skill_id, int target_id, const a8::Vec2& target_pos)
|
||||
) {
|
||||
CancelAction();
|
||||
}
|
||||
if (CanUseSkill()) {
|
||||
if (CanUseSkill(skill_id)) {
|
||||
ResetSkill();
|
||||
playing_skill = true;
|
||||
last_use_skill_frameno_ = room->GetFrameNo();
|
||||
|
@ -193,7 +193,7 @@ class Human : public Creature
|
||||
void RemoveOutObjects(Entity* entity);
|
||||
bool HasLiveTeammate();
|
||||
bool HasNoDownedTeammate();
|
||||
bool CanUseSkill();
|
||||
bool CanUseSkill(int skill_id);
|
||||
void DoJump();
|
||||
void DoSkill(int skill_id, int target_id, const a8::Vec2& target_pos);
|
||||
virtual int SelectSkillId();
|
||||
|
@ -190,7 +190,7 @@ void ZombieModeAI::UpdateAttack()
|
||||
}
|
||||
float distance = myself->GetPos().Distance(node_->target->GetPos());
|
||||
if (distance > GetAttackRange()) {
|
||||
if (myself->CanUseSkill() &&
|
||||
if (myself->CanUseSkill(myself->SelectSkillId()) &&
|
||||
myself->CurrentSkillMeta()->i->skill_id() != TURN_OVER_SKILL_ID &&
|
||||
distance < myself->CurrentSkillMeta()->i->skill_distance()) {
|
||||
DoSkill();
|
||||
|
Loading…
x
Reference in New Issue
Block a user