summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2012-10-13 22:48:50 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-10-26 14:13:00 (GMT)
commitfd07d35e348e1c904a3da6fd67237fde4e88182d (patch)
tree49156e59b3c33214d81f9190f7d2ff4a9c2c2624
parent00fdd8308ace4c5806eee2052add4937e6594629 (diff)
downloadpowder-fd07d35e348e1c904a3da6fd67237fde4e88182d.zip
powder-fd07d35e348e1c904a3da6fd67237fde4e88182d.tar.gz
limit the number of signs that can be placed
-rw-r--r--src/client/GameSave.cpp10
-rw-r--r--src/game/SignTool.cpp3
2 files changed, 3 insertions, 10 deletions
diff --git a/src/client/GameSave.cpp b/src/client/GameSave.cpp
index 9f20b37..9072921 100644
--- a/src/client/GameSave.cpp
+++ b/src/client/GameSave.cpp
@@ -1,11 +1,3 @@
-//
-// GameSave.cpp
-// The Powder Toy
-//
-// Created by Simon Robertshaw on 04/06/2012.
-// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
-//
-
#include <iostream>
#include <sstream>
#include <cmath>
@@ -979,7 +971,7 @@ fail:
free(freeIndices);
if(partsSimIndex)
free(partsSimIndex);
- throw ParseException(ParseException::Corrupt, "Save data currupt");
+ throw ParseException(ParseException::Corrupt, "Save data corrupt");
fin:
bson_destroy(&b);
if(freeIndices)
diff --git a/src/game/SignTool.cpp b/src/game/SignTool.cpp
index eb1ef57..af267af 100644
--- a/src/game/SignTool.cpp
+++ b/src/game/SignTool.cpp
@@ -284,5 +284,6 @@ void SignTool::Click(Simulation * sim, Brush * brush, ui::Point position)
break;
}
}
- new SignWindow(this, sim, signIndex, position);
+ if (signIndex != -1 || sim->signs.size() < MAXSIGNS)
+ new SignWindow(this, sim, signIndex, position);
}