2019-06-30 10:59:55 +00:00
|
|
|
#include "common.h"
|
|
|
|
#include "patcher.h"
|
|
|
|
#include "Projectile.h"
|
|
|
|
|
2020-01-07 15:26:23 +00:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2019-07-08 06:46:42 +00:00
|
|
|
class CProjectile_ : public CProjectile
|
|
|
|
{
|
|
|
|
public:
|
2020-01-07 15:26:23 +00:00
|
|
|
CProjectile* ctor(int32 model) { return ::new (this) CProjectile(model); }
|
2019-07-08 06:46:42 +00:00
|
|
|
void dtor(void) { CProjectile::~CProjectile(); }
|
|
|
|
};
|
|
|
|
|
2019-06-30 10:59:55 +00:00
|
|
|
STARTPATCHES
|
2020-01-07 15:26:23 +00:00
|
|
|
InjectHook(0x4BFE30, &CProjectile_::ctor, PATCH_JUMP);
|
2019-07-08 06:46:42 +00:00
|
|
|
InjectHook(0x4BFED0, &CProjectile_::dtor, PATCH_JUMP);
|
|
|
|
ENDPATCHES
|