summaryrefslogtreecommitdiff
path: root/src/game/GameController.cpp
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2012-12-18 00:41:32 (GMT)
committer jacob1 <jfu614@gmail.com>2012-12-18 00:41:32 (GMT)
commit510cbd63b5ed92e86b5c133605d246951442c84b (patch)
tree8456e15ec43c810e063ad499e8bd3336e7a75acf /src/game/GameController.cpp
parentf08481a88e083c4cda2465dd74bf442915c395ae (diff)
downloadpowder-510cbd63b5ed92e86b5c133605d246951442c84b.zip
powder-510cbd63b5ed92e86b5c133605d246951442c84b.tar.gz
fix GLAS and QRTZ sometimes breaking when pasting stamps or resetting pressure
Diffstat (limited to 'src/game/GameController.cpp')
-rw-r--r--src/game/GameController.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp
index e56ae50..07d2e63 100644
--- a/src/game/GameController.cpp
+++ b/src/game/GameController.cpp
@@ -702,7 +702,15 @@ void GameController::Exit()
void GameController::ResetAir()
{
- gameModel->GetSimulation()->air->Clear();
+ Simulation * sim = gameModel->GetSimulation();
+ sim->air->Clear();
+ for (int i = 0; i < NPART; i++)
+ {
+ if (sim->parts[i].type == PT_QRTZ || sim->parts[i].type == PT_GLAS)
+ {
+ sim->parts[i].pavg[0] = sim->parts[i].pavg[1] = 0;
+ }
+ }
}
void GameController::ResetSpark()