This commit is contained in:
aozhiwei 2021-06-23 07:19:41 +00:00
parent 34661d26d9
commit 9c53b21fa1
4 changed files with 5 additions and 27 deletions

View File

@ -120,19 +120,6 @@ void FrameEvent::AddExplosionEx(CreatureWeakPtr& sender, int item_id, a8::Vec2 b
if (!sender.Get()) { if (!sender.Get()) {
return; return;
} }
#endif
#if 1
Player* hum = room->GetOneAlivePlayer();
sender.Attach((Creature*)hum);
item_id = 66001;
#ifdef DEBUG
a8::XPrintf("AddExplosion pos=%d,%d effect:%d\n",
{
bomb_pos.x,
bomb_pos.y,
effect
});
#endif
#endif #endif
{ {
auto& tuple = a8::FastAppend(explosions_); auto& tuple = a8::FastAppend(explosions_);

View File

@ -118,16 +118,6 @@ cs::SMUpdate* FrameMaker::MakeUpdateMsg(Human* hum)
if (idx < room->frame_event.explosions_.size()) { if (idx < room->frame_event.explosions_.size()) {
auto& tuple = room->frame_event.explosions_[idx]; auto& tuple = room->frame_event.explosions_[idx];
*msg->add_explosions() = std::get<1>(tuple); *msg->add_explosions() = std::get<1>(tuple);
#ifdef DEBUG
a8::XPrintf("AddExplosion %d, %s pos=%d,%d effect:%d\n",
{
hum->GetUniId(),
hum->name,
std::get<1>(tuple).pos().x(),
std::get<1>(tuple).pos().y(),
std::get<1>(tuple).effect()
});
#endif
} }
} }
for (size_t idx : hum->smokes_) { for (size_t idx : hum->smokes_) {

View File

@ -3931,7 +3931,6 @@ void Room::AirRaid(int airraid_id)
a8::Vec2 dir = a8::Vec2::UP; a8::Vec2 dir = a8::Vec2::UP;
dir.Rotate(a8::RandAngle()); dir.Rotate(a8::RandAngle());
a8::Vec2 center = gas_data_.pos_new + dir * (100 + rand() % gas_data_.new_area_meta->i->rad()); a8::Vec2 center = gas_data_.pos_new + dir * (100 + rand() % gas_data_.new_area_meta->i->rad());
#if 1
{ {
std::vector<Player*> humans; std::vector<Player*> humans;
GetAlivePlayers(humans, GetRoomMaxPlayerNum()); GetAlivePlayers(humans, GetRoomMaxPlayerNum());
@ -3944,8 +3943,12 @@ void Room::AirRaid(int airraid_id)
} }
} }
} }
#if 1
if (humans.size() > 0) {
center = humans[0]->GetPos();
}
#endif
} }
#endif
frame_event.AddAirRaid(raid_meta->i->appear_time(), center, raid_meta->i->rad()); frame_event.AddAirRaid(raid_meta->i->appear_time(), center, raid_meta->i->rad());
auto raid_cb = auto raid_cb =

View File

@ -183,7 +183,6 @@ void RoomObstacle::SpecExplosion()
bomb_born_offset.Rotate(a8::RandAngle()); bomb_born_offset.Rotate(a8::RandAngle());
bomb_born_offset = bomb_born_offset * a8::RandEx(1, std::max(2, meta->i->explosion_float())); bomb_born_offset = bomb_born_offset * a8::RandEx(1, std::max(2, meta->i->explosion_float()));
a8::Vec2 bomb_pos = GetPos() + bomb_born_offset; a8::Vec2 bomb_pos = GetPos() + bomb_born_offset;
#if 0
Explosion explosion; Explosion explosion;
explosion.IndifferenceAttack( explosion.IndifferenceAttack(
room, room,
@ -192,7 +191,6 @@ void RoomObstacle::SpecExplosion()
meta->i->explosion_effect(), meta->i->explosion_effect(),
meta->i->damage() meta->i->damage()
); );
#endif
} }
if (explosion_times_ >= meta->i->explosion_times()) { if (explosion_times_ >= meta->i->explosion_times()) {
room->xtimer.DeleteTimer(room->xtimer.GetRunningTimer()); room->xtimer.DeleteTimer(room->xtimer.GetRunningTimer());