Ped: PlayerPed: sync with master
This commit is contained in:
@@ -628,20 +628,21 @@ CPlayerPed::ProcessWeaponSwitch(CPad *padUsed)
|
||||
}
|
||||
}
|
||||
}
|
||||
// Out of ammo, switch to another weapon
|
||||
} else if (CWeaponInfo::GetWeaponInfo((eWeaponType)m_currentWeapon)->m_eWeaponFire != WEAPON_FIRE_MELEE) {
|
||||
if (GetWeapon(m_currentWeapon).m_nAmmoTotal <= 0) {
|
||||
if (TheCamera.PlayerWeaponMode.Mode != CCam::MODE_M16_1STPERSON
|
||||
&& TheCamera.PlayerWeaponMode.Mode != CCam::MODE_SNIPER
|
||||
&& TheCamera.PlayerWeaponMode.Mode != CCam::MODE_ROCKETLAUNCHER) {
|
||||
if (TheCamera.PlayerWeaponMode.Mode == CCam::MODE_M16_1STPERSON
|
||||
|| TheCamera.PlayerWeaponMode.Mode == CCam::MODE_SNIPER
|
||||
|| TheCamera.PlayerWeaponMode.Mode == CCam::MODE_ROCKETLAUNCHER)
|
||||
return;
|
||||
|
||||
for (m_nSelectedWepSlot = m_currentWeapon - 1; m_nSelectedWepSlot >= 0; --m_nSelectedWepSlot) {
|
||||
if (m_nSelectedWepSlot == WEAPONTYPE_BASEBALLBAT && HasWeapon(WEAPONTYPE_BASEBALLBAT)
|
||||
|| GetWeapon(m_nSelectedWepSlot).m_nAmmoTotal > 0 && m_nSelectedWepSlot != WEAPONTYPE_MOLOTOV && m_nSelectedWepSlot != WEAPONTYPE_GRENADE) {
|
||||
goto switchDetectDone;
|
||||
}
|
||||
for (m_nSelectedWepSlot = m_currentWeapon - 1; m_nSelectedWepSlot >= 0; --m_nSelectedWepSlot) {
|
||||
if (m_nSelectedWepSlot == WEAPONTYPE_BASEBALLBAT && HasWeapon(WEAPONTYPE_BASEBALLBAT)
|
||||
|| GetWeapon(m_nSelectedWepSlot).m_nAmmoTotal > 0 && m_nSelectedWepSlot != WEAPONTYPE_MOLOTOV && m_nSelectedWepSlot != WEAPONTYPE_GRENADE) {
|
||||
goto switchDetectDone;
|
||||
}
|
||||
m_nSelectedWepSlot = WEAPONTYPE_UNARMED;
|
||||
}
|
||||
m_nSelectedWepSlot = WEAPONTYPE_UNARMED;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user