limit the number of signs that can be placed
This commit is contained in:
parent
00fdd8308a
commit
fd07d35e34
@ -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 <iostream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
@ -979,7 +971,7 @@ fail:
|
|||||||
free(freeIndices);
|
free(freeIndices);
|
||||||
if(partsSimIndex)
|
if(partsSimIndex)
|
||||||
free(partsSimIndex);
|
free(partsSimIndex);
|
||||||
throw ParseException(ParseException::Corrupt, "Save data currupt");
|
throw ParseException(ParseException::Corrupt, "Save data corrupt");
|
||||||
fin:
|
fin:
|
||||||
bson_destroy(&b);
|
bson_destroy(&b);
|
||||||
if(freeIndices)
|
if(freeIndices)
|
||||||
|
@ -284,5 +284,6 @@ void SignTool::Click(Simulation * sim, Brush * brush, ui::Point position)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (signIndex != -1 || sim->signs.size() < MAXSIGNS)
|
||||||
new SignWindow(this, sim, signIndex, position);
|
new SignWindow(this, sim, signIndex, position);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user