mirror of
https://git.rip/DMCA_FUCKER/re3.git
synced 2024-12-24 02:10:01 +00:00
Merge pull request #727 from erorcun/miami
Restore All Cars are Heli cheat
This commit is contained in:
commit
1fa852f118
|
@ -733,9 +733,6 @@ void CControllerConfigManager::AffectControllerStateOn_ButtonDown_Driving(int32
|
||||||
FindPlayerVehicle()->GetModelIndex() == MI_DODO
|
FindPlayerVehicle()->GetModelIndex() == MI_DODO
|
||||||
#ifdef FIX_BUGS
|
#ifdef FIX_BUGS
|
||||||
|| (CVehicle::bAllDodosCheat && !FindPlayerVehicle()->IsRealHeli())
|
|| (CVehicle::bAllDodosCheat && !FindPlayerVehicle()->IsRealHeli())
|
||||||
#ifdef ALLCARSHELI_CHEAT
|
|
||||||
|| bAllCarCheat
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
)))
|
)))
|
||||||
{
|
{
|
||||||
|
|
|
@ -526,7 +526,7 @@ void KangarooCheat()
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ALLCARSHELI_CHEAT
|
#ifdef RESTORE_ALLCARSHELI_CHEAT
|
||||||
void AllCarsHeliCheat(void)
|
void AllCarsHeliCheat(void)
|
||||||
{
|
{
|
||||||
wchar* string;
|
wchar* string;
|
||||||
|
@ -1438,7 +1438,7 @@ void CPad::AddToPCCheatString(char c)
|
||||||
CPed::SwitchDebugDisplay();
|
CPed::SwitchDebugDisplay();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ALLCARSHELI_CHEAT
|
#ifdef RESTORE_ALLCARSHELI_CHEAT
|
||||||
// "CARSAREHELI"
|
// "CARSAREHELI"
|
||||||
if (!_CHEATCMP("ILEHERASRAC"))
|
if (!_CHEATCMP("ILEHERASRAC"))
|
||||||
AllCarsHeliCheat();
|
AllCarsHeliCheat();
|
||||||
|
|
|
@ -286,6 +286,8 @@ public:
|
||||||
bool GetMiddleMouseJustUp() { return !!(!NewMouseControllerState.MMB && OldMouseControllerState.MMB); }
|
bool GetMiddleMouseJustUp() { return !!(!NewMouseControllerState.MMB && OldMouseControllerState.MMB); }
|
||||||
bool GetMouseWheelUpJustUp() { return !!(!NewMouseControllerState.WHEELUP && OldMouseControllerState.WHEELUP); }
|
bool GetMouseWheelUpJustUp() { return !!(!NewMouseControllerState.WHEELUP && OldMouseControllerState.WHEELUP); }
|
||||||
bool GetMouseWheelDownJustUp() { return !!(!NewMouseControllerState.WHEELDN && OldMouseControllerState.WHEELDN); }
|
bool GetMouseWheelDownJustUp() { return !!(!NewMouseControllerState.WHEELDN && OldMouseControllerState.WHEELDN); }
|
||||||
|
bool GetMouseX1JustUp() { return !!(!NewMouseControllerState.MXB1 && OldMouseControllerState.MXB1); }
|
||||||
|
bool GetMouseX2JustUp() { return !!(!NewMouseControllerState.MXB2 && OldMouseControllerState.MXB2); }
|
||||||
|
|
||||||
bool GetLeftMouse() { return NewMouseControllerState.LMB; }
|
bool GetLeftMouse() { return NewMouseControllerState.LMB; }
|
||||||
bool GetRightMouse() { return NewMouseControllerState.RMB; }
|
bool GetRightMouse() { return NewMouseControllerState.RMB; }
|
||||||
|
@ -470,7 +472,3 @@ public:
|
||||||
|
|
||||||
VALIDATE_SIZE(CPad, 0xFC);
|
VALIDATE_SIZE(CPad, 0xFC);
|
||||||
extern CPad Pads[MAX_PADS];
|
extern CPad Pads[MAX_PADS];
|
||||||
|
|
||||||
#ifdef ALLCARSHELI_CHEAT
|
|
||||||
extern bool bAllCarCheat;
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -250,7 +250,7 @@ enum Config {
|
||||||
#endif
|
#endif
|
||||||
#define DETECT_PAD_INPUT_SWITCH // Adds automatic switch of pad related stuff between controller and kb/m
|
#define DETECT_PAD_INPUT_SWITCH // Adds automatic switch of pad related stuff between controller and kb/m
|
||||||
#define KANGAROO_CHEAT
|
#define KANGAROO_CHEAT
|
||||||
#define ALLCARSHELI_CHEAT
|
#define RESTORE_ALLCARSHELI_CHEAT
|
||||||
#define ALT_DODO_CHEAT
|
#define ALT_DODO_CHEAT
|
||||||
#define WALLCLIMB_CHEAT
|
#define WALLCLIMB_CHEAT
|
||||||
#define REGISTER_START_BUTTON
|
#define REGISTER_START_BUTTON
|
||||||
|
@ -258,14 +258,13 @@ enum Config {
|
||||||
|
|
||||||
// Hud, frontend and radar
|
// Hud, frontend and radar
|
||||||
#define HUD_ENHANCEMENTS // Adjusts some aspects to make the HUD look/behave a little bit better.
|
#define HUD_ENHANCEMENTS // Adjusts some aspects to make the HUD look/behave a little bit better.
|
||||||
#define BETA_SLIDING_TEXT
|
//#define BETA_SLIDING_TEXT
|
||||||
#define TRIANGULAR_BLIPS // height indicating triangular radar blips, as in VC
|
#define TRIANGULAR_BLIPS // height indicating triangular radar blips, as in VC
|
||||||
#define PC_MENU
|
#define PC_MENU
|
||||||
|
|
||||||
#ifndef PC_MENU
|
#ifndef PC_MENU
|
||||||
# define PS2_MENU
|
# define PS2_MENU
|
||||||
//# define PS2_MENU_USEALLPAGEICONS
|
//# define PS2_MENU_USEALLPAGEICONS
|
||||||
//# define PS2_LIKE_MENU // An effort to recreate PS2 menu, cycling through tabs, different bg etc.
|
|
||||||
#else
|
#else
|
||||||
# define MAP_ENHANCEMENTS // Adding waypoint etc.
|
# define MAP_ENHANCEMENTS // Adding waypoint etc.
|
||||||
# define TRIANGLE_BACK_BUTTON
|
# define TRIANGLE_BACK_BUTTON
|
||||||
|
|
|
@ -1293,7 +1293,7 @@ CAutomobile::ProcessControl(void)
|
||||||
|
|
||||||
// Process front wheels off ground
|
// Process front wheels off ground
|
||||||
|
|
||||||
if(!IsRealHeli()){
|
if (!IsRealHeli()) {
|
||||||
if(m_aWheelTimer[CARWHEEL_FRONT_LEFT] <= 0.0f){
|
if(m_aWheelTimer[CARWHEEL_FRONT_LEFT] <= 0.0f){
|
||||||
if(mod_HandlingManager.HasRearWheelDrive(pHandling->nIdentifier) || acceleration == 0.0f)
|
if(mod_HandlingManager.HasRearWheelDrive(pHandling->nIdentifier) || acceleration == 0.0f)
|
||||||
m_aWheelSpeed[CARWHEEL_FRONT_LEFT] *= 0.95f;
|
m_aWheelSpeed[CARWHEEL_FRONT_LEFT] *= 0.95f;
|
||||||
|
@ -1400,25 +1400,32 @@ CAutomobile::ProcessControl(void)
|
||||||
}else if(GetModelIndex() == MI_RCBARON){
|
}else if(GetModelIndex() == MI_RCBARON){
|
||||||
FlyingControl(FLIGHT_MODEL_RCPLANE);
|
FlyingControl(FLIGHT_MODEL_RCPLANE);
|
||||||
}else if(IsRealHeli() || bAllCarCheat){
|
}else if(IsRealHeli() || bAllCarCheat){
|
||||||
|
#ifdef RESTORE_ALLCARSHELI_CHEAT
|
||||||
|
if (bAllCarCheat)
|
||||||
|
FlyingControl(FLIGHT_MODEL_HELI);
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
// Speed up rotor
|
// Speed up rotor
|
||||||
if(m_aWheelSpeed[1] < 0.22f && !bIsInWater){
|
if (m_aWheelSpeed[1] < 0.22f && !bIsInWater) {
|
||||||
if(GetModelIndex() == MI_RCRAIDER || GetModelIndex() == MI_RCGOBLIN)
|
if (GetModelIndex() == MI_RCRAIDER || GetModelIndex() == MI_RCGOBLIN)
|
||||||
m_aWheelSpeed[1] += 0.003f;
|
m_aWheelSpeed[1] += 0.003f;
|
||||||
else
|
else
|
||||||
m_aWheelSpeed[1] += 0.001f;
|
m_aWheelSpeed[1] += 0.001f;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fly
|
// Fly
|
||||||
if(m_aWheelSpeed[1] > 0.15f){
|
if (m_aWheelSpeed[1] > 0.15f) {
|
||||||
if(GetModelIndex() == MI_RCRAIDER || GetModelIndex() == MI_RCGOBLIN)
|
if (GetModelIndex() == MI_RCRAIDER || GetModelIndex() == MI_RCGOBLIN)
|
||||||
FlyingControl(FLIGHT_MODEL_RCHELI);
|
FlyingControl(FLIGHT_MODEL_RCHELI);
|
||||||
else if(m_nWheelsOnGround < 4 && !(GetModelIndex() == MI_SEASPAR && bTouchingWater) ||
|
else if (m_nWheelsOnGround < 4 && !(GetModelIndex() == MI_SEASPAR && bTouchingWater) ||
|
||||||
CPad::GetPad(0)->GetAccelerate() != 0 || CPad::GetPad(0)->GetCarGunUpDown() > 1.0f ||
|
CPad::GetPad(0)->GetAccelerate() != 0 || CPad::GetPad(0)->GetCarGunUpDown() > 1.0f ||
|
||||||
Abs(m_vecMoveSpeed.x) > 0.02f ||
|
Abs(m_vecMoveSpeed.x) > 0.02f ||
|
||||||
Abs(m_vecMoveSpeed.y) > 0.02f ||
|
Abs(m_vecMoveSpeed.y) > 0.02f ||
|
||||||
Abs(m_vecMoveSpeed.z) > 0.02f)
|
Abs(m_vecMoveSpeed.z) > 0.02f)
|
||||||
FlyingControl(FLIGHT_MODEL_HELI);
|
FlyingControl(FLIGHT_MODEL_HELI);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Blade collision
|
// Blade collision
|
||||||
if(m_aWheelSpeed[1] > 0.015f && m_aCarNodes[CAR_BONNET]){
|
if(m_aWheelSpeed[1] > 0.015f && m_aCarNodes[CAR_BONNET]){
|
||||||
|
|
|
@ -168,3 +168,4 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
extern CVector vecHunterGunPos;
|
extern CVector vecHunterGunPos;
|
||||||
|
extern bool bAllCarCheat;
|
|
@ -432,7 +432,12 @@ CVehicle::FlyingControl(eFlightModel flightModel)
|
||||||
case FLIGHT_MODEL_RCHELI:
|
case FLIGHT_MODEL_RCHELI:
|
||||||
case FLIGHT_MODEL_HELI:
|
case FLIGHT_MODEL_HELI:
|
||||||
{
|
{
|
||||||
float rm = Pow(pFlyingHandling->fMoveRes, CTimer::GetTimeStep());
|
#ifdef RESTORE_ALLCARSHELI_CHEAT
|
||||||
|
tFlyingHandlingData* flyingHandling = bAllCarCheat && GetStatus() == STATUS_PLAYER && !IsRealHeli() ? mod_HandlingManager.GetFlyingPointer(HANDLING_MAVERICK) : pFlyingHandling;
|
||||||
|
#else
|
||||||
|
tFlyingHandlingData* flyingHandling = pFlyingHandling;
|
||||||
|
#endif
|
||||||
|
float rm = Pow(flyingHandling->fMoveRes, CTimer::GetTimeStep());
|
||||||
m_vecMoveSpeed *= rm;
|
m_vecMoveSpeed *= rm;
|
||||||
if (GetStatus() != STATUS_PLAYER && GetStatus() != STATUS_PLAYER_REMOTE)
|
if (GetStatus() != STATUS_PLAYER && GetStatus() != STATUS_PLAYER_REMOTE)
|
||||||
return;
|
return;
|
||||||
|
@ -441,11 +446,11 @@ CVehicle::FlyingControl(eFlightModel flightModel)
|
||||||
if(fThrust < 0.0f)
|
if(fThrust < 0.0f)
|
||||||
fThrust *= 2.0f;
|
fThrust *= 2.0f;
|
||||||
if(flightModel == FLIGHT_MODEL_RCHELI){
|
if(flightModel == FLIGHT_MODEL_RCHELI){
|
||||||
fThrust = pFlyingHandling->fThrust * fThrust + 0.45f;
|
fThrust = flyingHandling->fThrust * fThrust + 0.45f;
|
||||||
ApplyMoveForce(GRAVITY * CVector(0.0f, 0.0f, 0.5f) * m_fMass * CTimer::GetTimeStep());
|
ApplyMoveForce(GRAVITY * CVector(0.0f, 0.0f, 0.5f) * m_fMass * CTimer::GetTimeStep());
|
||||||
}else
|
}else
|
||||||
fThrust = pFlyingHandling->fThrust * fThrust + 0.95f;
|
fThrust = flyingHandling->fThrust * fThrust + 0.95f;
|
||||||
fThrust -= pFlyingHandling->fThrustFallOff * fUpSpeed;
|
fThrust -= flyingHandling->fThrustFallOff * fUpSpeed;
|
||||||
if(flightModel == FLIGHT_MODEL_RCHELI && GetPosition().z > 40.0f)
|
if(flightModel == FLIGHT_MODEL_RCHELI && GetPosition().z > 40.0f)
|
||||||
fThrust *= 10.0f/(GetPosition().z - 30.0f);
|
fThrust *= 10.0f/(GetPosition().z - 30.0f);
|
||||||
else if(GetPosition().z > 80.0f)
|
else if(GetPosition().z > 80.0f)
|
||||||
|
@ -453,20 +458,20 @@ CVehicle::FlyingControl(eFlightModel flightModel)
|
||||||
ApplyMoveForce(GRAVITY * GetUp() * fThrust * m_fMass * CTimer::GetTimeStep());
|
ApplyMoveForce(GRAVITY * GetUp() * fThrust * m_fMass * CTimer::GetTimeStep());
|
||||||
|
|
||||||
if (GetUp().z > 0.0f){
|
if (GetUp().z > 0.0f){
|
||||||
float upRight = clamp(GetRight().z, -pFlyingHandling->fFormLift, pFlyingHandling->fFormLift);
|
float upRight = clamp(GetRight().z, -flyingHandling->fFormLift, flyingHandling->fFormLift);
|
||||||
float upImpulseRight = -upRight * pFlyingHandling->fAttackLift * m_fTurnMass * CTimer::GetTimeStep();
|
float upImpulseRight = -upRight * flyingHandling->fAttackLift * m_fTurnMass * CTimer::GetTimeStep();
|
||||||
ApplyTurnForce(upImpulseRight * GetUp(), GetRight());
|
ApplyTurnForce(upImpulseRight * GetUp(), GetRight());
|
||||||
|
|
||||||
float upFwd = clamp(GetForward().z, -pFlyingHandling->fFormLift, pFlyingHandling->fFormLift);
|
float upFwd = clamp(GetForward().z, -flyingHandling->fFormLift, flyingHandling->fFormLift);
|
||||||
float upImpulseFwd = -upFwd * pFlyingHandling->fAttackLift * m_fTurnMass * CTimer::GetTimeStep();
|
float upImpulseFwd = -upFwd * flyingHandling->fAttackLift * m_fTurnMass * CTimer::GetTimeStep();
|
||||||
ApplyTurnForce(upImpulseFwd * GetUp(), GetForward());
|
ApplyTurnForce(upImpulseFwd * GetUp(), GetForward());
|
||||||
}else{
|
}else{
|
||||||
float upRight = GetRight().z < 0.0f ? -pFlyingHandling->fFormLift : pFlyingHandling->fFormLift;
|
float upRight = GetRight().z < 0.0f ? -flyingHandling->fFormLift : flyingHandling->fFormLift;
|
||||||
float upImpulseRight = -upRight * pFlyingHandling->fAttackLift * m_fTurnMass * CTimer::GetTimeStep();
|
float upImpulseRight = -upRight * flyingHandling->fAttackLift * m_fTurnMass * CTimer::GetTimeStep();
|
||||||
ApplyTurnForce(upImpulseRight * GetUp(), GetRight());
|
ApplyTurnForce(upImpulseRight * GetUp(), GetRight());
|
||||||
|
|
||||||
float upFwd = GetForward().z < 0.0f ? -pFlyingHandling->fFormLift : pFlyingHandling->fFormLift;
|
float upFwd = GetForward().z < 0.0f ? -flyingHandling->fFormLift : flyingHandling->fFormLift;
|
||||||
float upImpulseFwd = -upFwd * pFlyingHandling->fAttackLift * m_fTurnMass * CTimer::GetTimeStep();
|
float upImpulseFwd = -upFwd * flyingHandling->fAttackLift * m_fTurnMass * CTimer::GetTimeStep();
|
||||||
ApplyTurnForce(upImpulseFwd * GetUp(), GetForward());
|
ApplyTurnForce(upImpulseFwd * GetUp(), GetForward());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -490,25 +495,25 @@ CVehicle::FlyingControl(eFlightModel flightModel)
|
||||||
fPitch = -CPad::GetPad(0)->GetCarGunUpDown() / 128.0f;
|
fPitch = -CPad::GetPad(0)->GetCarGunUpDown() / 128.0f;
|
||||||
if (CPad::GetPad(0)->GetHorn()) {
|
if (CPad::GetPad(0)->GetHorn()) {
|
||||||
fYaw = 0.0f;
|
fYaw = 0.0f;
|
||||||
fPitch = clamp(pFlyingHandling->fPitchStab * DotProduct(m_vecMoveSpeed, GetForward()), -200.0f, 1.3f);
|
fPitch = clamp(flyingHandling->fPitchStab * DotProduct(m_vecMoveSpeed, GetForward()), -200.0f, 1.3f);
|
||||||
fRoll = clamp(pFlyingHandling->fRollStab * DotProduct(m_vecMoveSpeed, GetRight()), -200.0f, 1.3f);
|
fRoll = clamp(flyingHandling->fRollStab * DotProduct(m_vecMoveSpeed, GetRight()), -200.0f, 1.3f);
|
||||||
}
|
}
|
||||||
ApplyTurnForce(fPitch * GetUp() * pFlyingHandling->fPitch * m_fTurnMass * CTimer::GetTimeStep(), GetForward());
|
ApplyTurnForce(fPitch * GetUp() * flyingHandling->fPitch * m_fTurnMass * CTimer::GetTimeStep(), GetForward());
|
||||||
ApplyTurnForce(fRoll * GetUp() * pFlyingHandling->fRoll * m_fTurnMass * CTimer::GetTimeStep(), GetRight());
|
ApplyTurnForce(fRoll * GetUp() * flyingHandling->fRoll * m_fTurnMass * CTimer::GetTimeStep(), GetRight());
|
||||||
|
|
||||||
float fSideSpeed = -DotProduct(GetMoveSpeed(), GetRight());
|
float fSideSpeed = -DotProduct(GetMoveSpeed(), GetRight());
|
||||||
float fSideSlipAccel = pFlyingHandling->fSideSlip * fSideSpeed * Abs(fSideSpeed);
|
float fSideSlipAccel = flyingHandling->fSideSlip * fSideSpeed * Abs(fSideSpeed);
|
||||||
ApplyMoveForce(m_fMass * GetRight() * fSideSlipAccel * CTimer::GetTimeStep());
|
ApplyMoveForce(m_fMass * GetRight() * fSideSlipAccel * CTimer::GetTimeStep());
|
||||||
float fYawAccel = pFlyingHandling->fYawStab * fSideSpeed * Abs(fSideSpeed) + pFlyingHandling->fYaw * fYaw;
|
float fYawAccel = flyingHandling->fYawStab * fSideSpeed * Abs(fSideSpeed) + flyingHandling->fYaw * fYaw;
|
||||||
ApplyTurnForce(fYawAccel * GetRight() * m_fTurnMass * CTimer::GetTimeStep(), -GetForward());
|
ApplyTurnForce(fYawAccel * GetRight() * m_fTurnMass * CTimer::GetTimeStep(), -GetForward());
|
||||||
|
|
||||||
ApplyTurnForce(fYaw * GetForward() * pFlyingHandling->fYaw * m_fTurnMass * CTimer::GetTimeStep(), GetRight());
|
ApplyTurnForce(fYaw * GetForward() * flyingHandling->fYaw * m_fTurnMass * CTimer::GetTimeStep(), GetRight());
|
||||||
|
|
||||||
float rX = Pow(pFlyingHandling->vecTurnRes.x, CTimer::GetTimeStep());
|
float rX = Pow(flyingHandling->vecTurnRes.x, CTimer::GetTimeStep());
|
||||||
float rY = Pow(pFlyingHandling->vecTurnRes.y, CTimer::GetTimeStep());
|
float rY = Pow(flyingHandling->vecTurnRes.y, CTimer::GetTimeStep());
|
||||||
float rZ = Pow(pFlyingHandling->vecTurnRes.z, CTimer::GetTimeStep());
|
float rZ = Pow(flyingHandling->vecTurnRes.z, CTimer::GetTimeStep());
|
||||||
CVector vecTurnSpeed = Multiply3x3(m_vecTurnSpeed, GetMatrix());
|
CVector vecTurnSpeed = Multiply3x3(m_vecTurnSpeed, GetMatrix());
|
||||||
float fResistanceMultiplier = Pow(1.0f / (pFlyingHandling->vecSpeedRes.z * SQR(vecTurnSpeed.z) + 1.0f) * rZ, CTimer::GetTimeStep());
|
float fResistanceMultiplier = Pow(1.0f / (flyingHandling->vecSpeedRes.z * SQR(vecTurnSpeed.z) + 1.0f) * rZ, CTimer::GetTimeStep());
|
||||||
float fResistance = vecTurnSpeed.z * fResistanceMultiplier - vecTurnSpeed.z;
|
float fResistance = vecTurnSpeed.z * fResistanceMultiplier - vecTurnSpeed.z;
|
||||||
vecTurnSpeed.x *= rX;
|
vecTurnSpeed.x *= rX;
|
||||||
vecTurnSpeed.y *= rY;
|
vecTurnSpeed.y *= rY;
|
||||||
|
|
Loading…
Reference in a new issue