Merge pull request #186 from Nick007J/master

more CCarCtrl
This commit is contained in:
aap
2019-08-11 22:15:31 +02:00
committed by GitHub
22 changed files with 515 additions and 51 deletions

View File

@ -312,7 +312,7 @@ CAutomobile::ProcessControl(void)
CVisibilityPlugins::SetClumpAlpha((RpClump*)m_rwObject, clumpAlpha);
AutoPilot.m_flag1 = false;
AutoPilot.m_flag2 = false;
AutoPilot.m_bSlowedDownBecauseOfPeds = false;
// Set Center of Mass to make car more stable
if(strongGrip1 || bCheat3)
@ -3930,7 +3930,7 @@ CAutomobile::PlayCarHorn(void)
void
CAutomobile::PlayHornIfNecessary(void)
{
if(AutoPilot.m_flag2 ||
if(AutoPilot.m_bSlowedDownBecauseOfPeds ||
AutoPilot.m_flag1)
if(!HasCarStoppedBecauseOfLight())
PlayCarHorn();

View File

@ -60,7 +60,7 @@ CVehicle::CVehicle(uint8 CreatedBy)
pPassengers[i] = nil;
m_nBombTimer = 0;
m_pBlowUpEntity = nil;
field_1FB = 0;
m_nPacManPickupsCarried = 0;
bComedyControls = false;
bCraneMessageDone = false;
bExtendedRange = false;
@ -71,7 +71,7 @@ CVehicle::CVehicle(uint8 CreatedBy)
m_nTimeOfDeath = 0;
m_pCarFire = nil;
bHasBeenOwnedByPlayer = false;
m_veh_flagC20 = false;
bCreateRoadBlockPeds = false;
bCanBeDamaged = true;
bUsingSpecialColModel = false;
m_veh_flagD1 = false;
@ -102,7 +102,7 @@ CVehicle::CVehicle(uint8 CreatedBy)
m_aCollPolys[0].valid = false;
m_aCollPolys[1].valid = false;
AutoPilot.m_nCarMission = MISSION_NONE;
AutoPilot.m_nAnimationId = TEMPACT_NONE;
AutoPilot.m_nTempAction = TEMPACT_NONE;
AutoPilot.m_nTimeToStartMission = CTimer::GetTimeInMilliseconds();
AutoPilot.m_flag4 = false;
AutoPilot.m_flag10 = false;

View File

@ -159,7 +159,7 @@ public:
uint8 bHasBeenOwnedByPlayer : 1;// To work out whether stealing it is a crime
uint8 bFadeOut : 1; // Fade vehicle out
uint8 m_veh_flagC10 : 1;
uint8 m_veh_flagC20 : 1;
uint8 bCreateRoadBlockPeds : 1; // If this vehicle gets close enough we will create peds (coppers or gang members) round it
uint8 bCanBeDamaged : 1; // Set to FALSE during cut scenes to avoid explosions
uint8 bUsingSpecialColModel : 1;// Is player vehicle using special collision model, stored in player strucure
@ -174,8 +174,9 @@ public:
int8 m_numPedsUseItAsCover;
uint8 m_nAmmoInClip; // Used to make the guns on boat do a reload (20 by default)
int8 field_1FB;
int8 field_1FC[4];
int8 m_nPacManPickupsCarried;
uint8 m_nRoadblockType;
int16 m_nRoadblockNode;
float m_fHealth; // 1000.0f = full health. 250.0f = fire. 0 -> explode
uint8 m_nCurrentGear;
int8 field_205[3];