1
This commit is contained in:
parent
3c108eadad
commit
8252c6a63c
@ -73,6 +73,9 @@ void Explosion::InternalAttack()
|
|||||||
grid_list,
|
grid_list,
|
||||||
[this, &objects] (Creature* c, bool& stop)
|
[this, &objects] (Creature* c, bool& stop)
|
||||||
{
|
{
|
||||||
|
if (c->GetUniId() == exclude_uniid) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!c->Attackable(room_)) {
|
if (!c->Attackable(room_)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -98,6 +101,9 @@ void Explosion::InternalAttack()
|
|||||||
grid_list,
|
grid_list,
|
||||||
[this, &objects] (Entity* entity, bool& stop)
|
[this, &objects] (Entity* entity, bool& stop)
|
||||||
{
|
{
|
||||||
|
if (entity->GetUniId() == exclude_uniid) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!entity->Attackable(room_)) {
|
if (!entity->Attackable(room_)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@ class Room;
|
|||||||
class Explosion
|
class Explosion
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
int exclude_uniid = 0;
|
||||||
|
|
||||||
Room* GetRoom() { return room_; };
|
Room* GetRoom() { return room_; };
|
||||||
CreatureWeakPtr GetSender() { return sender_; };
|
CreatureWeakPtr GetSender() { return sender_; };
|
||||||
|
@ -185,6 +185,7 @@ void RoomObstacle::SpecExplosion()
|
|||||||
a8::Vec2 bomb_pos = GetPos() + bomb_born_offset;
|
a8::Vec2 bomb_pos = GetPos() + bomb_born_offset;
|
||||||
if (room->grid_service->CanAdd(bomb_pos.x, bomb_pos.y)) {
|
if (room->grid_service->CanAdd(bomb_pos.x, bomb_pos.y)) {
|
||||||
Explosion explosion;
|
Explosion explosion;
|
||||||
|
explosion.exclude_uniid = GetUniId();
|
||||||
explosion.IndifferenceAttack(
|
explosion.IndifferenceAttack(
|
||||||
room,
|
room,
|
||||||
bomb_pos,
|
bomb_pos,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user