MCPcopy Create free account
hub / github.com/The-Powder-Toy/The-Powder-Toy / ClearSimulation

Method ClearSimulation

src/gui/game/GameModel.cpp:1218–1241  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1216}
1217
1218void GameModel::ClearSimulation()
1219{
1220 //Load defaults
1221 sim->gravityMode = GRAV_VERTICAL;
1222 sim->customGravityX = 0.0f;
1223 sim->customGravityY = 0.0f;
1224 sim->air->airMode = AIR_ON;
1225 sim->legacy_enable = false;
1226 sim->water_equal_test = false;
1227 sim->SetEdgeMode(edgeMode);
1228 sim->air->ambientAirTemp = ambientAirTemp;
1229 sim->air->edgePressure = edgePressure;
1230 sim->air->edgeVelocityX = edgeVelocityX;
1231 sim->air->edgeVelocityY = edgeVelocityY;
1232 sim->air->vorticityCoeff = vorticityCoeff;
1233 sim->air->convectionMode = convectionMode;
1234
1235 sim->clear_sim();
1236 ren->ClearAccumulation();
1237 Client::Ref().ClearAuthorInfo();
1238
1239 notifySaveChanged();
1240 UpdateQuickOptions();
1241}
1242
1243void GameModel::SetPlaceSave(std::unique_ptr<GameSave> save)
1244{

Callers 1

ClearSimMethod · 0.80

Calls 4

clear_simMethod · 0.80
ClearAccumulationMethod · 0.80
ClearAuthorInfoMethod · 0.80
SetEdgeModeMethod · 0.45

Tested by

no test coverage detected