From 5b1ffb09124c7427b7efb421091179ddecc725c4 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Thu, 17 Oct 2019 00:53:25 +0300 Subject: Some CPool and CPools funcs, restoring original logic of pool lookup loops --- src/weapons/ProjectileInfo.cpp | 7 +++++++ src/weapons/ProjectileInfo.h | 9 +++++++++ 2 files changed, 16 insertions(+) create mode 100644 src/weapons/ProjectileInfo.cpp create mode 100644 src/weapons/ProjectileInfo.h (limited to 'src/weapons') diff --git a/src/weapons/ProjectileInfo.cpp b/src/weapons/ProjectileInfo.cpp new file mode 100644 index 00000000..50d75516 --- /dev/null +++ b/src/weapons/ProjectileInfo.cpp @@ -0,0 +1,7 @@ +#include "common.h" +#include "patcher.h" +#include "ProjectileInfo.h" +#include "Projectile.h" + + +WRAPPER bool CProjectileInfo::RemoveIfThisIsAProjectile(CObject *pObject) { EAXJMP(0x55BBD0); } \ No newline at end of file diff --git a/src/weapons/ProjectileInfo.h b/src/weapons/ProjectileInfo.h new file mode 100644 index 00000000..f4753b28 --- /dev/null +++ b/src/weapons/ProjectileInfo.h @@ -0,0 +1,9 @@ +#pragma once + +class CObject; + +class CProjectileInfo +{ +public: + static bool RemoveIfThisIsAProjectile(CObject *pObject); +}; \ No newline at end of file -- cgit v1.2.3 From f56684d04e06af21f423ad4bc1c47bc2b09fccea Mon Sep 17 00:00:00 2001 From: nmzik Date: Sat, 19 Oct 2019 01:23:40 +0300 Subject: CGame::Process() && CGame::ReloadIPLs --- src/weapons/Weapon.cpp | 1 + src/weapons/Weapon.h | 1 + 2 files changed, 2 insertions(+) (limited to 'src/weapons') diff --git a/src/weapons/Weapon.cpp b/src/weapons/Weapon.cpp index 3f511358..860e3ab2 100644 --- a/src/weapons/Weapon.cpp +++ b/src/weapons/Weapon.cpp @@ -6,6 +6,7 @@ #include "Ped.h" #include "World.h" +WRAPPER void CWeapon::UpdateWeapons(void) { EAXJMP(0x55C310); } WRAPPER bool CWeapon::Fire(CEntity*, CVector*) { EAXJMP(0x55C380); } WRAPPER void CWeapon::FireFromCar(CAutomobile *car, bool left) { EAXJMP(0x55C940); } WRAPPER void CWeapon::AddGunshell(CEntity*, CVector const&, CVector2D const&, float) { EAXJMP(0x55F770); } diff --git a/src/weapons/Weapon.h b/src/weapons/Weapon.h index 2f277c62..1663ee0d 100644 --- a/src/weapons/Weapon.h +++ b/src/weapons/Weapon.h @@ -73,5 +73,6 @@ public: static void DoTankDoomAiming(CEntity *playerVehicle, CEntity *playerPed, CVector *start, CVector *end); bool HitsGround(CEntity* holder, CVector* firePos, CEntity* aimingTo); static void InitialiseWeapons(void); + static void UpdateWeapons(void); }; static_assert(sizeof(CWeapon) == 0x18, "CWeapon: error"); -- cgit v1.2.3 From d2941b03689575fc0158683daae7883402a92651 Mon Sep 17 00:00:00 2001 From: Filip Gawin Date: Tue, 24 Sep 2019 13:33:16 +0200 Subject: More audio (to hook and test) --- src/weapons/CProjectileInfo.cpp | 10 ++++++++++ src/weapons/CProjectileInfo.h | 20 ++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 src/weapons/CProjectileInfo.cpp create mode 100644 src/weapons/CProjectileInfo.h (limited to 'src/weapons') diff --git a/src/weapons/CProjectileInfo.cpp b/src/weapons/CProjectileInfo.cpp new file mode 100644 index 00000000..f3c78ed8 --- /dev/null +++ b/src/weapons/CProjectileInfo.cpp @@ -0,0 +1,10 @@ +#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 new file mode 100644 index 00000000..426d25f1 --- /dev/null +++ b/src/weapons/CProjectileInfo.h @@ -0,0 +1,20 @@ +#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 -- cgit v1.2.3