mirror of
https://github.com/halpz/re3.git
synced 2024-12-26 18:15:27 +00:00
Wheelie opcode
This commit is contained in:
parent
80a83d48f3
commit
f403a63a5c
|
@ -12725,14 +12725,20 @@ int8 CRunningScript::ProcessCommands1200To1299(int32 command)
|
||||||
case COMMAND_GET_WHEELIE_STATS:
|
case COMMAND_GET_WHEELIE_STATS:
|
||||||
{
|
{
|
||||||
CollectParameters(&m_nIp, 1);
|
CollectParameters(&m_nIp, 1);
|
||||||
static bool bShowed = false;
|
CPlayerInfo* pPlayerInfo = &CWorld::Players[ScriptParams[0]];
|
||||||
if (!bShowed) {
|
ScriptParams[0] = pPlayerInfo->m_nLastTimeCarSpentOnTwoWheels;
|
||||||
debug("GET_WHEELIE_STATS not implemented\n");
|
ScriptParams[1] = pPlayerInfo->m_nLastDistanceCarTravelledOnTwoWheels;
|
||||||
bShowed = true;
|
ScriptParams[2] = pPlayerInfo->m_nLastTimeSpentOnWheelie;
|
||||||
}
|
ScriptParams[3] = pPlayerInfo->m_nLastDistanceTravelledOnWheelie;
|
||||||
for (int i = 0; i < 6; i++)
|
ScriptParams[4] = pPlayerInfo->m_nLastTimeSpentOnStoppie;
|
||||||
ScriptParams[i] = 0;
|
ScriptParams[5] = pPlayerInfo->m_nLastDistanceTravelledOnStoppie;
|
||||||
StoreParameters(&m_nIp, 6);
|
StoreParameters(&m_nIp, 6);
|
||||||
|
pPlayerInfo->m_nLastTimeCarSpentOnTwoWheels = 0;
|
||||||
|
pPlayerInfo->m_nLastDistanceCarTravelledOnTwoWheels = 0;
|
||||||
|
pPlayerInfo->m_nLastTimeSpentOnWheelie = 0;
|
||||||
|
pPlayerInfo->m_nLastDistanceTravelledOnWheelie = 0;
|
||||||
|
pPlayerInfo->m_nLastTimeSpentOnStoppie = 0;
|
||||||
|
pPlayerInfo->m_nLastDistanceTravelledOnStoppie = 0;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
//case COMMAND_DISARM_CHAR:
|
//case COMMAND_DISARM_CHAR:
|
||||||
|
|
|
@ -160,12 +160,12 @@ CPlayerInfo::Clear(void)
|
||||||
m_nTimeSpentOnStoppie = 0;
|
m_nTimeSpentOnStoppie = 0;
|
||||||
m_nDistanceTravelledOnStoppie = 0.0f;
|
m_nDistanceTravelledOnStoppie = 0.0f;
|
||||||
m_nCancelWheelStuntTimer = 0;
|
m_nCancelWheelStuntTimer = 0;
|
||||||
m_nPrevTimeCarSpentOnTwoWheels = 0;
|
m_nLastTimeCarSpentOnTwoWheels = 0;
|
||||||
m_nPrevDistanceCarTravelledOnTwoWheels = 0;
|
m_nLastDistanceCarTravelledOnTwoWheels = 0;
|
||||||
m_nPrevTimeSpentOnWheelie = 0;
|
m_nLastTimeSpentOnWheelie = 0;
|
||||||
m_nPrevDistanceTravelledOnWheelie = 0;
|
m_nLastDistanceTravelledOnWheelie = 0;
|
||||||
m_nPrevTimeSpentOnStoppie = 0;
|
m_nLastTimeSpentOnStoppie = 0;
|
||||||
m_nPrevDistanceTravelledOnStoppie = 0;
|
m_nLastDistanceTravelledOnStoppie = 0;
|
||||||
m_bInfiniteSprint = false;
|
m_bInfiniteSprint = false;
|
||||||
m_bFastReload = false;
|
m_bFastReload = false;
|
||||||
m_bFireproof = false;
|
m_bFireproof = false;
|
||||||
|
@ -415,8 +415,8 @@ CPlayerInfo::Process(void)
|
||||||
m_nCancelWheelStuntTimer += CTimer::GetTimeStepInMilliseconds();
|
m_nCancelWheelStuntTimer += CTimer::GetTimeStepInMilliseconds();
|
||||||
} else {
|
} else {
|
||||||
if (m_nTimeCarSpentOnTwoWheels >= 2000) {
|
if (m_nTimeCarSpentOnTwoWheels >= 2000) {
|
||||||
m_nPrevTimeCarSpentOnTwoWheels = m_nTimeCarSpentOnTwoWheels;
|
m_nLastTimeCarSpentOnTwoWheels = m_nTimeCarSpentOnTwoWheels;
|
||||||
m_nPrevDistanceCarTravelledOnTwoWheels = m_nDistanceCarTravelledOnTwoWheels;
|
m_nLastDistanceCarTravelledOnTwoWheels = m_nDistanceCarTravelledOnTwoWheels;
|
||||||
if (CStats::Longest2Wheel < m_nTimeCarSpentOnTwoWheels / 1000)
|
if (CStats::Longest2Wheel < m_nTimeCarSpentOnTwoWheels / 1000)
|
||||||
CStats::Longest2Wheel = m_nTimeCarSpentOnTwoWheels / 1000;
|
CStats::Longest2Wheel = m_nTimeCarSpentOnTwoWheels / 1000;
|
||||||
if (CStats::Longest2WheelDist < m_nDistanceCarTravelledOnTwoWheels)
|
if (CStats::Longest2WheelDist < m_nDistanceCarTravelledOnTwoWheels)
|
||||||
|
@ -443,8 +443,8 @@ CPlayerInfo::Process(void)
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (m_nTimeCarSpentOnTwoWheels >= 2000) {
|
if (m_nTimeCarSpentOnTwoWheels >= 2000) {
|
||||||
m_nPrevTimeCarSpentOnTwoWheels = m_nTimeCarSpentOnTwoWheels;
|
m_nLastTimeCarSpentOnTwoWheels = m_nTimeCarSpentOnTwoWheels;
|
||||||
m_nPrevDistanceCarTravelledOnTwoWheels = m_nDistanceCarTravelledOnTwoWheels;
|
m_nLastDistanceCarTravelledOnTwoWheels = m_nDistanceCarTravelledOnTwoWheels;
|
||||||
if (CStats::Longest2Wheel < m_nTimeCarSpentOnTwoWheels / 1000)
|
if (CStats::Longest2Wheel < m_nTimeCarSpentOnTwoWheels / 1000)
|
||||||
CStats::Longest2Wheel = m_nTimeCarSpentOnTwoWheels / 1000;
|
CStats::Longest2Wheel = m_nTimeCarSpentOnTwoWheels / 1000;
|
||||||
if (CStats::Longest2WheelDist < m_nDistanceCarTravelledOnTwoWheels)
|
if (CStats::Longest2WheelDist < m_nDistanceCarTravelledOnTwoWheels)
|
||||||
|
@ -456,8 +456,8 @@ CPlayerInfo::Process(void)
|
||||||
}
|
}
|
||||||
} else if (m_nTimeCarSpentOnTwoWheels != 0) {
|
} else if (m_nTimeCarSpentOnTwoWheels != 0) {
|
||||||
if (m_nTimeCarSpentOnTwoWheels >= 2000) {
|
if (m_nTimeCarSpentOnTwoWheels >= 2000) {
|
||||||
m_nPrevTimeCarSpentOnTwoWheels = m_nTimeCarSpentOnTwoWheels;
|
m_nLastTimeCarSpentOnTwoWheels = m_nTimeCarSpentOnTwoWheels;
|
||||||
m_nPrevDistanceCarTravelledOnTwoWheels = m_nDistanceCarTravelledOnTwoWheels;
|
m_nLastDistanceCarTravelledOnTwoWheels = m_nDistanceCarTravelledOnTwoWheels;
|
||||||
if (CStats::Longest2Wheel < m_nTimeCarSpentOnTwoWheels / 1000)
|
if (CStats::Longest2Wheel < m_nTimeCarSpentOnTwoWheels / 1000)
|
||||||
CStats::Longest2Wheel = m_nTimeCarSpentOnTwoWheels / 1000;
|
CStats::Longest2Wheel = m_nTimeCarSpentOnTwoWheels / 1000;
|
||||||
if (CStats::Longest2WheelDist < m_nDistanceCarTravelledOnTwoWheels)
|
if (CStats::Longest2WheelDist < m_nDistanceCarTravelledOnTwoWheels)
|
||||||
|
@ -483,8 +483,8 @@ CPlayerInfo::Process(void)
|
||||||
m_nCancelWheelStuntTimer += CTimer::GetTimeStepInMilliseconds();
|
m_nCancelWheelStuntTimer += CTimer::GetTimeStepInMilliseconds();
|
||||||
} else {
|
} else {
|
||||||
if (m_nTimeSpentOnWheelie >= 5000) {
|
if (m_nTimeSpentOnWheelie >= 5000) {
|
||||||
m_nPrevTimeSpentOnWheelie = m_nTimeSpentOnWheelie;
|
m_nLastTimeSpentOnWheelie = m_nTimeSpentOnWheelie;
|
||||||
m_nPrevDistanceTravelledOnWheelie = m_nDistanceTravelledOnWheelie;
|
m_nLastDistanceTravelledOnWheelie = m_nDistanceTravelledOnWheelie;
|
||||||
if (CStats::LongestWheelie < m_nTimeSpentOnWheelie / 1000)
|
if (CStats::LongestWheelie < m_nTimeSpentOnWheelie / 1000)
|
||||||
CStats::LongestWheelie = m_nTimeSpentOnWheelie / 1000;
|
CStats::LongestWheelie = m_nTimeSpentOnWheelie / 1000;
|
||||||
if (CStats::LongestWheelieDist < m_nDistanceTravelledOnWheelie)
|
if (CStats::LongestWheelieDist < m_nDistanceTravelledOnWheelie)
|
||||||
|
@ -497,8 +497,8 @@ CPlayerInfo::Process(void)
|
||||||
}
|
}
|
||||||
} else if (m_nTimeSpentOnWheelie != 0) {
|
} else if (m_nTimeSpentOnWheelie != 0) {
|
||||||
if (m_nTimeSpentOnWheelie >= 5000) {
|
if (m_nTimeSpentOnWheelie >= 5000) {
|
||||||
m_nPrevTimeSpentOnWheelie = m_nTimeSpentOnWheelie;
|
m_nLastTimeSpentOnWheelie = m_nTimeSpentOnWheelie;
|
||||||
m_nPrevDistanceTravelledOnWheelie = m_nDistanceTravelledOnWheelie;
|
m_nLastDistanceTravelledOnWheelie = m_nDistanceTravelledOnWheelie;
|
||||||
if (CStats::LongestWheelie < m_nTimeSpentOnWheelie / 1000)
|
if (CStats::LongestWheelie < m_nTimeSpentOnWheelie / 1000)
|
||||||
CStats::LongestWheelie = m_nTimeSpentOnWheelie / 1000;
|
CStats::LongestWheelie = m_nTimeSpentOnWheelie / 1000;
|
||||||
if (CStats::LongestWheelieDist < m_nDistanceTravelledOnWheelie)
|
if (CStats::LongestWheelieDist < m_nDistanceTravelledOnWheelie)
|
||||||
|
@ -519,8 +519,8 @@ CPlayerInfo::Process(void)
|
||||||
m_nCancelWheelStuntTimer += CTimer::GetTimeStepInMilliseconds();
|
m_nCancelWheelStuntTimer += CTimer::GetTimeStepInMilliseconds();
|
||||||
} else {
|
} else {
|
||||||
if (m_nTimeSpentOnStoppie >= 2000) {
|
if (m_nTimeSpentOnStoppie >= 2000) {
|
||||||
m_nPrevTimeSpentOnStoppie = m_nTimeSpentOnStoppie;
|
m_nLastTimeSpentOnStoppie = m_nTimeSpentOnStoppie;
|
||||||
m_nPrevDistanceTravelledOnStoppie = m_nDistanceTravelledOnStoppie;
|
m_nLastDistanceTravelledOnStoppie = m_nDistanceTravelledOnStoppie;
|
||||||
if (CStats::LongestStoppie < m_nTimeSpentOnStoppie / 1000)
|
if (CStats::LongestStoppie < m_nTimeSpentOnStoppie / 1000)
|
||||||
CStats::LongestStoppie = m_nTimeSpentOnStoppie / 1000;
|
CStats::LongestStoppie = m_nTimeSpentOnStoppie / 1000;
|
||||||
if (CStats::LongestStoppieDist < m_nDistanceTravelledOnStoppie)
|
if (CStats::LongestStoppieDist < m_nDistanceTravelledOnStoppie)
|
||||||
|
|
|
@ -61,12 +61,12 @@ public:
|
||||||
int32 m_nTimeSpentOnStoppie;
|
int32 m_nTimeSpentOnStoppie;
|
||||||
float m_nDistanceTravelledOnStoppie;
|
float m_nDistanceTravelledOnStoppie;
|
||||||
int32 m_nCancelWheelStuntTimer;
|
int32 m_nCancelWheelStuntTimer;
|
||||||
int32 m_nPrevTimeCarSpentOnTwoWheels;
|
int32 m_nLastTimeCarSpentOnTwoWheels;
|
||||||
int32 m_nPrevDistanceCarTravelledOnTwoWheels;
|
int32 m_nLastDistanceCarTravelledOnTwoWheels;
|
||||||
int32 m_nPrevTimeSpentOnWheelie;
|
int32 m_nLastTimeSpentOnWheelie;
|
||||||
int32 m_nPrevDistanceTravelledOnWheelie;
|
int32 m_nLastDistanceTravelledOnWheelie;
|
||||||
int32 m_nPrevTimeSpentOnStoppie;
|
int32 m_nLastTimeSpentOnStoppie;
|
||||||
int32 m_nPrevDistanceTravelledOnStoppie;
|
int32 m_nLastDistanceTravelledOnStoppie;
|
||||||
int16 m_nTrafficMultiplier;
|
int16 m_nTrafficMultiplier;
|
||||||
int16 field_12A;
|
int16 field_12A;
|
||||||
float m_fRoadDensity;
|
float m_fRoadDensity;
|
||||||
|
|
Loading…
Reference in a new issue