diff options
author | _AG <gennariarmando@outlook.com> | 2019-07-04 22:31:21 +0200 |
---|---|---|
committer | _AG <gennariarmando@outlook.com> | 2019-07-04 22:33:19 +0200 |
commit | 9fed0c040c482bac8cba688e7564c8e8dfe23b30 (patch) | |
tree | 6098d16b702a3a057cd0bbd39bf3ece217c832c8 /src/weapons | |
parent | bdd5ed6a20bca63fffe7a7aa1ed2265bd53372f4 (diff) |
Darkel/Wanted update.
Diffstat (limited to 'src/weapons')
-rw-r--r-- | src/weapons/Weapon.h | 18 | ||||
-rw-r--r-- | src/weapons/WeaponInfo.cpp | 6 |
2 files changed, 15 insertions, 9 deletions
diff --git a/src/weapons/Weapon.h b/src/weapons/Weapon.h index 8cb435ce..a8a5d9b3 100644 --- a/src/weapons/Weapon.h +++ b/src/weapons/Weapon.h @@ -1,9 +1,9 @@ #pragma once #include "Entity.h" -enum eWeaponType : uint32 +enum eWeaponType { - WEAPONTYPE_UNARMED = 0, + WEAPONTYPE_UNARMED, WEAPONTYPE_BASEBALLBAT, WEAPONTYPE_COLT45, WEAPONTYPE_UZI, @@ -16,10 +16,16 @@ enum eWeaponType : uint32 WEAPONTYPE_MOLOTOV, WEAPONTYPE_GRENADE, WEAPONTYPE_DETONATOR, - NUM_PED_WEAPONTYPES = 13, - WEAPONTYPE_HELICANNON = 13, - NUM_WEAPONTYPES, - NO_STORED_WEAPON = 22 + WEAPONTYPE_TOTAL_INVENTORY_WEAPONS, + WEAPONTYPE_TOTALWEAPONS, + WEAPONTYPE_ARMOUR, + WEAPONTYPE_RAMMEDBYCAR, + WEAPONTYPE_RUNOVERBYCAR, + WEAPONTYPE_EXPLOSION, + WEAPONTYPE_UZI_DRIVEBY, + WEAPONTYPE_WATER, + WEAPONTYPE_FALL_DAMAGE, + WEAPONTYPE_UNIDENTIFIED, }; enum eWeaponFire { diff --git a/src/weapons/WeaponInfo.cpp b/src/weapons/WeaponInfo.cpp index 5be18c3c..6884d347 100644 --- a/src/weapons/WeaponInfo.cpp +++ b/src/weapons/WeaponInfo.cpp @@ -6,7 +6,7 @@ #include "AnimBlendAssociation.h" //CWeaponInfo (&CWeaponInfo::ms_apWeaponInfos)[14] = * (CWeaponInfo(*)[14]) * (uintptr*)0x6503EC; -CWeaponInfo CWeaponInfo::ms_apWeaponInfos[NUM_WEAPONTYPES]; +CWeaponInfo CWeaponInfo::ms_apWeaponInfos[WEAPONTYPE_TOTALWEAPONS]; static char ms_aWeaponNames[][32] = { "Unarmed", @@ -34,7 +34,7 @@ void CWeaponInfo::Initialise(void) { debug("Initialising CWeaponInfo...\n"); - for (int i = 0; i < NUM_WEAPONTYPES; i++) { + for (int i = 0; i < WEAPONTYPE_TOTALWEAPONS; i++) { ms_apWeaponInfos[i].m_eWeaponFire = WEAPON_FIRE_INSTANT_HIT; ms_apWeaponInfos[i].m_AnimToPlay = ANIM_PUNCH_R; ms_apWeaponInfos[i].m_Anim2ToPlay = NUM_ANIMS; @@ -176,7 +176,7 @@ CWeaponInfo::LoadWeaponData(void) eWeaponType CWeaponInfo::FindWeaponType(char *name) { - for (int i = 0; i < NUM_WEAPONTYPES; i++) { + for (int i = 0; i < WEAPONTYPE_TOTALWEAPONS; i++) { if (strcmp(ms_aWeaponNames[i], name) == 0) { return static_cast<eWeaponType>(i); } |