1
This commit is contained in:
parent
0b0c5801ab
commit
6c4869c26c
@ -40,7 +40,7 @@ void Buff::ProcReleaseDcgr(const a8::XParams& param)
|
||||
{
|
||||
Human* sender = (Human*)param.sender.GetUserData();
|
||||
Buff* buff = (Buff*)param.param1.GetUserData();
|
||||
MetaData::Buff* add_buff = MetaMgr::Instance()->GetBuff(buff->meta->param2);
|
||||
MetaData::Buff* add_buff = MetaMgr::Instance()->GetBuff(buff->meta->param3);
|
||||
if (!sender->dead && add_buff) {
|
||||
CircleCollider collider;
|
||||
collider.owner = sender;
|
||||
|
@ -57,7 +57,8 @@ void FrameEvent::AddShot(Human* hum)
|
||||
}
|
||||
}
|
||||
|
||||
void FrameEvent::AddBullet(Human* hum, a8::Vec2 born_pos, a8::Vec2 dir, float fly_distance,
|
||||
void FrameEvent::AddBullet(Human* hum, int bullet_id, int bullet_lv,
|
||||
a8::Vec2 born_pos, a8::Vec2 dir, float fly_distance,
|
||||
int hit_time, int target_id)
|
||||
{
|
||||
{
|
||||
@ -72,8 +73,13 @@ void FrameEvent::AddBullet(Human* hum, a8::Vec2 born_pos, a8::Vec2 dir, float fl
|
||||
TypeConvert::ToPb(born_pos, p.mutable_pos());
|
||||
TypeConvert::ToPb(dir, p.mutable_dir());
|
||||
p.set_bulletskin(10001);
|
||||
#if 1
|
||||
p.set_gun_id(bullet_id);
|
||||
p.set_gun_lv(bullet_lv);
|
||||
#else
|
||||
p.set_gun_id(hum->curr_weapon->meta->i->id());
|
||||
p.set_gun_lv(hum->curr_weapon->weapon_lv);
|
||||
#endif
|
||||
p.set_fly_distance(fly_distance);
|
||||
if (hit_time != 0) {
|
||||
p.set_hit_time(hit_time);
|
||||
|
@ -15,7 +15,8 @@ public:
|
||||
void AddAirDrop(int appear_time, int box_id, a8::Vec2 box_pos);
|
||||
void AddEmote(Human* hum, int emote_id);
|
||||
void AddShot(Human* hum);
|
||||
void AddBullet(Human* hum, a8::Vec2 born_pos, a8::Vec2 dir, float fly_distance, int hit_time, int target_id = 0);
|
||||
void AddBullet(Human* hum, int bullet_id, int bullet_lv, a8::Vec2 born_pos, a8::Vec2 dir,
|
||||
float fly_distance, int hit_time, int target_id = 0);
|
||||
void AddExplosion(int item_id, a8::Vec2 bomb_pos, int effect);
|
||||
void AddSmoke(Bullet* bullet, int item_id, a8::Vec2 pos);
|
||||
void AddDead(Human* hum);
|
||||
|
@ -246,9 +246,14 @@ void Human::DirectShot(MetaData::Equip* bullet_meta)
|
||||
hit_time = bullet_meta->i->time() * 1000;
|
||||
}
|
||||
if (bullet_meta->i->equip_subtype() == BulletType_Missile) {
|
||||
room->frame_event.AddBullet(this, bullet_born_pos, attack_dir, fly_distance, hit_time, skill_target_id);
|
||||
room->frame_event.AddBullet(this, bullet_meta->i->id(),
|
||||
curr_weapon->weapon_lv, bullet_born_pos, attack_dir,
|
||||
fly_distance, hit_time, skill_target_id);
|
||||
} else {
|
||||
room->frame_event.AddBullet(this, bullet_born_pos, attack_dir, fly_distance, hit_time);
|
||||
room->frame_event.AddBullet(this, bullet_meta->i->id(),
|
||||
curr_weapon->weapon_lv,
|
||||
bullet_born_pos, attack_dir,
|
||||
fly_distance, hit_time);
|
||||
}
|
||||
if (room->BattleStarted()) {
|
||||
if (bullet_meta->i->equip_subtype() != BulletType_Missile) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user