This commit is contained in:
aozhiwei 2021-07-09 11:32:47 +00:00
parent e6b98c6d9e
commit c0d5174c5b
4 changed files with 5 additions and 4 deletions

View File

@ -184,7 +184,7 @@ void Bullet::ProcBomb()
{
//烟雾弹
a8::Vec2 bomb_pos = GetPos();
room->frame_event.AddSmoke(this, meta->i->id(), bomb_pos);
room->frame_event.AddSmoke(this, meta->i->id(), bomb_pos, 1000 * 30);
ProcSmokeBomb();
}
break;

View File

@ -200,7 +200,7 @@ void FrameEvent::AddBulletNumChg(CreatureWeakPtr& sender)
}
}
void FrameEvent::AddSmoke(Bullet* bullet, int item_id, a8::Vec2 pos)
void FrameEvent::AddSmoke(Bullet* bullet, int item_id, a8::Vec2 pos, float time_addition)
{
if (!bullet->sender.Get()) {
return;
@ -213,6 +213,7 @@ void FrameEvent::AddSmoke(Bullet* bullet, int item_id, a8::Vec2 pos)
p.set_item_id(item_id);
TypeConvert::ToPb(pos, p.mutable_pos());
p.set_player_id(bullet->sender.Get()->GetUniId());
p.set_time_addition(time_addition);
}
{
int idx = smokes_.size() - 1;

View File

@ -26,7 +26,7 @@ public:
float fly_distance);
void RemoveBullet(a8::Vec2 pos, int bullet_uniid);
void AddExplosion(Bullet* bullet, int item_id, a8::Vec2 bomb_pos);
void AddSmoke(Bullet* bullet, int item_id, a8::Vec2 pos);
void AddSmoke(Bullet* bullet, int item_id, a8::Vec2 pos, float time_addition);
void AddPlaySkill(CreatureWeakPtr& sender, int skill_id);
void AddExplosionEx(CreatureWeakPtr& sender, int item_id, a8::Vec2 bomb_pos, int effect);
void AddBulletNumChg(CreatureWeakPtr& sender);

View File

@ -453,7 +453,6 @@ message MFSmokeFull
optional int32 obj_uniid = 1; //id
optional MFVec2 pos = 2; //
optional float rad = 3; //
optional float time_addition = 4; //()
}
//-
@ -674,6 +673,7 @@ message MFSmoke
optional int32 item_id = 1; //id
optional MFVec2 pos = 2; //
optional int32 player_id = 4; //id
optional float time_addition = 5; //()
}
//