From 8a270792b28918d387bd68c384995d40d5fcbc6d Mon Sep 17 00:00:00 2001 From: WALL OF JUSTICE <-> Date: Wed, 28 Mar 2018 19:11:43 +1100 Subject: [PATCH] * allow inverted gates to be opened with spell. --- src/magic/actmagic.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/magic/actmagic.cpp b/src/magic/actmagic.cpp index 9a9cb85fc..cf2591678 100644 --- a/src/magic/actmagic.cpp +++ b/src/magic/actmagic.cpp @@ -1669,9 +1669,17 @@ void actMagicMissile(Entity* my) //TODO: Verify this function. else if ( hit.entity->behavior == &actGate ) { // Open the Gate - if ( hit.entity->skill[28] != 2 ) + if ( (hit.entity->skill[28] != 2 && hit.entity->gateInverted == 0) + || (hit.entity->skill[28] != 1 && hit.entity->gateInverted == 1) ) { - hit.entity->skill[28] = 2; // Powers the Gate + if ( hit.entity->gateInverted == 1 ) + { + hit.entity->skill[28] = 1; // Depowers the Gate + } + else + { + hit.entity->skill[28] = 2; // Powers the Gate + } if ( parent ) { if ( parent->behavior == &actPlayer )