diff options
author | Sergeanur <s.anureev@yandex.ua> | 2020-01-07 16:26:23 +0100 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2020-01-07 16:26:40 +0100 |
commit | f7e962beaa9bb09629990a9fc8cd42f7ef29de7d (patch) | |
tree | be625fef86277d78ea20785f0055b377708f7d74 /src/weapons | |
parent | CPlayerPed & CMenuManager (#286) (diff) | |
download | re3-f7e962beaa9bb09629990a9fc8cd42f7ef29de7d.tar re3-f7e962beaa9bb09629990a9fc8cd42f7ef29de7d.tar.gz re3-f7e962beaa9bb09629990a9fc8cd42f7ef29de7d.tar.bz2 re3-f7e962beaa9bb09629990a9fc8cd42f7ef29de7d.tar.lz re3-f7e962beaa9bb09629990a9fc8cd42f7ef29de7d.tar.xz re3-f7e962beaa9bb09629990a9fc8cd42f7ef29de7d.tar.zst re3-f7e962beaa9bb09629990a9fc8cd42f7ef29de7d.zip |
Diffstat (limited to 'src/weapons')
-rw-r--r-- | src/weapons/CProjectileInfo.cpp | 10 | ||||
-rw-r--r-- | src/weapons/CProjectileInfo.h | 20 | ||||
-rw-r--r-- | src/weapons/ProjectileInfo.cpp | 9 | ||||
-rw-r--r-- | src/weapons/ProjectileInfo.h | 20 |
4 files changed, 28 insertions, 31 deletions
diff --git a/src/weapons/CProjectileInfo.cpp b/src/weapons/CProjectileInfo.cpp deleted file mode 100644 index f3c78ed8..00000000 --- a/src/weapons/CProjectileInfo.cpp +++ /dev/null @@ -1,10 +0,0 @@ -#include "CProjectileInfo.h" - -CProjectileInfo *gaProjectileInfo = (CProjectileInfo *)0x64ED50; -CProjectileInfo *CProjectileInfo::ms_apProjectile = (CProjectileInfo *)0x87C748; - -CProjectileInfo * -CProjectileInfo::GetProjectileInfo(int32 id) -{ - return &gaProjectileInfo[id]; -} diff --git a/src/weapons/CProjectileInfo.h b/src/weapons/CProjectileInfo.h deleted file mode 100644 index 426d25f1..00000000 --- a/src/weapons/CProjectileInfo.h +++ /dev/null @@ -1,20 +0,0 @@ -#pragma once - -#include "Object.h" -#include "Weapon.h" - -struct CProjectileInfo : public CObject { - eWeaponType m_eWeaponType; - CEntity *m_pSource; - int m_nExplosionTime; - char m_bInUse; - char field_13; - char field_14; - char field_15; - CVector m_vecPos; - - static CProjectileInfo *GetProjectileInfo(int32 id); - static CProjectileInfo *ms_apProjectile; -}; - -extern CProjectileInfo *gaProjectileInfo;
\ No newline at end of file diff --git a/src/weapons/ProjectileInfo.cpp b/src/weapons/ProjectileInfo.cpp index 7919b8ab..efb9dab3 100644 --- a/src/weapons/ProjectileInfo.cpp +++ b/src/weapons/ProjectileInfo.cpp @@ -3,6 +3,15 @@ #include "ProjectileInfo.h" #include "Projectile.h" +CProjectileInfo* gaProjectileInfo = (CProjectileInfo*)0x64ED50; +CProjectile* (&CProjectileInfo::ms_apProjectile)[32] = *(CProjectile*(*)[32])*(uintptr*)0x87C748; + WRAPPER void CProjectileInfo::RemoveAllProjectiles(void) { EAXJMP(0x55BB80); } WRAPPER bool CProjectileInfo::RemoveIfThisIsAProjectile(CObject *pObject) { EAXJMP(0x55BBD0); } WRAPPER bool CProjectileInfo::IsProjectileInRange(float x1, float x2, float y1, float y2, float z1, float z2, bool remove) { EAXJMP(0x55BA50); } + +CProjectileInfo* +CProjectileInfo::GetProjectileInfo(int32 id) +{ + return &gaProjectileInfo[id]; +} diff --git a/src/weapons/ProjectileInfo.h b/src/weapons/ProjectileInfo.h index e1faf028..7a1b5b53 100644 --- a/src/weapons/ProjectileInfo.h +++ b/src/weapons/ProjectileInfo.h @@ -1,11 +1,29 @@ #pragma once
+class CEntity;
class CObject;
+class CProjectile;
+enum eWeaponType;
class CProjectileInfo
{
public:
+ eWeaponType m_eWeaponType;
+ CEntity* m_pSource;
+ int m_nExplosionTime;
+ char m_bInUse;
+ char field_13;
+ char field_14;
+ char field_15;
+ CVector m_vecPos;
+
+public:
+ static CProjectileInfo* GetProjectileInfo(int32 id);
+ static CProjectile* (&ms_apProjectile)[32];
+
static bool RemoveIfThisIsAProjectile(CObject *pObject);
static void RemoveAllProjectiles(void);
static bool IsProjectileInRange(float x1, float x2, float y1, float y2, float z1, float z2, bool remove);
-};
\ No newline at end of file +};
+
+extern CProjectileInfo* gaProjectileInfo;
\ No newline at end of file |