Fix pavg loading behaviour of QRTZ/GLAS/TUNG again

Was thought to have been fixed by 3de92f5; turns out the fix only worked with positive pressures.
This commit is contained in:
Tamás Bálint Misius 2021-02-17 15:52:56 +01:00
parent 92cb50505d
commit 31dda85504
No known key found for this signature in database
GPG Key ID: 5B472A12F6ECA9F2

View File

@ -1187,6 +1187,8 @@ void GameSave::readOPS(char * data, int dataLength)
case PT_QRTZ:
case PT_GLAS:
case PT_TUNG:
if (particles[newIndex].pavg[0] >= 0x8000) particles[newIndex].pavg[0] -= 0x10000;
if (particles[newIndex].pavg[1] >= 0x8000) particles[newIndex].pavg[1] -= 0x10000;
particles[newIndex].pavg[0] /= 64;
particles[newIndex].pavg[1] /= 64;
break;