summaryrefslogtreecommitdiffstats
path: root/src/weapons/WeaponInfo.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-05-23 19:07:30 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-05-23 19:07:30 +0200
commit2966be41ba98906126b68cd780ff81bdf644c72f (patch)
tree04f057aea609a4a36f744aa77324626a592ef010 /src/weapons/WeaponInfo.cpp
parentset pieces (diff)
parentMerge branch 'miami' of https://github.com/GTAmodding/re3 into miami (diff)
downloadre3-2966be41ba98906126b68cd780ff81bdf644c72f.tar
re3-2966be41ba98906126b68cd780ff81bdf644c72f.tar.gz
re3-2966be41ba98906126b68cd780ff81bdf644c72f.tar.bz2
re3-2966be41ba98906126b68cd780ff81bdf644c72f.tar.lz
re3-2966be41ba98906126b68cd780ff81bdf644c72f.tar.xz
re3-2966be41ba98906126b68cd780ff81bdf644c72f.tar.zst
re3-2966be41ba98906126b68cd780ff81bdf644c72f.zip
Diffstat (limited to 'src/weapons/WeaponInfo.cpp')
-rw-r--r--src/weapons/WeaponInfo.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/weapons/WeaponInfo.cpp b/src/weapons/WeaponInfo.cpp
index d5e759b9..104fa2ec 100644
--- a/src/weapons/WeaponInfo.cpp
+++ b/src/weapons/WeaponInfo.cpp
@@ -12,6 +12,7 @@
// Yeah...
int32 CWeaponInfo::ms_aMaxAmmoForWeapon[WEAPONTYPE_TOTALWEAPONS] = {
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1
};
CWeaponInfo CWeaponInfo::ms_apWeaponInfos[WEAPONTYPE_TOTALWEAPONS];
@@ -32,21 +33,29 @@ static char ms_aWeaponNames[][32] = {
"Chainsaw",
"Grenade",
"DetonateGrenade",
+ "TearGas",
"Molotov",
"Rocket",
"Colt45",
+ "Python",
"Shotgun",
+ "Spas12Shotgun",
+ "StubbyShotgun",
"Tec9",
"Uzi",
"SilencedIngram",
"Mp5",
- "M16",
- "AK47",
+ "m4",
+ "Ruger",
"SniperRifle",
+ "LaserScope",
"RocketLauncher",
"FlameThrower",
+ "M60",
+ "Minigun",
"Detonator",
"HeliCannon",
+ "Camera",
};
CWeaponInfo*
@@ -223,9 +232,7 @@ CWeaponInfo::LoadWeaponData(void)
ms_apWeaponInfos[weaponType].m_nWeaponSlot = weaponSlot;
- // TODO(Miami): Enable once weapons are done
- if (animLoopEnd < 98.0f && weaponType != WEAPONTYPE_FLAMETHROWER && weaponType != WEAPONTYPE_SHOTGUN
- /*&& weaponType != 20 && weaponType != 21*/)
+ if (animLoopEnd < 98.0f && weaponType != WEAPONTYPE_FLAMETHROWER && !CWeapon::IsShotgun(weaponType))
ms_apWeaponInfos[weaponType].m_nFiringRate = ((ms_apWeaponInfos[weaponType].m_fAnimLoopEnd - ms_apWeaponInfos[weaponType].m_fAnimLoopStart) * 900.0f);
if (weaponType == WEAPONTYPE_DETONATOR || weaponType == WEAPONTYPE_HELICANNON)
@@ -263,6 +270,7 @@ CWeaponInfo::FindWeaponFireType(char *name)
if (strcmp(name, "INSTANT_HIT") == 0) return WEAPON_FIRE_INSTANT_HIT;
if (strcmp(name, "PROJECTILE") == 0) return WEAPON_FIRE_PROJECTILE;
if (strcmp(name, "AREA_EFFECT") == 0) return WEAPON_FIRE_AREA_EFFECT;
+ if (strcmp(name, "CAMERA") == 0) return WEAPON_FIRE_CAMERA;
Error("Unknown weapon fire type, WeaponInfo.cpp");
return WEAPON_FIRE_INSTANT_HIT;
}