From d4b791ed171b7f3d8af170da006078522269fc24 Mon Sep 17 00:00:00 2001 From: Steve Date: Wed, 20 Apr 2016 09:38:54 +0100 Subject: [PATCH] Tell fighters not to separate from EF_NON_SOLID objects. --- src/battle/fighters.c | 2 +- src/battle/jumpgate.c | 2 +- src/battle/mine.c | 4 ++-- src/defs.h | 1 + 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/battle/fighters.c b/src/battle/fighters.c index 136616f..3632ff0 100644 --- a/src/battle/fighters.c +++ b/src/battle/fighters.c @@ -348,7 +348,7 @@ static void separate(void) for (i = 0, e = candidates[i] ; e != NULL ; e = candidates[++i]) { - if (e->flags & EF_TAKES_DAMAGE) + if ((e->flags & EF_TAKES_DAMAGE) && (!(e->flags & EF_NON_SOLID))) { distance = getDistance(e->x, e->y, self->x, self->y); diff --git a/src/battle/jumpgate.c b/src/battle/jumpgate.c index 5de48f9..706dd11 100644 --- a/src/battle/jumpgate.c +++ b/src/battle/jumpgate.c @@ -47,7 +47,7 @@ Entity *spawnJumpgate(int side, long flags) jumpgate->action = think; jumpgate->draw = draw; jumpgate->side = side; - jumpgate->flags = EF_NO_MT_BOX+EF_IMMORTAL+EF_AI_IGNORE; + jumpgate->flags = EF_NO_MT_BOX+EF_IMMORTAL+EF_AI_IGNORE+EF_NON_SOLID; if (flags != -1 && flags & EF_DISABLED) { jumpgate->flags |= EF_DISABLED; diff --git a/src/battle/mine.c b/src/battle/mine.c index eae4f98..12969ab 100644 --- a/src/battle/mine.c +++ b/src/battle/mine.c @@ -49,7 +49,7 @@ Entity *spawnMine(int type) mine->texture = (type == ET_MINE) ? mineNormal : shadowMine; mine->action = think; mine->die = die; - mine->flags = EF_TAKES_DAMAGE+EF_NO_PLAYER_TARGET+EF_SHORT_RADAR_RANGE; + mine->flags = EF_TAKES_DAMAGE+EF_NO_PLAYER_TARGET+EF_SHORT_RADAR_RANGE+EF_NON_SOLID; if (type == ET_SHADOW_MINE) { @@ -213,7 +213,7 @@ static void doSplashDamage(void) percent /= DAMAGE_RANGE; percent = 1 - percent; - damage = 100; + damage = 255; damage *= percent; if (e->type == ET_FIGHTER) diff --git a/src/defs.h b/src/defs.h index 3fac736..b65b76c 100644 --- a/src/defs.h +++ b/src/defs.h @@ -103,6 +103,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define EF_SHORT_RADAR_RANGE (2 << 17) #define EF_NO_PLAYER_TARGET (2 << 18) #define EF_AI_IGNORE (2 << 19) +#define EF_NON_SOLID (2 << 20) #define AIF_NONE 0 #define AIF_FOLLOWS_PLAYER (2 << 0)