summaryrefslogtreecommitdiffstats
path: root/src/weapons
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-05-31 17:05:49 +0200
committeraap <aap@papnet.eu>2020-05-31 17:05:59 +0200
commit21ce0a4b28a1842dad91433362d250089ec491b8 (patch)
tree8c661c49f994d95de6997e0bf4f71cb0ab41dd05 /src/weapons
parentsome more CAutomobile (diff)
downloadre3-21ce0a4b28a1842dad91433362d250089ec491b8.tar
re3-21ce0a4b28a1842dad91433362d250089ec491b8.tar.gz
re3-21ce0a4b28a1842dad91433362d250089ec491b8.tar.bz2
re3-21ce0a4b28a1842dad91433362d250089ec491b8.tar.lz
re3-21ce0a4b28a1842dad91433362d250089ec491b8.tar.xz
re3-21ce0a4b28a1842dad91433362d250089ec491b8.tar.zst
re3-21ce0a4b28a1842dad91433362d250089ec491b8.zip
Diffstat (limited to '')
-rw-r--r--src/weapons/Explosion.cpp2
-rw-r--r--src/weapons/Explosion.h3
-rw-r--r--src/weapons/Weapon.cpp12
-rw-r--r--src/weapons/Weapon.h1
4 files changed, 16 insertions, 2 deletions
diff --git a/src/weapons/Explosion.cpp b/src/weapons/Explosion.cpp
index d0a68279..f4ad346d 100644
--- a/src/weapons/Explosion.cpp
+++ b/src/weapons/Explosion.cpp
@@ -86,7 +86,7 @@ CExplosion::GetExplosionPosition(uint8 id)
}
bool
-CExplosion::AddExplosion(CEntity *explodingEntity, CEntity *culprit, eExplosionType type, const CVector &pos, uint32 lifetime)
+CExplosion::AddExplosion(CEntity *explodingEntity, CEntity *culprit, eExplosionType type, const CVector &pos, uint32 lifetime, bool unk)
{
CVector pPosn;
CVector posGround;
diff --git a/src/weapons/Explosion.h b/src/weapons/Explosion.h
index bf54328c..c8539cca 100644
--- a/src/weapons/Explosion.h
+++ b/src/weapons/Explosion.h
@@ -40,7 +40,8 @@ public:
static void ResetExplosionActiveCounter(uint8 id);
static uint8 GetExplosionType(uint8 id);
static CVector *GetExplosionPosition(uint8 id);
- static bool AddExplosion(CEntity *explodingEntity, CEntity *culprit, eExplosionType type, const CVector &pos, uint32 lifetime);
+// TODO(MIAMI): that new parameter
+ static bool AddExplosion(CEntity *explodingEntity, CEntity *culprit, eExplosionType type, const CVector &pos, uint32 lifetime, bool unk = true);
static void Update();
static bool TestForExplosionInArea(eExplosionType type, float x1, float x2, float y1, float y2, float z1, float z2);
static void RemoveAllExplosionsInArea(CVector pos, float radius);
diff --git a/src/weapons/Weapon.cpp b/src/weapons/Weapon.cpp
index 0ac37e31..b2ac2ad2 100644
--- a/src/weapons/Weapon.cpp
+++ b/src/weapons/Weapon.cpp
@@ -113,6 +113,18 @@ CWeapon::UpdateWeapons(void)
CBulletInfo::Update();
}
+//--MIAMI: done
+CWeapon::CWeapon(eWeaponType type, int32 ammo)
+{
+ m_eWeaponType = type;
+ m_eWeaponState = WEAPONSTATE_READY;
+ m_nAmmoTotal = Min(ammo, 99999);
+ m_nAmmoInClip = 0;
+ Reload();
+ m_nTimer = 0;
+ m_bAddRotOffset = false;
+}
+
// --MIAMI: Done
void
CWeapon::Initialise(eWeaponType type, int32 ammo)
diff --git a/src/weapons/Weapon.h b/src/weapons/Weapon.h
index b4ed93c3..8680fdcf 100644
--- a/src/weapons/Weapon.h
+++ b/src/weapons/Weapon.h
@@ -25,6 +25,7 @@ public:
CWeapon() {
m_bAddRotOffset = false;
}
+ CWeapon(eWeaponType type, int32 ammo);
CWeaponInfo *GetInfo();