Revert "Revert "Redo ReadSaveBuf + common.h cleanup""

This reverts commit af7573ddbe.
This commit is contained in:
withmorten
2021-06-26 19:14:46 +02:00
parent 090fa619b4
commit f3a931e1c9
26 changed files with 398 additions and 337 deletions
+2 -1
View File
@@ -45,6 +45,7 @@
#include "Object.h"
#include "Automobile.h"
#include "Wanted.h"
#include "SaveBuf.h"
bool bAllCarCheat; // unused
@@ -4724,7 +4725,7 @@ void
CAutomobile::Load(uint8*& buf)
{
CVehicle::Load(buf);
Damage = ReadSaveBuf<CDamageManager>(buf);
ReadSaveBuf(&Damage, buf);
SkipSaveBuf(buf, 800 - sizeof(CDamageManager));
SetupDamageAfterLoad();
}