fix GLAS and QRTZ sometimes breaking when pasting stamps or resetting pressure

This commit is contained in:
jacob1 2012-12-17 19:41:32 -05:00
parent f08481a88e
commit 510cbd63b5
2 changed files with 13 additions and 1 deletions

View File

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

View File

@ -136,6 +136,10 @@ int Simulation::Load(int fullX, int fullY, GameSave * save)
}
}
}
if (parts[i].pavg[0] || parts[i].pavg[1])
{
parts[i].pavg[0] = parts[i].pavg[1] = 0;
}
}
parts_lastActiveIndex = NPART-1;
force_stacking_check = 1;