This commit is contained in:
aozhiwei 2021-07-06 11:57:24 +00:00
parent 31368173fc
commit 83bb518b11
2 changed files with 6 additions and 4 deletions

View File

@ -939,7 +939,7 @@ void Creature::ProcBuffEffect(Creature* caster, Buff* buff)
break;
case kBET_SummonHero:
{
if (!dead) {
if (!dead || buff->meta->i->dead_valid() != 0) {
SummonHero(buff, GetPos(), GetMoveDir());
}
}
@ -956,7 +956,7 @@ void Creature::ProcBuffEffect(Creature* caster, Buff* buff)
break;
case kBET_SummonObstacle:
{
if (!dead) {
if (!dead || buff->meta->i->dead_valid() != 0) {
SummonObstacle(buff, buff->meta->param1, context_pos);
}
}
@ -1794,7 +1794,7 @@ void Creature::SummonHero(Buff* buff,
int hero_id = std::get<3>(info);
int num = std::get<4>(info);
MetaData::Player* hero_meta = MetaMgr::Instance()->GetPlayer(hero_id);
if (hero_meta && !dead) {
if (hero_meta) {
for (int i = 0; i < 4; ++i) {
a8::Vec2 born_dir = dir;
a8::Vec2 born_offset(x, y);

View File

@ -201,7 +201,9 @@ void RoomObstacle::SpecExplosion()
meta->i->explosion_interval();
}
if (explosion_times_ >= total_explosion_times) {
if (room->xtimer.GetRunningTimer()) {
room->xtimer.DeleteTimer(room->xtimer.GetRunningTimer());
}
Die(room);
BroadcastFullState(room);
}