misc whitespace changes
This commit is contained in:
parent
fb06e0028b
commit
9faf95a858
@ -1172,9 +1172,9 @@ void GameSave::readOPS(char * data, int dataLength)
|
||||
|
||||
switch (particles[newIndex].type)
|
||||
{
|
||||
// List of elements that save pavg with a multiplicative bias of 2**6
|
||||
// (or not at all if pressure is not saved).
|
||||
// If you change this list, change it in Simulation::Load and GameSave::serialiseOPS too!
|
||||
// List of elements that save pavg with a multiplicative bias of 2**6
|
||||
// (or not at all if pressure is not saved).
|
||||
// If you change this list, change it in Simulation::Load and GameSave::serialiseOPS too!
|
||||
case PT_QRTZ:
|
||||
case PT_GLAS:
|
||||
case PT_TUNG:
|
||||
@ -2322,16 +2322,14 @@ char * GameSave::serialiseOPS(unsigned int & dataLength)
|
||||
float pavg1 = particles[i].pavg[1];
|
||||
switch (particles[i].type)
|
||||
{
|
||||
// List of elements that save pavg with a multiplicative bias of 2**6
|
||||
// (or not at all if pressure is not saved).
|
||||
// If you change this list, change it in Simulation::Load and GameSave::readOPS too!
|
||||
// List of elements that save pavg with a multiplicative bias of 2**6
|
||||
// (or not at all if pressure is not saved).
|
||||
// If you change this list, change it in Simulation::Load and GameSave::readOPS too!
|
||||
case PT_QRTZ:
|
||||
case PT_GLAS:
|
||||
case PT_TUNG:
|
||||
if (!hasPressure)
|
||||
{
|
||||
break;
|
||||
}
|
||||
pavg0 *= 64;
|
||||
pavg1 *= 64;
|
||||
// fallthrough!
|
||||
|
@ -1032,9 +1032,7 @@ int LuaScriptInterface::simulation_partProperty(lua_State * l)
|
||||
{
|
||||
int fieldID = lua_tointeger(l, 2);
|
||||
if (fieldID < 0 || fieldID >= (int)properties.size())
|
||||
{
|
||||
return luaL_error(l, "Invalid field ID (%d)", fieldID);
|
||||
}
|
||||
prop = properties.begin() + fieldID;
|
||||
}
|
||||
else if (lua_type(l, 2) == LUA_TSTRING)
|
||||
@ -1044,9 +1042,7 @@ int LuaScriptInterface::simulation_partProperty(lua_State * l)
|
||||
return p.Name == fieldName;
|
||||
});
|
||||
if (prop == properties.end())
|
||||
{
|
||||
return luaL_error(l, "Unknown field (%s)", fieldName.c_str());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -241,9 +241,9 @@ int Simulation::Load(GameSave * save, bool includePressure, int fullX, int fullY
|
||||
soapList.insert(std::pair<unsigned int, unsigned int>(n, i));
|
||||
break;
|
||||
|
||||
// List of elements that load pavg with a multiplicative bias of 2**6
|
||||
// (or not at all if pressure is not loaded).
|
||||
// If you change this list, change it in GameSave::serialiseOPS and GameSave::readOPS too!
|
||||
// List of elements that load pavg with a multiplicative bias of 2**6
|
||||
// (or not at all if pressure is not loaded).
|
||||
// If you change this list, change it in GameSave::serialiseOPS and GameSave::readOPS too!
|
||||
case PT_QRTZ:
|
||||
case PT_GLAS:
|
||||
case PT_TUNG:
|
||||
|
Loading…
Reference in New Issue
Block a user