From 4b7904ade7f7a60ce87ff11dedb364fde23b3c66 Mon Sep 17 00:00:00 2001 From: Per Inge Mathisen Date: Mon, 22 Mar 2010 22:33:26 +0000 Subject: [PATCH] Only activate gate open/close effect when gate is fully built. Bug found by icefire. git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10408 4a71c877-e1ca-e34f-864e-861f7616d084 --- src/fpath.c | 1 + src/move.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/fpath.c b/src/fpath.c index 095db1c2b..3f6731bc2 100644 --- a/src/fpath.c +++ b/src/fpath.c @@ -275,6 +275,7 @@ BOOL fpathBaseBlockingTile(SDWORD x, SDWORD y, PROPULSION_TYPE propulsion, int p { // Implement gates by completely ignoring them if (psTile->psObject->type == OBJ_STRUCTURE && psTile->psObject->player == player + && ((STRUCTURE *)psTile->psObject)->status == SS_BUILT && ((STRUCTURE *)psTile->psObject)->pStructureType->type == REF_GATE) { return false; diff --git a/src/move.c b/src/move.c index 4db9bdb8b..da5d0d2a6 100644 --- a/src/move.c +++ b/src/move.c @@ -972,6 +972,7 @@ static void moveCalcBlockingSlide(DROID *psDroid, float *pmx_, float *pmy_, uint psTile = mapTile(ntx, nty); if (psTile && psTile->psObject && psTile->psObject->type == OBJ_STRUCTURE && aiCheckAlliances(psTile->psObject->player, psDroid->player) + && ((STRUCTURE *)psTile->psObject)->status == SS_BUILT && ((STRUCTURE *)psTile->psObject)->pStructureType->type == REF_GATE) { STRUCTURE *psStruct = (STRUCTURE *)psTile->psObject;