aboutsummaryrefslogtreecommitdiff
path: root/src/game/GridDefines.h
diff options
context:
space:
mode:
authormegamage <none@none>2009-02-24 21:14:00 -0600
committermegamage <none@none>2009-02-24 21:14:00 -0600
commit5fda4992661583d7b3cf26ff50dc1b3d8ceedf26 (patch)
tree3aecfaae1a4d0faf9294497cba6103f307403569 /src/game/GridDefines.h
parent65a933c6c15faa9c4243aa729f42b2c458f0c9ea (diff)
parent8770a90bc6389d123a2716079bde40f43fc26357 (diff)
*Merge.
--HG-- branch : trunk
Diffstat (limited to 'src/game/GridDefines.h')
-rw-r--r--src/game/GridDefines.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/game/GridDefines.h b/src/game/GridDefines.h
index 2823df5e101..b6623942676 100644
--- a/src/game/GridDefines.h
+++ b/src/game/GridDefines.h
@@ -96,24 +96,32 @@ struct TRINITY_DLL_DECL CoordPair
{
if( x_coord >= val )
x_coord -= val;
+ else
+ x_coord = 0;
}
void operator>>(const uint32 val)
{
if( x_coord+val < LIMIT )
x_coord += val;
+ else
+ x_coord = LIMIT - 1;
}
void operator-=(const uint32 val)
{
if( y_coord >= val )
y_coord -= val;
+ else
+ y_coord = 0;
}
void operator+=(const uint32 val)
{
if( y_coord+val < LIMIT )
y_coord += val;
+ else
+ y_coord = LIMIT - 1;
}
uint32 x_coord;