PDA

View Full Version : Blocked Spells Backwards


ghanja
04-23-2015, 02:37 PM
zone.cpp

Line 1903:

if (IsWithinAxisAlignedBox(location, blocked_spells[x].m_Location - blocked_spells[x].m_Difference, blocked_spells[x].m_Location + blocked_spells[x].m_Difference))


Change to:

if (IsWithinAxisAlignedBox(location, blocked_spells[x].m_Location - blocked_spells[x].m_Difference, blocked_spells[x].m_Location + blocked_spells[x].m_Difference))



Line 1937:

if(!IsWithinAxisAlignedBox(location, blocked_spells[x].m_Location - blocked_spells[x].m_Difference, blocked_spells[x].m_Location + blocked_spells[x].m_Difference))


Change to:

if(IsWithinAxisAlignedBox(location, blocked_spells[x].m_Location - blocked_spells[x].m_Difference, blocked_spells[x].m_Location + blocked_spells[x].m_Difference))


If a spell is blocked within the 'blocked_spells' table of a type 2 (use coordinates), IsWithinAxisAlignedBox would return true, albeit, the code was checking for a ! (not) true condition, instead blocking the spell everywhere else but the coordinate box. Credit to provocating for recognizing the bug.

Dev's notified but placing here for redundancy.