vcmi/vcmi — pull request #15 by karol57 (2014-05-25 20:12:32+00:00)
Title: Updated int3 class and fixed small error.

Updated int3 class:
- Added "si32 dist2dSQ(const int32 & other) const" method that returns distance raised to the power 2. For optimization proposes. This method don't use floating-point arithmetic and slow square root.
- Add return *this for operators like +=

In several files changed dist2d method based algorithm to dist2dSQ

server/CGameHandler.cpp:
- Fixed small error in Town Portal spell checking: "nearest = town->id" does nothing. Changed to "nearest = currTown->id".

Sorry for my English.