diff options
author | erorcun <erorcunerorcun@hotmail.com.tr> | 2020-12-28 01:25:26 +0100 |
---|---|---|
committer | erorcun <erorcunerorcun@hotmail.com.tr> | 2020-12-28 02:02:24 +0100 |
commit | dc96a49dfdeaf0b83cdaf7b5c5e6565e986a8d41 (patch) | |
tree | 5a28ce79da2b6682f3ad88fed50a8bf58ee5920f | |
parent | just toggle waypoint (diff) | |
download | re3-dc96a49dfdeaf0b83cdaf7b5c5e6565e986a8d41.tar re3-dc96a49dfdeaf0b83cdaf7b5c5e6565e986a8d41.tar.gz re3-dc96a49dfdeaf0b83cdaf7b5c5e6565e986a8d41.tar.bz2 re3-dc96a49dfdeaf0b83cdaf7b5c5e6565e986a8d41.tar.lz re3-dc96a49dfdeaf0b83cdaf7b5c5e6565e986a8d41.tar.xz re3-dc96a49dfdeaf0b83cdaf7b5c5e6565e986a8d41.tar.zst re3-dc96a49dfdeaf0b83cdaf7b5c5e6565e986a8d41.zip |
-rw-r--r-- | src/peds/PlayerPed.cpp | 6 | ||||
-rw-r--r-- | src/weapons/WeaponInfo.cpp | 5 |
2 files changed, 5 insertions, 6 deletions
diff --git a/src/peds/PlayerPed.cpp b/src/peds/PlayerPed.cpp index ef5815ed..1b5e007a 100644 --- a/src/peds/PlayerPed.cpp +++ b/src/peds/PlayerPed.cpp @@ -299,7 +299,7 @@ CPlayerPed::SetRealMoveAnim(void) RestoreHeadingRate(); if (!curIdleAssoc) { - if (m_fCurrentStamina < 0.0f && !CWorld::TestSphereAgainstWorld(GetPosition(), 0.0f, + if (m_fCurrentStamina < 0.0f && !CWorld::TestSphereAgainstWorld(GetPosition(), 0.5f, nil, true, false, false, false, false, false)) { curIdleAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_IDLE_TIRED, 8.0f); @@ -313,7 +313,7 @@ CPlayerPed::SetRealMoveAnim(void) } else if (m_fMoveSpeed == 0.0f && !curSprintAssoc) { if (!curIdleAssoc) { - if (m_fCurrentStamina < 0.0f && !CWorld::TestSphereAgainstWorld(GetPosition(), 0.0f, + if (m_fCurrentStamina < 0.0f && !CWorld::TestSphereAgainstWorld(GetPosition(), 0.5f, nil, true, false, false, false, false, false)) { curIdleAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_IDLE_TIRED, 4.0f); @@ -329,7 +329,7 @@ CPlayerPed::SetRealMoveAnim(void) } else if (m_nPedState != PED_FIGHT) { if (m_fCurrentStamina < 0.0f && curIdleAssoc->animId != ANIM_IDLE_TIRED - && !CWorld::TestSphereAgainstWorld(GetPosition(), 0.0f, nil, true, false, false, false, false, false)) { + && !CWorld::TestSphereAgainstWorld(GetPosition(), 0.5f, nil, true, false, false, false, false, false)) { CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_IDLE_TIRED, 4.0f); } else if (curIdleAssoc->animId != ANIM_IDLE_STANCE) { diff --git a/src/weapons/WeaponInfo.cpp b/src/weapons/WeaponInfo.cpp index 546aa6ba..b40329c8 100644 --- a/src/weapons/WeaponInfo.cpp +++ b/src/weapons/WeaponInfo.cpp @@ -76,10 +76,9 @@ CWeaponInfo::LoadWeaponData(void) line[linelen] = '\0'; // skip white space - for (lp = 0; line[lp] <= ' '; lp++); + for (lp = 0; line[lp] <= ' ' && line[lp] != '\0'; lp++); - if (lp >= linelen || // FIX: game uses == here, but this is safer if we have empty lines - line[lp] == '#') + if (line[lp] == '\0' || line[lp] == '#') continue; spread = 0.0f; |