Leave only the 'wants pressure' check in Simulation::Load for QRTZ/GLAS/TUNG
This commit is contained in:
parent
74b0d49131
commit
c193e88c28
@ -1169,6 +1169,19 @@ void GameSave::readOPS(char * data, int dataLength)
|
|||||||
pavg = partsData[i++];
|
pavg = partsData[i++];
|
||||||
pavg |= (((unsigned)partsData[i++]) << 8);
|
pavg |= (((unsigned)partsData[i++]) << 8);
|
||||||
particles[newIndex].pavg[1] = (float)pavg;
|
particles[newIndex].pavg[1] = (float)pavg;
|
||||||
|
|
||||||
|
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!
|
||||||
|
case PT_QRTZ:
|
||||||
|
case PT_GLAS:
|
||||||
|
case PT_TUNG:
|
||||||
|
particles[newIndex].pavg[0] /= 64;
|
||||||
|
particles[newIndex].pavg[1] /= 64;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Particle specific parsing:
|
//Particle specific parsing:
|
||||||
@ -2311,7 +2324,7 @@ char * GameSave::serialiseOPS(unsigned int & dataLength)
|
|||||||
{
|
{
|
||||||
// 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 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:
|
||||||
|
@ -243,7 +243,7 @@ int Simulation::Load(int fullX, int fullY, GameSave * save, bool includePressure
|
|||||||
|
|
||||||
// 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 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:
|
||||||
@ -252,11 +252,6 @@ int Simulation::Load(int fullX, int fullY, GameSave * save, bool includePressure
|
|||||||
parts[i].pavg[0] = 0;
|
parts[i].pavg[0] = 0;
|
||||||
parts[i].pavg[1] = 0;
|
parts[i].pavg[1] = 0;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
parts[i].pavg[0] /= 64;
|
|
||||||
parts[i].pavg[1] /= 64;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user