summaryrefslogtreecommitdiffstats
path: root/src/objects/Projectile.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-01-07 16:26:23 +0100
committerSergeanur <s.anureev@yandex.ua>2020-01-07 16:26:40 +0100
commitf7e962beaa9bb09629990a9fc8cd42f7ef29de7d (patch)
treebe625fef86277d78ea20785f0055b377708f7d74 /src/objects/Projectile.cpp
parentCPlayerPed & CMenuManager (#286) (diff)
downloadre3-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/objects/Projectile.cpp')
-rw-r--r--src/objects/Projectile.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/objects/Projectile.cpp b/src/objects/Projectile.cpp
index c6c2d6e1..38bbfdfa 100644
--- a/src/objects/Projectile.cpp
+++ b/src/objects/Projectile.cpp
@@ -2,12 +2,26 @@
#include "patcher.h"
#include "Projectile.h"
+CProjectile::CProjectile(int32 model) : CObject()
+{
+ m_fMass = 1.0f;
+ m_fTurnMass = 1.0f;
+ m_fAirResistance = 0.99f;
+ m_fElasticity = 0.75f;
+ m_fBuoyancy = GRAVITY * m_fMass * 0.1f;
+ bExplosionProof = true;
+ SetModelIndex(model);
+ ObjectCreatedBy = MISSION_OBJECT;
+}
+
class CProjectile_ : public CProjectile
{
public:
+ CProjectile* ctor(int32 model) { return ::new (this) CProjectile(model); }
void dtor(void) { CProjectile::~CProjectile(); }
};
STARTPATCHES
+ InjectHook(0x4BFE30, &CProjectile_::ctor, PATCH_JUMP);
InjectHook(0x4BFED0, &CProjectile_::dtor, PATCH_JUMP);
ENDPATCHES