Enable Stinger

This commit is contained in:
eray orçunus
2020-09-01 21:10:35 +03:00
parent 0640ec7f5a
commit 16e10d788a
4 changed files with 48 additions and 16 deletions

View File

@ -51,6 +51,7 @@ CStinger::Init(CPed *pPed)
}
bIsDeployed = true;
m_vPos = pPed->GetPosition();
m_vPos.z -= 1.0f;
m_fMax_Z = Atan2(-pPed->GetForward().x, pPed->GetForward().y) + HALFPI;
for (i = 0; i < NUM_STINGER_SEGMENTS; i++) {
@ -61,7 +62,7 @@ CStinger::Init(CPed *pPed)
CVector2D fwd2d(pPed->GetForward().x, pPed->GetForward().y);
for (i = 0; i < ARRAY_SIZE(m_vPositions); i++)
m_vPositions[i] = fwd2d * Sin(DEGTORAD(i));
m_vPositions[i] = fwd2d * 1.8f * Sin(DEGTORAD(i));
m_nSpikeState = STINGERSTATE_NONE;
m_nTimeOfDeploy = CTimer::GetTimeInMilliseconds();

View File

@ -11,16 +11,17 @@ public:
#define NUM_STINGER_SEGMENTS (12)
enum {
STINGERSTATE_NONE = 0,
STINGERSTATE_DEPLOYING,
STINGERSTATE_DEPLOYED,
STINGERSTATE_UNDEPLOYING,
STINGERSTATE_REMOVE,
};
class CStinger
{
enum {
STINGERSTATE_NONE = 0,
STINGERSTATE_DEPLOYING,
STINGERSTATE_DEPLOYED,
STINGERSTATE_UNDEPLOYING,
STINGERSTATE_REMOVE,
};
public:
bool bIsDeployed;
uint32 m_nTimeOfDeploy;
CVector m_vPos;
@ -30,7 +31,6 @@ class CStinger
CStingerSegment *pSpikes[NUM_STINGER_SEGMENTS];
class CPed *pOwner;
uint8 m_nSpikeState;
public:
CStinger();
void Init(CPed *pPed);
void Remove();