limit the number of signs that can be placed

This commit is contained in:
jacob1 2012-10-13 18:48:50 -04:00 committed by Simon Robertshaw
parent 00fdd8308a
commit fd07d35e34
2 changed files with 3 additions and 10 deletions

View File

@ -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)

View File

@ -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);
}