summaryrefslogtreecommitdiff
path: root/src/client/GameSave.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-09-03 11:38:09 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-09-03 11:38:09 (GMT)
commit1ac964d9bac38504f4b7fddc09230c56edf1eff5 (patch)
tree025d21fb55656fcd1ccfa183e3832d746bfb7931 /src/client/GameSave.cpp
parent4e09a077a4d7494d1c1e1f494cbc36fa9abcb19c (diff)
downloadpowder-1ac964d9bac38504f4b7fddc09230c56edf1eff5.zip
powder-1ac964d9bac38504f4b7fddc09230c56edf1eff5.tar.gz
Ensure saves are expanded in memory when performing translate operations. Fixes #174
Diffstat (limited to 'src/client/GameSave.cpp')
-rw-r--r--src/client/GameSave.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/client/GameSave.cpp b/src/client/GameSave.cpp
index a6a1b89..7a24c45 100644
--- a/src/client/GameSave.cpp
+++ b/src/client/GameSave.cpp
@@ -297,6 +297,8 @@ char * GameSave::Serialise(int & dataSize)
void GameSave::Transform(matrix2d transform, vector2d translate)
{
+ if(Collapsed())
+ Expand();
int i, x, y, nx, ny, width = blockWidth*CELL, height = blockHeight*CELL, newWidth, newHeight, newBlockWidth, newBlockHeight;
vector2d pos, tmp, ctl, cbr, vel;
vector2d cornerso[4];