diff options
author | eray orçunus <erayorcunus@gmail.com> | 2019-08-02 00:04:30 +0200 |
---|---|---|
committer | eray orçunus <erayorcunus@gmail.com> | 2019-08-02 00:30:40 +0200 |
commit | 875cdd845db1255329c77c458df993f1b490e8e8 (patch) | |
tree | 73434501fcd8b2167daf88c83c5a1e0f40671780 /src/control | |
parent | implemented CPlane (diff) | |
download | re3-875cdd845db1255329c77c458df993f1b490e8e8.tar re3-875cdd845db1255329c77c458df993f1b490e8e8.tar.gz re3-875cdd845db1255329c77c458df993f1b490e8e8.tar.bz2 re3-875cdd845db1255329c77c458df993f1b490e8e8.tar.lz re3-875cdd845db1255329c77c458df993f1b490e8e8.tar.xz re3-875cdd845db1255329c77c458df993f1b490e8e8.tar.zst re3-875cdd845db1255329c77c458df993f1b490e8e8.zip |
Diffstat (limited to 'src/control')
-rw-r--r-- | src/control/Darkel.cpp | 12 | ||||
-rw-r--r-- | src/control/Pickups.cpp | 5 | ||||
-rw-r--r-- | src/control/Pickups.h | 4 |
3 files changed, 15 insertions, 6 deletions
diff --git a/src/control/Darkel.cpp b/src/control/Darkel.cpp index ad8d1176..670c10fb 100644 --- a/src/control/Darkel.cpp +++ b/src/control/Darkel.cpp @@ -168,7 +168,7 @@ void CDarkel::ResetOnPlayerDeath() WeaponType = WEAPONTYPE_UZI; if (WeaponType < WEAPONTYPE_TOTALWEAPONS) { - FindPlayerPed()->m_bWeaponSlot = InterruptedWeapon; + FindPlayerPed()->m_nSelectedWepSlot = InterruptedWeapon; CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_weapons[CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_currentWeapon].m_nAmmoTotal = AmmoInterruptedWeapon; } @@ -187,7 +187,7 @@ void CDarkel::ResetOnPlayerDeath() WeaponType = WEAPONTYPE_UZI; if (WeaponType < WEAPONTYPE_TOTALWEAPONS) { - FindPlayerPed()->m_bWeaponSlot = InterruptedWeapon; + FindPlayerPed()->m_nSelectedWepSlot = InterruptedWeapon; CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_weapons[CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_currentWeapon].m_nAmmoTotal = AmmoInterruptedWeapon; } @@ -234,8 +234,8 @@ void CDarkel::StartFrenzy(eWeaponType weaponType, int32 time, int16 kill, int32 FindPlayerPed()->GiveWeapon(weaponType, 0); AmmoInterruptedWeapon = CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_weapons[CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_currentWeapon].m_nAmmoTotal; FindPlayerPed()->GiveWeapon(weaponType, 30000); - FindPlayerPed()->m_bWeaponSlot = CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_weapons[CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_currentWeapon].m_eWeaponType; - FindPlayerPed()->MakeChangesForNewWeapon(FindPlayerPed()->m_bWeaponSlot); + FindPlayerPed()->m_nSelectedWepSlot = CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_weapons[CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_currentWeapon].m_eWeaponType; + FindPlayerPed()->MakeChangesForNewWeapon(FindPlayerPed()->m_nSelectedWepSlot); if (FindPlayerVehicle()) { FindPlayerPed()->m_currentWeapon = CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_weapons[CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_currentWeapon].m_eWeaponType; @@ -277,7 +277,7 @@ void CDarkel::Update() WeaponType = WEAPONTYPE_UZI; if (WeaponType < WEAPONTYPE_TOTALWEAPONS) { - FindPlayerPed()->m_bWeaponSlot = InterruptedWeapon; + FindPlayerPed()->m_nSelectedWepSlot = InterruptedWeapon; CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_weapons[CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_currentWeapon].m_nAmmoTotal = AmmoInterruptedWeapon; } @@ -306,7 +306,7 @@ void CDarkel::Update() WeaponType = WEAPONTYPE_UZI; if (WeaponType < WEAPONTYPE_TOTALWEAPONS) { - FindPlayerPed()->m_bWeaponSlot = InterruptedWeapon; + FindPlayerPed()->m_nSelectedWepSlot = InterruptedWeapon; CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_weapons[CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_currentWeapon].m_nAmmoTotal = AmmoInterruptedWeapon; } diff --git a/src/control/Pickups.cpp b/src/control/Pickups.cpp index c93798fe..2770a948 100644 --- a/src/control/Pickups.cpp +++ b/src/control/Pickups.cpp @@ -4,11 +4,16 @@ CPickup(&CPickups::aPickUps)[NUMPICKUPS] = *(CPickup(*)[NUMPICKUPS])*(uintptr*)0x878C98; +// 20 ?! Some Miami leftover? (Originally at 0x5ED8D4) +uint16 CPickups::ms_maxAmmosForWeapons[20] = { 0, 1, 45, 125, 25, 150, 300, 25, 5, 250, 5, 5, 0, 500, 0, 100, 0, 0, 0, 0 }; + WRAPPER void CPickups::RenderPickUpText(void) { EAXJMP(0x432440); } WRAPPER void CPickups::DoCollectableEffects(CEntity *ent) { EAXJMP(0x431C30); } WRAPPER void CPickups::DoMoneyEffects(CEntity *ent) { EAXJMP(0x431F40); } WRAPPER void CPickups::DoMineEffects(CEntity *ent) { EAXJMP(0x4321C0); } WRAPPER void CPickups::DoPickUpEffects(CEntity *ent) { EAXJMP(0x431520); } WRAPPER void CPickups::RemoveAllFloatingPickups() { EAXJMP(0x430800); } +WRAPPER int32 CPickups::GenerateNewOne(CVector, uint32, uint8, uint32) { EAXJMP(0x4304B0); } +WRAPPER int32 CPickups::GenerateNewOne_WeaponType(CVector, eWeaponType, uint8, uint32) { EAXJMP(0x430660); } WRAPPER void CPacManPickups::Render(void) { EAXJMP(0x432F60); } diff --git a/src/control/Pickups.h b/src/control/Pickups.h index b740e72e..20a779a8 100644 --- a/src/control/Pickups.h +++ b/src/control/Pickups.h @@ -1,4 +1,5 @@ #pragma once +#include "Weapon.h" enum ePickupType { @@ -42,8 +43,11 @@ public: static void DoMineEffects(CEntity *ent); static void DoPickUpEffects(CEntity *ent); static void RemoveAllFloatingPickups(); + static int32 GenerateNewOne(CVector, uint32, uint8, uint32); + static int32 GenerateNewOne_WeaponType(CVector, eWeaponType, uint8, uint32); static CPickup (&aPickUps)[NUMPICKUPS]; + static uint16 ms_maxAmmosForWeapons[20]; }; class CPacManPickups |