finish COMPATIBLE_SAVES and FIX_INCOMPATIBLE_SAVES

This commit is contained in:
withmorten
2021-07-05 18:07:26 +02:00
parent 71f28c8cf5
commit 011aafa043
25 changed files with 1161 additions and 159 deletions

View File

@@ -8496,21 +8496,21 @@ CPed::renderLimb(int node)
void
CPed::Save(uint8*& buf)
{
SkipSaveBuf(buf, 52);
ZeroSaveBuf(buf, 52);
CopyToBuf(buf, GetPosition().x);
CopyToBuf(buf, GetPosition().y);
CopyToBuf(buf, GetPosition().z);
SkipSaveBuf(buf, 288);
ZeroSaveBuf(buf, 288);
CopyToBuf(buf, CharCreatedBy);
SkipSaveBuf(buf, 351);
ZeroSaveBuf(buf, 351);
CopyToBuf(buf, m_fHealth);
CopyToBuf(buf, m_fArmour);
SkipSaveBuf(buf, 148);
ZeroSaveBuf(buf, 148);
for (int i = 0; i < 13; i++) // has to be hardcoded
m_weapons[i].Save(buf);
SkipSaveBuf(buf, 5);
ZeroSaveBuf(buf, 5);
CopyToBuf(buf, m_maxWeaponTypeAllowed);
SkipSaveBuf(buf, 162);
ZeroSaveBuf(buf, 162);
}
void

View File

@@ -1492,14 +1492,14 @@ void
CPlayerPed::Save(uint8*& buf)
{
CPed::Save(buf);
SkipSaveBuf(buf, 16);
ZeroSaveBuf(buf, 16);
CopyToBuf(buf, m_fMaxStamina);
SkipSaveBuf(buf, 28);
ZeroSaveBuf(buf, 28);
CopyToBuf(buf, m_nTargettableObjects[0]);
CopyToBuf(buf, m_nTargettableObjects[1]);
CopyToBuf(buf, m_nTargettableObjects[2]);
CopyToBuf(buf, m_nTargettableObjects[3]);
SkipSaveBuf(buf, 116);
ZeroSaveBuf(buf, 116);
}
void