This commit is contained in:
aozhiwei 2021-03-18 15:43:32 +08:00
parent a87564932e
commit 9a663e7e19
4 changed files with 3 additions and 6 deletions

View File

@ -46,7 +46,6 @@ class Creature : public MoveableEntity
virtual void SelectSkillTargets(const a8::Vec2& target_pos, std::set<Entity*>& target_list); virtual void SelectSkillTargets(const a8::Vec2& target_pos, std::set<Entity*>& target_list);
protected: protected:
bool use_skill = false;
size_t curr_skill_phase = 0; size_t curr_skill_phase = 0;
a8::Vec2 skill_dir; a8::Vec2 skill_dir;
float skill_param1 = 0; float skill_param1 = 0;

View File

@ -1369,16 +1369,11 @@ void Human::DoSkill(int skill_id, int target_id, const a8::Vec2& target_pos)
} }
++stats.use_skill_times; ++stats.use_skill_times;
OnAttack(); OnAttack();
#if 1
room->frame_event.AddSkillCdChg(this); room->frame_event.AddSkillCdChg(this);
#else
need_sync_active_player = true;
#endif
if (HasBuffEffect(kBET_Camouflage)) { if (HasBuffEffect(kBET_Camouflage)) {
RemoveBuffByEffectId(kBET_Camouflage); RemoveBuffByEffectId(kBET_Camouflage);
} }
} }
use_skill = false;
} }
int Human::SelectSkillId() int Human::SelectSkillId()

View File

@ -386,6 +386,8 @@ private:
Entity* last_collision_door_ = nullptr; Entity* last_collision_door_ = nullptr;
long long jump_frameno_ = 0; long long jump_frameno_ = 0;
bool use_skill = false;
friend class FrameMaker; friend class FrameMaker;
friend class FrameEvent; friend class FrameEvent;
}; };

View File

@ -394,6 +394,7 @@ void Player::UpdateUseSkill()
return; return;
} }
DoSkill(use_skill_id, skill_target_id, a8::Vec2()); DoSkill(use_skill_id, skill_target_id, a8::Vec2());
use_skill = false;
} }
void Player::Shot() void Player::Shot()