View Single Post
  #1  
Old 04-23-2015, 02:37 PM
ghanja's Avatar
ghanja
Dragon
 
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
Default Blocked Spells Backwards

zone.cpp

Line 1903:
Code:
 						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:
Code:
 						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:
Code:
 					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:
Code:
 					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.
Reply With Quote