From f435455bdee2bbe6a55f12fb8854659260b7a559 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Thu, 16 Apr 2020 01:56:15 +0300 Subject: [PATCH] Removed refs from weapons/, WeaponEffects moved --- src/weapons/Explosion.cpp | 2 +- src/weapons/Explosion.h | 2 +- src/weapons/ProjectileInfo.cpp | 4 ++-- src/weapons/ProjectileInfo.h | 8 ++++---- src/{render => weapons}/WeaponEffects.cpp | 0 src/{render => weapons}/WeaponEffects.h | 0 6 files changed, 8 insertions(+), 8 deletions(-) rename src/{render => weapons}/WeaponEffects.cpp (100%) rename src/{render => weapons}/WeaponEffects.h (100%) diff --git a/src/weapons/Explosion.cpp b/src/weapons/Explosion.cpp index 3d00052a..02243702 100644 --- a/src/weapons/Explosion.cpp +++ b/src/weapons/Explosion.cpp @@ -19,7 +19,7 @@ #include "WaterLevel.h" #include "World.h" -CExplosion(&gaExplosion)[NUM_EXPLOSIONS] = *(CExplosion(*)[NUM_EXPLOSIONS])*(uintptr*)0x64E208; +CExplosion gaExplosion[NUM_EXPLOSIONS]; // these two were not initialised in original code, I'm really not sure what were they meant to be RwRGBA colMedExpl = { 0, 0, 0, 0 }; diff --git a/src/weapons/Explosion.h b/src/weapons/Explosion.h index 45e2d5bb..bf54328c 100644 --- a/src/weapons/Explosion.h +++ b/src/weapons/Explosion.h @@ -46,4 +46,4 @@ public: static void RemoveAllExplosionsInArea(CVector pos, float radius); }; -extern CExplosion (&gaExplosion)[NUM_EXPLOSIONS]; \ No newline at end of file +extern CExplosion gaExplosion[NUM_EXPLOSIONS]; \ No newline at end of file diff --git a/src/weapons/ProjectileInfo.cpp b/src/weapons/ProjectileInfo.cpp index b33d2d62..8f04278c 100644 --- a/src/weapons/ProjectileInfo.cpp +++ b/src/weapons/ProjectileInfo.cpp @@ -13,8 +13,8 @@ #include "Weapon.h" #include "World.h" -CProjectileInfo (&gaProjectileInfo)[NUM_PROJECTILES] = *(CProjectileInfo(*)[NUM_PROJECTILES])*(uintptr*)0x64ED50; -CProjectile* (&CProjectileInfo::ms_apProjectile)[NUM_PROJECTILES] = *(CProjectile*(*)[NUM_PROJECTILES])*(uintptr*)0x87C748; +CProjectileInfo gaProjectileInfo[NUM_PROJECTILES]; +CProjectile *CProjectileInfo::ms_apProjectile[NUM_PROJECTILES]; void CProjectileInfo::Initialise() diff --git a/src/weapons/ProjectileInfo.h b/src/weapons/ProjectileInfo.h index a4ea369a..b88322f9 100644 --- a/src/weapons/ProjectileInfo.h +++ b/src/weapons/ProjectileInfo.h @@ -9,14 +9,14 @@ class CProjectileInfo { public: eWeaponType m_eWeaponType; - CEntity* m_pSource; + CEntity *m_pSource; uint32 m_nExplosionTime; bool m_bInUse; CVector m_vecPos; public: - static CProjectileInfo* GetProjectileInfo(int32 id); - static CProjectile* (&ms_apProjectile)[NUM_PROJECTILES]; + static CProjectileInfo *GetProjectileInfo(int32 id); + static CProjectile *ms_apProjectile[NUM_PROJECTILES]; static void Initialise(); static void Shutdown(); @@ -29,4 +29,4 @@ public: static bool IsProjectileInRange(float x1, float x2, float y1, float y2, float z1, float z2, bool remove); }; -extern CProjectileInfo (&gaProjectileInfo)[NUM_PROJECTILES]; \ No newline at end of file +extern CProjectileInfo gaProjectileInfo[NUM_PROJECTILES]; \ No newline at end of file diff --git a/src/render/WeaponEffects.cpp b/src/weapons/WeaponEffects.cpp similarity index 100% rename from src/render/WeaponEffects.cpp rename to src/weapons/WeaponEffects.cpp diff --git a/src/render/WeaponEffects.h b/src/weapons/WeaponEffects.h similarity index 100% rename from src/render/WeaponEffects.h rename to src/weapons/WeaponEffects.h