toolstroke: fix bug in the bounds checking
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@653 d9718cc8-9f43-0410-858b-315f434eb58c
This commit is contained in:
parent
6de75a7947
commit
dce768ef45
1 changed files with 2 additions and 2 deletions
|
@ -65,9 +65,9 @@ class ToolEffect implements ToolEffectIfc
|
|||
ToolResult apply()
|
||||
{
|
||||
if (originX - preview.offsetX < 0 ||
|
||||
originX - preview.offsetX + preview.getWidth() >= city.getWidth() ||
|
||||
originX - preview.offsetX + preview.getWidth() > city.getWidth() ||
|
||||
originY - preview.offsetY < 0 ||
|
||||
originY - preview.offsetY + preview.getHeight() >= city.getHeight())
|
||||
originY - preview.offsetY + preview.getHeight() > city.getHeight())
|
||||
{
|
||||
return ToolResult.UH_OH;
|
||||
}
|
||||
|
|
Reference in a new issue