This commit is contained in:
aozhiwei 2022-09-25 10:04:49 +08:00
parent a1931e8930
commit c453abfb3e
7 changed files with 7 additions and 19 deletions

View File

@ -137,7 +137,7 @@ void Bullet::ProcBomb()
if (c->dead) {
return;
}
if (!is_tank_skin || sender.Get()->team_id != c->team_id) {
if (sender.Get()->team_id != c->team_id) {
//友军火箭筒伤害取消
if ((meta->i->_inventory_slot() == 4 ||
meta->i->_inventory_slot() == 5) &&

View File

@ -31,7 +31,6 @@ class Bullet : public MoveableEntity
a8::Vec2 born_pos;
a8::Vec2 born_dir;
float fly_distance = 0.0f;
bool is_tank_skin = false;
MovementComponent* movement = nullptr;
virtual ~Bullet() override;

View File

@ -34,7 +34,6 @@ struct BulletInfo
a8::Vec2 bullet_born_pos;
a8::Vec2 bullet_dir;
float fly_distance = 0;
bool is_tank_skin = false;
int weapon_lv = 0;
int delay_time = 0;
int recoil_force = 0;
@ -89,7 +88,6 @@ static void InternalCreateBullet(BulletInfo& bullet_info)
bullet_info.bullet_born_pos,
bullet_info.bullet_dir,
bullet_info.fly_distance,
bullet_info.is_tank_skin,
bullet_info.weapon_uniid);
#ifdef DEBUG1
if (bullet_info.c.Get()->IsPlayer()) {
@ -139,7 +137,6 @@ void InternalShot(Creature* c,
MetaData::Equip* bullet_meta,
MetaData::Skill* skill_meta,
float fly_distance,
bool is_tank_skin,
long long weapon_uniid)
{
if (weapon_meta->i->_inventory_slot() == IS_TRAP ||
@ -349,7 +346,6 @@ void InternalShot(Creature* c,
bullet_info.bullet_born_pos = bullet_born_pos;
bullet_info.bullet_dir = bullet_dir;
bullet_info.fly_distance = fly_distance;
bullet_info.is_tank_skin = is_tank_skin;
bullet_info.delay_time = std::get<3>(tuple);
bullet_info.recoil_force = std::get<4>(tuple);
bullet_info.invincible_buff_uniid = invincible_buff_uniid;
@ -358,7 +354,9 @@ void InternalShot(Creature* c,
skill_meta->GetMagicId() == MAGIC_HJHX)) {
bullet_info.trace_target_uniid = c->GetSkillTargetId();
#ifdef DEBUG
a8::XPrintf("bullet trace_target_uniid:%d\n", {c->GetSkillTargetId()});
{
a8::XPrintf("bullet trace_target_uniid:%d\n", {c->GetSkillTargetId()});
}
#endif
}
InternalCreateBullet(bullet_info);
@ -1222,7 +1220,6 @@ void Creature::ProcSkillPhase(MetaData::SkillPhase* phase)
bullet_meta,
CurrentSkill() ? CurrentSkill()->meta : nullptr,
target_distance,
false,
0);
SetAttackDir(old_attack_dir);
}
@ -1243,7 +1240,6 @@ void Creature::ProcSkillPhase(MetaData::SkillPhase* phase)
bullet_meta,
CurrentSkill() ? CurrentSkill()->meta : nullptr,
target_distance,
false,
0);
SetAttackDir(old_attack_dir);
}
@ -1967,9 +1963,8 @@ void Creature::Shot(a8::Vec2& target_dir, bool& shot_ok, float fly_distance)
InternalShot(this,
GetCurrWeapon()->meta,
GetCurrWeapon()->bullet_meta,
0,
nullptr,
fly_distance,
false,
GetCurrWeapon()->weapon_uniid);
} else if (power_idx < GetCurrWeapon()->meta->power_charge.size()) {
MetaData::Equip* weapon_meta = MetaMgr::Instance()->GetEquip
@ -1989,9 +1984,8 @@ void Creature::Shot(a8::Vec2& target_dir, bool& shot_ok, float fly_distance)
InternalShot(this,
weapon_meta,
bullet_meta,
0,
nullptr,
fly_distance,
false,
0);
} else {
A8_ABORT();

View File

@ -366,5 +366,4 @@ void InternalShot(Creature* sender,
MetaData::Equip* bullet_meta,
MetaData::Skill* skill_meta,
float fly_distance,
bool is_tank_skin,
long long weapon_uniid);

View File

@ -801,9 +801,8 @@ void Human::CarShot(const a8::Vec2& target_dir)
InternalShot(this,
second_weapon.meta,
second_weapon.bullet_meta,
0,
nullptr,
5,
false,
0);
--second_weapon.ammo;

View File

@ -595,7 +595,6 @@ int Room::CreateBullet(Creature* sender,
a8::Vec2 pos,
a8::Vec2 dir,
float fly_distance,
bool is_tank_skin,
long long weapon_uniid)
{
int bullet_uniid = 0;
@ -615,7 +614,6 @@ int Room::CreateBullet(Creature* sender,
bullet->born_pos = pos;
bullet->born_dir = dir;
bullet->fly_distance = fly_distance;
bullet->is_tank_skin = is_tank_skin;
bullet->Initialize();
AddObjectLater(bullet);
bullet_uniid = bullet->GetUniId();

View File

@ -170,7 +170,6 @@ public:
a8::Vec2 pos,
a8::Vec2 dir,
float fly_distance,
bool is_tank_skin,
long long weapon_uniid);
Car* CreateCar(Human* driver,
int car_uniid,