mirror of
https://github.com/GTAmodding/re3.git
synced 2024-12-26 15:35:42 +00:00
Ped: WeaponInfo: little fixes and renamings
This commit is contained in:
parent
2dbe3d5b83
commit
d3f2f4f6ac
3 changed files with 8 additions and 9 deletions
|
@ -630,7 +630,7 @@ CPed::SetMoveAnim(void)
|
||||||
if (!animAssoc) {
|
if (!animAssoc) {
|
||||||
animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_FIGHT_IDLE);
|
animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_FIGHT_IDLE);
|
||||||
if (!animAssoc)
|
if (!animAssoc)
|
||||||
animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_WEAPON_CROUCHRELOAD);
|
animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_MELEE_IDLE_FIGHTMODE);
|
||||||
|
|
||||||
if (animAssoc && m_nPedState == PED_FIGHT)
|
if (animAssoc && m_nPedState == PED_FIGHT)
|
||||||
return;
|
return;
|
||||||
|
@ -1467,7 +1467,7 @@ CPed::CalculateNewVelocity(void)
|
||||||
fightAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_TIRED);
|
fightAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_TIRED);
|
||||||
|
|
||||||
if(!fightAssoc)
|
if(!fightAssoc)
|
||||||
fightAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_WEAPON_CROUCHRELOAD);
|
fightAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_MELEE_IDLE_FIGHTMODE);
|
||||||
|
|
||||||
if ((!idleAssoc || idleAssoc->blendAmount < 0.5f) && !fightAssoc && !bIsDucking) {
|
if ((!idleAssoc || idleAssoc->blendAmount < 0.5f) && !fightAssoc && !bIsDucking) {
|
||||||
LimbOrientation newUpperLegs;
|
LimbOrientation newUpperLegs;
|
||||||
|
|
|
@ -358,7 +358,7 @@ CPlayerPed::SetRealMoveAnim(void)
|
||||||
|
|
||||||
RestoreHeadingRate();
|
RestoreHeadingRate();
|
||||||
if (!curIdleAssoc) {
|
if (!curIdleAssoc) {
|
||||||
if (m_fCurrentStamina < 0.0f && !bIsAimingGun && !CWorld::TestSphereAgainstWorld(GetPosition(), 0.0f,
|
if (m_fCurrentStamina < 0.0f && !bIsAimingGun && !CWorld::TestSphereAgainstWorld(GetPosition(), 0.5f,
|
||||||
nil, true, false, false, false, false, false)) {
|
nil, true, false, false, false, false, false)) {
|
||||||
curIdleAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_IDLE_TIRED, 8.0f);
|
curIdleAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_IDLE_TIRED, 8.0f);
|
||||||
|
|
||||||
|
@ -372,7 +372,7 @@ CPlayerPed::SetRealMoveAnim(void)
|
||||||
|
|
||||||
} else if (m_fMoveSpeed == 0.0f && !curSprintAssoc) {
|
} else if (m_fMoveSpeed == 0.0f && !curSprintAssoc) {
|
||||||
if (!curIdleAssoc) {
|
if (!curIdleAssoc) {
|
||||||
if (m_fCurrentStamina < 0.0f && !bIsAimingGun && !CWorld::TestSphereAgainstWorld(GetPosition(), 0.0f,
|
if (m_fCurrentStamina < 0.0f && !bIsAimingGun && !CWorld::TestSphereAgainstWorld(GetPosition(), 0.5f,
|
||||||
nil, true, false, false, false, false, false)) {
|
nil, true, false, false, false, false, false)) {
|
||||||
curIdleAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_IDLE_TIRED, 4.0f);
|
curIdleAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_IDLE_TIRED, 4.0f);
|
||||||
|
|
||||||
|
@ -388,7 +388,7 @@ CPlayerPed::SetRealMoveAnim(void)
|
||||||
|
|
||||||
} else if (m_nPedState != PED_FIGHT) {
|
} else if (m_nPedState != PED_FIGHT) {
|
||||||
if (m_fCurrentStamina < 0.0f && !bIsAimingGun && curIdleAssoc->animId != ANIM_IDLE_TIRED
|
if (m_fCurrentStamina < 0.0f && !bIsAimingGun && 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);
|
CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_IDLE_TIRED, 4.0f);
|
||||||
|
|
||||||
} else if (curIdleAssoc->animId != ANIM_IDLE_STANCE) {
|
} else if (curIdleAssoc->animId != ANIM_IDLE_STANCE) {
|
||||||
|
@ -477,7 +477,7 @@ CPlayerPed::SetRealMoveAnim(void)
|
||||||
curRunAssoc->blendAmount = 0.0f;
|
curRunAssoc->blendAmount = 0.0f;
|
||||||
curRunAssoc->blendDelta = 0.0f;
|
curRunAssoc->blendDelta = 0.0f;
|
||||||
|
|
||||||
} else if (curSprintAssoc->blendDelta >= 0.0f) {
|
} else if (curSprintAssoc->blendDelta >= 0.0f) { // this condition is absent on mobile
|
||||||
// Stop sprinting when tired
|
// Stop sprinting when tired
|
||||||
curSprintAssoc->flags |= ASSOC_DELETEFADEDOUT;
|
curSprintAssoc->flags |= ASSOC_DELETEFADEDOUT;
|
||||||
curSprintAssoc->blendDelta = -1.0f;
|
curSprintAssoc->blendDelta = -1.0f;
|
||||||
|
|
|
@ -164,10 +164,9 @@ CWeaponInfo::LoadWeaponData(void)
|
||||||
line[linelen] = '\0';
|
line[linelen] = '\0';
|
||||||
|
|
||||||
// skip white space
|
// 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
|
if (line[lp] == '\0' || line[lp] == '#')
|
||||||
line[lp] == '#')
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
spread = 0.0f;
|
spread = 0.0f;
|
||||||
|
|
Loading…
Reference in a new issue