summaryrefslogtreecommitdiff
path: root/src/game/GameController.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-08-05 14:26:17 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-08-05 14:26:17 (GMT)
commited270d8dbf685fdc00e01959e1aa63c2163f152b (patch)
tree6653c43fd2875f32cde195ac43b9d63e8f9b96cb /src/game/GameController.cpp
parent351ce1525f570a52d571d1da720ae4f6a5815a22 (diff)
downloadpowder-ed270d8dbf685fdc00e01959e1aa63c2163f152b.zip
powder-ed270d8dbf685fdc00e01959e1aa63c2163f152b.tar.gz
Draw gravity zones when using grav wall
Diffstat (limited to 'src/game/GameController.cpp')
-rw-r--r--src/game/GameController.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp
index 350bc25..ea21fd1 100644
--- a/src/game/GameController.cpp
+++ b/src/game/GameController.cpp
@@ -653,6 +653,14 @@ void GameController::SetActiveMenu(Menu * menu)
void GameController::SetActiveTool(int toolSelection, Tool * tool)
{
gameModel->SetActiveTool(toolSelection, tool);
+ gameModel->GetRenderer()->gravityZonesEnabled = false;
+ for(int i = 0; i < 3; i++)
+ {
+ if(gameModel->GetActiveTool(i) == gameModel->GetMenuList().at(SC_WALL)->GetToolList().at(WL_GRAV))
+ {
+ gameModel->GetRenderer()->gravityZonesEnabled = true;
+ }
+ }
}
void GameController::OpenSearch()