From fd40ed234ab157c4e315cb748163969c8ff83b0f Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Fri, 10 Aug 2012 13:17:19 +0100 Subject: [PATCH] Impose limit on cursor radius (Limit is radius 128, somewhat smaller than TPT, but I don't think a larger size is necessary), fixes #88 --- src/game/GameController.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index 06ba1d492..3d36b75cb 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -187,6 +187,10 @@ void GameController::AdjustBrushSize(int direction, bool logarithmic, bool xAxis newSize.X = 0; if(newSize.Y<0) newSize.Y = 0; + if(newSize.X>128) + newSize.X = 128; + if(newSize.Y>128) + newSize.Y = 128; if(xAxis) gameModel->GetBrush()->SetRadius(ui::Point(newSize.X, oldSize.Y));