This commit is contained in:
aozhiwei 2020-07-28 10:10:06 +08:00
parent cff8d13ff8
commit b89eeb0f85
3 changed files with 20 additions and 12 deletions

View File

@ -470,10 +470,6 @@ void Human::Shot(a8::Vec2& target_dir, bool& shot_ok)
shot_ok = true;
}
void Human::DirectShot(MetaData::Equip* bullet_meta, int skill_id, bool& shot_ok)
{
}
void Human::TankShot(a8::Vec2& target_dir)
{
if (!tank_weapon.meta) {
@ -3394,12 +3390,26 @@ void Human::ProcSkillPhase(MetaData::SkillPhase* phase)
break;
case kSkill_Shot:
{
MetaData::Equip* bullet_meta = MetaMgr::Instance()->GetEquip(phase->param1.GetInt());
if (bullet_meta) {
a8::Vec2 old_attack_dir = attack_dir;
bool shot_ok = false;
DirectShot(bullet_meta, skill_meta_->i->skill_id(), shot_ok);
attack_dir = old_attack_dir;
MetaData::Equip* weapon_meta = MetaMgr::Instance()->GetEquip(phase->param1.GetInt());
if (weapon_meta) {
MetaData::EquipUpgrade* weapon_upgrade_meta =
MetaMgr::Instance()->GetEquipUpgrade(weapon_meta->i->id());
MetaData::Equip* bullet_meta =
MetaMgr::Instance()->GetEquip(weapon_meta->i->use_bullet());
if (weapon_upgrade_meta && bullet_meta) {
a8::Vec2 old_attack_dir = attack_dir;
InternalShot
(
this,
weapon_meta,
weapon_upgrade_meta,
bullet_meta,
1,
skill_meta_->i->skill_id(),
5,
false);
attack_dir = old_attack_dir;
}
}
}
break;

View File

@ -171,7 +171,6 @@ class Human : public MoveableEntity
long long GetRealDeadFrameNo(Room* room);
void FillMFTeamData(cs::MFTeamData* team_data, bool is_game_over);
void Shot(a8::Vec2& target_dir, bool& shot_ok);
void DirectShot(MetaData::Equip* bullet_meta, int skill_id, bool& shot_ok);
void TankShot(a8::Vec2& target_dir);
void RecalcSelfCollider();
bool IsCollisionInMapService();

View File

@ -88,4 +88,3 @@ a8::Vec2 BornPoint::RandPoint() const
}
return born_point;
}