mirror of
https://github.com/GTAmodding/re3.git
synced 2025-10-06 00:20:00 +00:00
Fixes 2
This commit is contained in:
parent
6af77d8514
commit
5d119cf985
4 changed files with 17 additions and 17 deletions
|
@ -573,8 +573,6 @@ CPlayerPed::ProcessWeaponSwitch(CPad *padUsed)
|
|||
if (CDarkel::FrenzyOnGoing())
|
||||
goto switchDetectDone;
|
||||
|
||||
// The fact that m_nSelectedWepSlot is int8 makes below loops circular loop.
|
||||
|
||||
if (padUsed->CycleWeaponRightJustDown() && !m_pPointGunAt) {
|
||||
|
||||
if (TheCamera.PlayerWeaponMode.Mode != CCam::MODE_M16_1STPERSON
|
||||
|
@ -596,12 +594,14 @@ CPlayerPed::ProcessWeaponSwitch(CPad *padUsed)
|
|||
&& TheCamera.PlayerWeaponMode.Mode != CCam::MODE_SNIPER
|
||||
&& TheCamera.PlayerWeaponMode.Mode != CCam::MODE_ROCKETLAUNCHER) {
|
||||
|
||||
for (m_nSelectedWepSlot = m_currentWeapon - 1; m_nSelectedWepSlot >= 0; --m_nSelectedWepSlot) {
|
||||
for (m_nSelectedWepSlot = m_currentWeapon - 1; ; --m_nSelectedWepSlot) {
|
||||
if (m_nSelectedWepSlot < WEAPONTYPE_UNARMED)
|
||||
m_nSelectedWepSlot = WEAPONTYPE_DETONATOR;
|
||||
|
||||
if (HasWeapon(m_nSelectedWepSlot) && GetWeapon(m_nSelectedWepSlot).HasWeaponAmmoToBeUsed()) {
|
||||
goto switchDetectDone;
|
||||
}
|
||||
}
|
||||
m_nSelectedWepSlot = WEAPONTYPE_DETONATOR;
|
||||
}
|
||||
} else if (CWeaponInfo::GetWeaponInfo((eWeaponType)m_currentWeapon)->m_eWeaponFire != WEAPON_FIRE_MELEE) {
|
||||
if (GetWeapon(m_currentWeapon).m_nAmmoTotal <= 0) {
|
||||
|
|
|
@ -13,7 +13,7 @@ public:
|
|||
float m_fCurrentStamina;
|
||||
float m_fMaxStamina;
|
||||
float m_fStaminaProgress;
|
||||
uint8 m_nSelectedWepSlot; // eWeaponType
|
||||
int8 m_nSelectedWepSlot; // eWeaponType
|
||||
bool m_bSpeedTimerFlag;
|
||||
bool m_bShouldEvade;
|
||||
int8 field_1367;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue