summaryrefslogtreecommitdiffstats
path: root/src/peds
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-05-23 00:43:12 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-05-23 00:43:12 +0200
commit7bf561d440f0179f222e1e2811ac92384c1560a2 (patch)
treead2470bbb623ac0352d26c8a1b0937ebd6c1ed0e /src/peds
parentMerge remote-tracking branch 'upstream/miami' into miami (diff)
downloadre3-7bf561d440f0179f222e1e2811ac92384c1560a2.tar
re3-7bf561d440f0179f222e1e2811ac92384c1560a2.tar.gz
re3-7bf561d440f0179f222e1e2811ac92384c1560a2.tar.bz2
re3-7bf561d440f0179f222e1e2811ac92384c1560a2.tar.lz
re3-7bf561d440f0179f222e1e2811ac92384c1560a2.tar.xz
re3-7bf561d440f0179f222e1e2811ac92384c1560a2.tar.zst
re3-7bf561d440f0179f222e1e2811ac92384c1560a2.zip
Diffstat (limited to '')
-rw-r--r--src/peds/Ped.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp
index 081ea91e..28fcf74a 100644
--- a/src/peds/Ped.cpp
+++ b/src/peds/Ped.cpp
@@ -6025,7 +6025,6 @@ CPed::SetWaitState(eWaitState state, void *time)
case WAITSTATE_GROUND_ATTACK:
case WAITSTATE_LANCESITTING:
case WAITSTATE_PLAYANIM_HANDSUP_SIMPLE:
- assert(0);
default:
ClearWaitState();
RestoreHeadingRate();
@@ -18533,7 +18532,7 @@ CPed::Save(uint8*& buf)
CopyToBuf(buf, m_fHealth);
CopyToBuf(buf, m_fArmour);
SkipSaveBuf(buf, 148);
- for (int i = 0; i < 10; i++) // has to be hardcoded
+ for (int i = 0; i < 13; i++) // has to be hardcoded
m_weapons[i].Save(buf);
SkipSaveBuf(buf, 5);
CopyToBuf(buf, m_maxWeaponTypeAllowed);
@@ -18555,8 +18554,10 @@ CPed::Load(uint8*& buf)
SkipSaveBuf(buf, 148);
CWeapon bufWeapon;
- for (int i = 0; i < 10; i++) { // has to be hardcoded
+ for (int i = 0; i < 13; 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;