Skip to content

Commit

Permalink
Merge pull request #350 from WALLOFJUSTICE/dev-doom
Browse files Browse the repository at this point in the history
 * allow inverted gates to be opened with spell. for 3.1.2 hotfix
addictgamer authored Mar 29, 2018
2 parents 568df4c + 8a27079 commit d06969f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/magic/actmagic.cpp
Original file line number Diff line number Diff line change
@@ -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 )

0 comments on commit d06969f

Please sign in to comment.