mirror of
https://github.com/halpz/re3.git
synced 2025-07-26 03:22:43 +00:00
Merge branch 'lcs' of https://github.com/GTAmodding/re3 into lcs
This commit is contained in:
@ -288,17 +288,17 @@ CAutomobile::ProcessControl(void)
|
||||
// Improve grip of vehicles in certain cases
|
||||
bool strongGrip1 = false;
|
||||
bool strongGrip2 = false;
|
||||
if(FindPlayerVehicle() && this != FindPlayerVehicle() &&
|
||||
if(FindPlayerVehicle() && this != FindPlayerVehicle() && FindPlayerPed()->m_pWanted->GetWantedLevel() > 3 &&
|
||||
(AutoPilot.m_nCarMission == MISSION_RAMPLAYER_FARAWAY || AutoPilot.m_nCarMission == MISSION_RAMPLAYER_CLOSE ||
|
||||
AutoPilot.m_nCarMission == MISSION_BLOCKPLAYER_FARAWAY || AutoPilot.m_nCarMission == MISSION_BLOCKPLAYER_CLOSE)){
|
||||
if(FindPlayerSpeed().Magnitude() > 0.3f){
|
||||
strongGrip1 = true;
|
||||
if(FindPlayerSpeed().Magnitude() > 0.4f &&
|
||||
m_vecMoveSpeed.Magnitude() < 0.3f)
|
||||
strongGrip2 = true;
|
||||
else if((GetPosition() - FindPlayerCoors()).Magnitude() > 50.0f)
|
||||
strongGrip2 = true;
|
||||
}
|
||||
AutoPilot.m_nCarMission == MISSION_BLOCKPLAYER_FARAWAY || AutoPilot.m_nCarMission == MISSION_BLOCKPLAYER_CLOSE) &&
|
||||
FindPlayerSpeed().Magnitude() > 0.3f){
|
||||
|
||||
strongGrip1 = true;
|
||||
if(FindPlayerSpeed().Magnitude() > 0.4f &&
|
||||
m_vecMoveSpeed.Magnitude() < 0.3f)
|
||||
strongGrip2 = true;
|
||||
else if((GetPosition() - FindPlayerCoors()).Magnitude() > 50.0f)
|
||||
strongGrip2 = true;
|
||||
}else if(GetModelIndex() == MI_RCBANDIT && GetStatus() != STATUS_PLAYER_REMOTE)
|
||||
strongGrip1 = true;
|
||||
|
||||
|
@ -83,7 +83,7 @@ CBike::CBike(int32 id, uint8 CreatedBy)
|
||||
case MI_SANCHEZ:
|
||||
m_bikeAnimType = ASSOCGRP_BIKE_DIRT;
|
||||
break;
|
||||
default: assert(0 && "invalid bike model ID");
|
||||
default: m_bikeAnimType = ASSOCGRP_BIKE_STANDARD; //assert(0 && "invalid bike model ID"); // TODO
|
||||
}
|
||||
m_vehType = VEHICLE_TYPE_BIKE;
|
||||
|
||||
|
@ -32,15 +32,15 @@
|
||||
|
||||
#define INVALID_ORIENTATION (-9999.99f)
|
||||
|
||||
float fShapeLength = 0.4f;
|
||||
float fShapeTime = 0.05f;
|
||||
float fRangeMult = 0.6f;
|
||||
float fTimeMult;
|
||||
|
||||
float CBoat::MAX_WAKE_LENGTH = 50.0f;
|
||||
float CBoat::MIN_WAKE_INTERVAL = 2.0f;
|
||||
float CBoat::WAKE_LIFETIME = 150.0f;
|
||||
|
||||
float fShapeLength = 0.4f;
|
||||
float fShapeTime = 0.05f;
|
||||
float fRangeMult = 0.6f;
|
||||
float fTimeMult = 1.2f/CBoat::WAKE_LIFETIME;
|
||||
|
||||
CBoat *CBoat::apFrameWakeGeneratingBoats[4];
|
||||
|
||||
const uint32 CBoat::nSaveStructSize =
|
||||
|
@ -466,7 +466,7 @@ bool CCranes::DoesMilitaryCraneHaveThisOneAlready(uint32 mi)
|
||||
case MI_FIRETRUCK: return (CarsCollectedMilitaryCrane & 1);
|
||||
case MI_AMBULAN: return (CarsCollectedMilitaryCrane & 2);
|
||||
case MI_ENFORCER: return (CarsCollectedMilitaryCrane & 4);
|
||||
case MI_FBIRANCH: return (CarsCollectedMilitaryCrane & 8);
|
||||
case (uint32)MI_FBIRANCH: return (CarsCollectedMilitaryCrane & 8);
|
||||
case MI_RHINO: return (CarsCollectedMilitaryCrane & 0x10);
|
||||
case MI_BARRACKS: return (CarsCollectedMilitaryCrane & 0x20);
|
||||
case MI_POLICE: return (CarsCollectedMilitaryCrane & 0x40);
|
||||
@ -481,7 +481,7 @@ void CCranes::RegisterCarForMilitaryCrane(uint32 mi)
|
||||
case MI_FIRETRUCK: CarsCollectedMilitaryCrane |= 1; break;
|
||||
case MI_AMBULAN: CarsCollectedMilitaryCrane |= 2; break;
|
||||
case MI_ENFORCER: CarsCollectedMilitaryCrane |= 4; break;
|
||||
case MI_FBIRANCH: CarsCollectedMilitaryCrane |= 8; break;
|
||||
case (uint32)MI_FBIRANCH: CarsCollectedMilitaryCrane |= 8; break;
|
||||
case MI_RHINO: CarsCollectedMilitaryCrane |= 0x10; break;
|
||||
case MI_BARRACKS: CarsCollectedMilitaryCrane |= 0x20; break;
|
||||
case MI_POLICE: CarsCollectedMilitaryCrane |= 0x40; break;
|
||||
|
@ -168,3 +168,58 @@ CTrainDoor::IsClosed(void)
|
||||
{
|
||||
return m_fPosn == RetTranslationWhenClosed();
|
||||
}
|
||||
|
||||
bool
|
||||
CFerryDoor::IsInUse(void)
|
||||
{
|
||||
float translationDifference = m_fPrevPosn - m_fPosn;
|
||||
m_fPrevPosn = m_fPosn;
|
||||
return Abs(translationDifference) > 0.002f;
|
||||
}
|
||||
|
||||
float
|
||||
CFerryDoor::RetTranslationWhenClosed(void)
|
||||
{
|
||||
if(Abs(m_fClosedPosn) < Abs(m_fOpenPosn))
|
||||
return m_fClosedPosn;
|
||||
else
|
||||
return m_fOpenPosn;
|
||||
}
|
||||
|
||||
bool
|
||||
CFerryDoor::IsClosed(void)
|
||||
{
|
||||
return m_fPosn == RetTranslationWhenClosed();
|
||||
}
|
||||
|
||||
float
|
||||
CFerryDoor::RetTranslationWhenOpen(void)
|
||||
{
|
||||
if(Abs(m_fClosedPosn) < Abs(m_fOpenPosn))
|
||||
return m_fOpenPosn;
|
||||
else
|
||||
return m_fClosedPosn;
|
||||
}
|
||||
|
||||
bool
|
||||
CFerryDoor::IsFullyOpen(void)
|
||||
{
|
||||
if(Abs(m_fPosn) < Abs(RetTranslationWhenOpen()) - 0.5f)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
CFerryDoor::Open(float ratio)
|
||||
{
|
||||
float open;
|
||||
|
||||
m_fPrevPosn = m_fPosn;
|
||||
open = RetTranslationWhenOpen();
|
||||
if(ratio < 1.0f){
|
||||
m_fPosn = open*ratio;
|
||||
}else{
|
||||
m_nDoorState = DOORST_OPEN;
|
||||
m_fPosn = open;
|
||||
}
|
||||
}
|
@ -67,3 +67,22 @@ public:
|
||||
float RetTranslationWhenOpen(void);
|
||||
void Open(float ratio);
|
||||
};
|
||||
|
||||
|
||||
class CFerryDoor {
|
||||
private:
|
||||
float m_fClosedPosn;
|
||||
float m_fOpenPosn;
|
||||
int8 m_nDirn;
|
||||
int8 m_nAxis;
|
||||
int8 m_nDoorState;
|
||||
float m_fPosn;
|
||||
float m_fPrevPosn;
|
||||
public:
|
||||
bool IsInUse(void);
|
||||
float RetTranslationWhenClosed(void);
|
||||
float RetTranslationWhenOpen(void);
|
||||
bool IsClosed(void);
|
||||
bool IsFullyOpen(void);
|
||||
void Open(float ratio);
|
||||
};
|
Reference in New Issue
Block a user