summaryrefslogtreecommitdiffstats
path: root/src/peds/Ped.cpp
diff options
context:
space:
mode:
authorerorcun <erayorcunus@gmail.com>2020-10-18 18:37:49 +0200
committerGitHub <noreply@github.com>2020-10-18 18:37:49 +0200
commit497c1792455a13f7ea0750274c9ba4b3e26830db (patch)
treece2c434d0aba2a12b27d04d9ccf70502f05cf4c5 /src/peds/Ped.cpp
parentMerge branch 'miami' of https://github.com/GTAmodding/re3 into miami (diff)
parentfix in ped attractor (diff)
downloadre3-497c1792455a13f7ea0750274c9ba4b3e26830db.tar
re3-497c1792455a13f7ea0750274c9ba4b3e26830db.tar.gz
re3-497c1792455a13f7ea0750274c9ba4b3e26830db.tar.bz2
re3-497c1792455a13f7ea0750274c9ba4b3e26830db.tar.lz
re3-497c1792455a13f7ea0750274c9ba4b3e26830db.tar.xz
re3-497c1792455a13f7ea0750274c9ba4b3e26830db.tar.zst
re3-497c1792455a13f7ea0750274c9ba4b3e26830db.zip
Diffstat (limited to 'src/peds/Ped.cpp')
-rw-r--r--src/peds/Ped.cpp23
1 files changed, 9 insertions, 14 deletions
diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp
index c2ae422b..26147667 100644
--- a/src/peds/Ped.cpp
+++ b/src/peds/Ped.cpp
@@ -20040,15 +20040,13 @@ CPed::Save(uint8*& buf)
CopyToBuf(buf, GetPosition().z);
SkipSaveBuf(buf, 288);
CopyToBuf(buf, CharCreatedBy);
- SkipSaveBuf(buf, 351);
+ SkipSaveBuf(buf, 499);
CopyToBuf(buf, m_fHealth);
CopyToBuf(buf, m_fArmour);
- SkipSaveBuf(buf, 148);
- for (int i = 0; i < 13; i++) // has to be hardcoded
+ SkipSaveBuf(buf, 172);
+ for (int i = 0; i < 10; i++) // has to be hardcoded
m_weapons[i].Save(buf);
- SkipSaveBuf(buf, 5);
- CopyToBuf(buf, m_maxWeaponTypeAllowed);
- SkipSaveBuf(buf, 162);
+ SkipSaveBuf(buf, 252);
}
void
@@ -20060,16 +20058,15 @@ CPed::Load(uint8*& buf)
CopyFromBuf(buf, GetMatrix().GetPosition().z);
SkipSaveBuf(buf, 288);
CopyFromBuf(buf, CharCreatedBy);
- SkipSaveBuf(buf, 351);
+ SkipSaveBuf(buf, 499);
CopyFromBuf(buf, m_fHealth);
CopyFromBuf(buf, m_fArmour);
- SkipSaveBuf(buf, 148);
+ SkipSaveBuf(buf, 172);
+ m_currentWeapon = WEAPONTYPE_UNARMED;
CWeapon bufWeapon;
- for (int i = 0; i < 13; i++) { // has to be hardcoded
+ for (int i = 0; i < 10; i++) { // has to be hardcoded
bufWeapon.Load(buf);
- if (i >= 10)
- continue; // tmp hack before we fix save/load
if (bufWeapon.m_eWeaponType != WEAPONTYPE_UNARMED) {
int modelId = CWeaponInfo::GetWeaponInfo(bufWeapon.m_eWeaponType)->m_nModelId;
@@ -20084,9 +20081,7 @@ CPed::Load(uint8*& buf)
GiveWeapon(bufWeapon.m_eWeaponType, bufWeapon.m_nAmmoTotal);
}
}
- SkipSaveBuf(buf, 5);
- CopyFromBuf(buf, m_maxWeaponTypeAllowed);
- SkipSaveBuf(buf, 162);
+ SkipSaveBuf(buf, 252);
}
#undef CopyFromBuf
#undef CopyToBuf