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