From 31dda85504828e7b1afaff741d55375c21415f78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tam=C3=A1s=20B=C3=A1lint=20Misius?= Date: Wed, 17 Feb 2021 15:52:56 +0100 Subject: [PATCH] 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. --- src/client/GameSave.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/client/GameSave.cpp b/src/client/GameSave.cpp index 596df4920..5d4e70254 100644 --- a/src/client/GameSave.cpp +++ b/src/client/GameSave.cpp @@ -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;