mirror of
https://git.rip/DMCA_FUCKER/re3.git
synced 2024-12-23 23:10:01 +00:00
commit
8b7bf76260
|
@ -412,7 +412,11 @@ void OnlyRenderWheelsCheat()
|
||||||
|
|
||||||
void ChittyChittyBangBangCheat()
|
void ChittyChittyBangBangCheat()
|
||||||
{
|
{
|
||||||
|
#ifdef BETTER_ALLCARSAREDODO_CHEAT
|
||||||
|
CHud::SetHelpMessage(TheText.Get(!CVehicle::bAllDodosCheat ? "CHEAT1" : "CHEATOF"), true);
|
||||||
|
#else
|
||||||
CHud::SetHelpMessage(TheText.Get("CHEAT1"), true);
|
CHud::SetHelpMessage(TheText.Get("CHEAT1"), true);
|
||||||
|
#endif
|
||||||
CVehicle::bAllDodosCheat = !CVehicle::bAllDodosCheat;
|
CVehicle::bAllDodosCheat = !CVehicle::bAllDodosCheat;
|
||||||
CStats::CheatedCount += 1000;
|
CStats::CheatedCount += 1000;
|
||||||
CPad::bHasPlayerCheated = true;
|
CPad::bHasPlayerCheated = true;
|
||||||
|
@ -542,22 +546,6 @@ void AllCarsHeliCheat(void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ALT_DODO_CHEAT
|
|
||||||
void AltDodoCheat(void)
|
|
||||||
{
|
|
||||||
wchar* string;
|
|
||||||
if (CVehicle::bAltDodoCheat) {
|
|
||||||
string = TheText.Get("CHEATOF");
|
|
||||||
CVehicle::bAltDodoCheat = false;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
string = TheText.Get("CHEAT1");
|
|
||||||
CVehicle::bAltDodoCheat = true;
|
|
||||||
}
|
|
||||||
CHud::SetHelpMessage(string, true);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef WALLCLIMB_CHEAT
|
#ifdef WALLCLIMB_CHEAT
|
||||||
void WallClimbingCheat(void)
|
void WallClimbingCheat(void)
|
||||||
{
|
{
|
||||||
|
@ -1444,12 +1432,6 @@ void CPad::AddToPCCheatString(char c)
|
||||||
AllCarsHeliCheat();
|
AllCarsHeliCheat();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ALT_DODO_CHEAT
|
|
||||||
// "IWANTTOMASTERDODO"
|
|
||||||
if (!_CHEATCMP("ODODRETSAMOTTNAWI"))
|
|
||||||
AltDodoCheat();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef WALLCLIMB_CHEAT
|
#ifdef WALLCLIMB_CHEAT
|
||||||
// "SPIDERCAR"
|
// "SPIDERCAR"
|
||||||
if (!_CHEATCMP("RACREDIPS"))
|
if (!_CHEATCMP("RACREDIPS"))
|
||||||
|
@ -3166,6 +3148,9 @@ void CPad::ResetCheats(void)
|
||||||
CVehicle::bCheat4 = false;
|
CVehicle::bCheat4 = false;
|
||||||
CVehicle::bCheat5 = false;
|
CVehicle::bCheat5 = false;
|
||||||
CVehicle::bCheat8 = false;
|
CVehicle::bCheat8 = false;
|
||||||
|
#ifdef RESTORE_ALLCARSHELI_CHEAT
|
||||||
|
bAllCarCheat = false;
|
||||||
|
#endif
|
||||||
gbBlackCars = false;
|
gbBlackCars = false;
|
||||||
gbPinkCars = false;
|
gbPinkCars = false;
|
||||||
CCarCtrl::bMadDriversCheat = false;
|
CCarCtrl::bMadDriversCheat = false;
|
||||||
|
|
|
@ -251,7 +251,7 @@ enum Config {
|
||||||
#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 RESTORE_ALLCARSHELI_CHEAT
|
#define RESTORE_ALLCARSHELI_CHEAT
|
||||||
#define ALT_DODO_CHEAT
|
#define BETTER_ALLCARSAREDODO_CHEAT
|
||||||
#define WALLCLIMB_CHEAT
|
#define WALLCLIMB_CHEAT
|
||||||
#define REGISTER_START_BUTTON
|
#define REGISTER_START_BUTTON
|
||||||
//#define BIND_VEHICLE_FIREWEAPON // Adds ability to rebind fire key for 'in vehicle' controls
|
//#define BIND_VEHICLE_FIREWEAPON // Adds ability to rebind fire key for 'in vehicle' controls
|
||||||
|
|
|
@ -1375,6 +1375,10 @@ CAutomobile::ProcessControl(void)
|
||||||
// Flying
|
// Flying
|
||||||
|
|
||||||
bool playRotorSound = false;
|
bool playRotorSound = false;
|
||||||
|
bool isPlane = GetModelIndex() == MI_DODO || bAllDodosCheat;
|
||||||
|
#ifdef FIX_BUGS
|
||||||
|
isPlane = isPlane && !IsRealHeli();
|
||||||
|
#endif
|
||||||
if(GetStatus() != STATUS_PLAYER && GetStatus() != STATUS_PLAYER_REMOTE && GetStatus() != STATUS_PHYSICS){
|
if(GetStatus() != STATUS_PLAYER && GetStatus() != STATUS_PLAYER_REMOTE && GetStatus() != STATUS_PHYSICS){
|
||||||
if(IsRealHeli()){
|
if(IsRealHeli()){
|
||||||
bEngineOn = false;
|
bEngineOn = false;
|
||||||
|
@ -1383,16 +1387,7 @@ CAutomobile::ProcessControl(void)
|
||||||
if(m_aWheelSpeed[1] < 0.154f && m_aWheelSpeed[1] > 0.0044f)
|
if(m_aWheelSpeed[1] < 0.154f && m_aWheelSpeed[1] > 0.0044f)
|
||||||
playRotorSound = true;
|
playRotorSound = true;
|
||||||
}
|
}
|
||||||
}else if((GetModelIndex() == MI_DODO || CVehicle::bAllDodosCheat) &&
|
}else if(isPlane && m_vecMoveSpeed.Magnitude() > 0.0f && CTimer::GetTimeStep() > 0.0f){
|
||||||
#ifdef FIX_BUGS
|
|
||||||
!IsRealHeli() &&
|
|
||||||
#endif
|
|
||||||
m_vecMoveSpeed.Magnitude() > 0.0f && CTimer::GetTimeStep() > 0.0f){
|
|
||||||
#ifdef ALT_DODO_CHEAT
|
|
||||||
if (bAltDodoCheat)
|
|
||||||
FlyingControl(FLIGHT_MODEL_PLANE);
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
if(GetModelIndex() == MI_DODO)
|
if(GetModelIndex() == MI_DODO)
|
||||||
FlyingControl(FLIGHT_MODEL_DODO);
|
FlyingControl(FLIGHT_MODEL_DODO);
|
||||||
else
|
else
|
||||||
|
@ -2594,6 +2589,10 @@ CAutomobile::PreRender(void)
|
||||||
CGeneral::GetRandomNumberInRange(0.0f, 90.0f),
|
CGeneral::GetRandomNumberInRange(0.0f, 90.0f),
|
||||||
CGeneral::GetRandomNumberInRange(0.0f, 10.0f), 1);
|
CGeneral::GetRandomNumberInRange(0.0f, 10.0f), 1);
|
||||||
}
|
}
|
||||||
|
#ifdef BETTER_ALLCARSAREDODO_CHEAT
|
||||||
|
} else if (bAllDodosCheat && m_nDriveWheelsOnGround == 0 && m_nDriveWheelsOnGroundPrev == 0) {
|
||||||
|
mat.RotateY(-HALFPI);
|
||||||
|
#endif
|
||||||
}else{
|
}else{
|
||||||
// tilt wheel depending oh how much it presses on ground
|
// tilt wheel depending oh how much it presses on ground
|
||||||
float groundOffset = pos.z + m_fHeightAboveRoad - 0.5f*mi->m_wheelScale;
|
float groundOffset = pos.z + m_fHeightAboveRoad - 0.5f*mi->m_wheelScale;
|
||||||
|
@ -2631,6 +2630,10 @@ CAutomobile::PreRender(void)
|
||||||
CGeneral::GetRandomNumberInRange(0.0f, 90.0f),
|
CGeneral::GetRandomNumberInRange(0.0f, 90.0f),
|
||||||
CGeneral::GetRandomNumberInRange(0.0f, 10.0f), 1);
|
CGeneral::GetRandomNumberInRange(0.0f, 10.0f), 1);
|
||||||
}
|
}
|
||||||
|
#ifdef BETTER_ALLCARSAREDODO_CHEAT
|
||||||
|
} else if (bAllDodosCheat && m_nDriveWheelsOnGround == 0 && m_nDriveWheelsOnGroundPrev == 0) {
|
||||||
|
mat.RotateY(HALFPI);
|
||||||
|
#endif
|
||||||
}else{
|
}else{
|
||||||
// tilt wheel depending oh how much it presses on ground
|
// tilt wheel depending oh how much it presses on ground
|
||||||
float groundOffset = pos.z + m_fHeightAboveRoad - 0.5f*mi->m_wheelScale;
|
float groundOffset = pos.z + m_fHeightAboveRoad - 0.5f*mi->m_wheelScale;
|
||||||
|
@ -2660,6 +2663,10 @@ CAutomobile::PreRender(void)
|
||||||
m_aWheelColPoints[CARWHEEL_REAR_RIGHT].surfaceB == SURFACE_WATER){
|
m_aWheelColPoints[CARWHEEL_REAR_RIGHT].surfaceB == SURFACE_WATER){
|
||||||
// hovering on water
|
// hovering on water
|
||||||
mat.RotateY(-HALFPI);
|
mat.RotateY(-HALFPI);
|
||||||
|
#ifdef BETTER_ALLCARSAREDODO_CHEAT
|
||||||
|
} else if (bAllDodosCheat && m_nDriveWheelsOnGround == 0 && m_nDriveWheelsOnGroundPrev == 0) {
|
||||||
|
mat.RotateY(-HALFPI);
|
||||||
|
#endif
|
||||||
}else{
|
}else{
|
||||||
// tilt wheel depending oh how much it presses on ground
|
// tilt wheel depending oh how much it presses on ground
|
||||||
float groundOffset = pos.z + m_fHeightAboveRoad - 0.5f*mi->m_wheelScale;
|
float groundOffset = pos.z + m_fHeightAboveRoad - 0.5f*mi->m_wheelScale;
|
||||||
|
@ -2690,6 +2697,10 @@ CAutomobile::PreRender(void)
|
||||||
m_aWheelColPoints[CARWHEEL_REAR_LEFT].surfaceB == SURFACE_WATER){
|
m_aWheelColPoints[CARWHEEL_REAR_LEFT].surfaceB == SURFACE_WATER){
|
||||||
// hovering on water
|
// hovering on water
|
||||||
mat.RotateY(HALFPI);
|
mat.RotateY(HALFPI);
|
||||||
|
#ifdef BETTER_ALLCARSAREDODO_CHEAT
|
||||||
|
} else if (bAllDodosCheat && m_nDriveWheelsOnGround == 0 && m_nDriveWheelsOnGroundPrev == 0) {
|
||||||
|
mat.RotateY(HALFPI);
|
||||||
|
#endif
|
||||||
}else{
|
}else{
|
||||||
// tilt wheel depending oh how much it presses on ground
|
// tilt wheel depending oh how much it presses on ground
|
||||||
float groundOffset = pos.z + m_fHeightAboveRoad - 0.5f*mi->m_wheelScale;
|
float groundOffset = pos.z + m_fHeightAboveRoad - 0.5f*mi->m_wheelScale;
|
||||||
|
@ -2820,6 +2831,10 @@ CAutomobile::PreRender(void)
|
||||||
CGeneral::GetRandomNumberInRange(0.0f, 90.0f),
|
CGeneral::GetRandomNumberInRange(0.0f, 90.0f),
|
||||||
CGeneral::GetRandomNumberInRange(0.0f, 10.0f), 1);
|
CGeneral::GetRandomNumberInRange(0.0f, 10.0f), 1);
|
||||||
}
|
}
|
||||||
|
#ifdef BETTER_ALLCARSAREDODO_CHEAT
|
||||||
|
} else if (bAllDodosCheat && m_nDriveWheelsOnGround == 0 && m_nDriveWheelsOnGroundPrev == 0) {
|
||||||
|
mat.RotateY(-HALFPI);
|
||||||
|
#endif
|
||||||
}else{
|
}else{
|
||||||
// tilt wheel depending oh how much it presses on ground
|
// tilt wheel depending oh how much it presses on ground
|
||||||
float groundOffset = pos.z + m_fHeightAboveRoad - 0.5f*mi->m_wheelScale;
|
float groundOffset = pos.z + m_fHeightAboveRoad - 0.5f*mi->m_wheelScale;
|
||||||
|
@ -2857,6 +2872,10 @@ CAutomobile::PreRender(void)
|
||||||
CGeneral::GetRandomNumberInRange(0.0f, 90.0f),
|
CGeneral::GetRandomNumberInRange(0.0f, 90.0f),
|
||||||
CGeneral::GetRandomNumberInRange(0.0f, 10.0f), 1);
|
CGeneral::GetRandomNumberInRange(0.0f, 10.0f), 1);
|
||||||
}
|
}
|
||||||
|
#ifdef BETTER_ALLCARSAREDODO_CHEAT
|
||||||
|
} else if (bAllDodosCheat && m_nDriveWheelsOnGround == 0 && m_nDriveWheelsOnGroundPrev == 0) {
|
||||||
|
mat.RotateY(HALFPI);
|
||||||
|
#endif
|
||||||
}else{
|
}else{
|
||||||
// tilt wheel depending oh how much it presses on ground
|
// tilt wheel depending oh how much it presses on ground
|
||||||
float groundOffset = pos.z + m_fHeightAboveRoad - 0.5f*mi->m_wheelScale;
|
float groundOffset = pos.z + m_fHeightAboveRoad - 0.5f*mi->m_wheelScale;
|
||||||
|
|
|
@ -41,9 +41,6 @@ bool CVehicle::bCheat3;
|
||||||
bool CVehicle::bCheat4;
|
bool CVehicle::bCheat4;
|
||||||
bool CVehicle::bCheat5;
|
bool CVehicle::bCheat5;
|
||||||
bool CVehicle::bCheat8;
|
bool CVehicle::bCheat8;
|
||||||
#ifdef ALT_DODO_CHEAT
|
|
||||||
bool CVehicle::bAltDodoCheat;
|
|
||||||
#endif
|
|
||||||
bool CVehicle::bHoverCheat;
|
bool CVehicle::bHoverCheat;
|
||||||
bool CVehicle::bAllTaxisHaveNitro;
|
bool CVehicle::bAllTaxisHaveNitro;
|
||||||
bool CVehicle::m_bDisableMouseSteering = true;
|
bool CVehicle::m_bDisableMouseSteering = true;
|
||||||
|
@ -351,14 +348,26 @@ CVehicle::FlyingControl(eFlightModel flightModel)
|
||||||
fSteerUD *= -fSteerMult;
|
fSteerUD *= -fSteerMult;
|
||||||
|
|
||||||
// thrust
|
// thrust
|
||||||
|
float fThrust = pFlyingHandling->fThrust;
|
||||||
|
float fThrustFallOff = pFlyingHandling->fThrustFallOff;
|
||||||
|
float fThrustFallOffBack = pFlyingHandling->fThrustFallOff * 8.0f;
|
||||||
|
#ifdef BETTER_ALLCARSAREDODO_CHEAT
|
||||||
|
if (bAllDodosCheat && !IsRealPlane()) {
|
||||||
|
fThrust = pHandling->Transmission.fEngineAcceleration
|
||||||
|
* (pHandling->Transmission.nDriveType == '4' ? 4.0f : 2.0f);
|
||||||
|
fThrust = 5.0f * Max(fThrust, pFlyingHandling->fThrust); //tweak: (cars engines too weak to thrust car on air)
|
||||||
|
fThrustFallOff = Min(0.7f / pHandling->Transmission.fMaxVelocity, fThrustFallOff); //tweak: (use 0.7 instead of 1.0 to make cars 30% faster)
|
||||||
|
fThrustFallOffBack = -1.0f / pHandling->Transmission.fMaxReverseVelocity;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
float fForwSpeed = DotProduct(GetMoveSpeed(), GetForward());
|
float fForwSpeed = DotProduct(GetMoveSpeed(), GetForward());
|
||||||
CVector vecTail = GetColModel()->boundingBox.min.y * GetForward();
|
CVector vecTail = GetColModel()->boundingBox.min.y * GetForward();
|
||||||
float fThrust = (CPad::GetPad(0)->GetAccelerate() - CPad::GetPad(0)->GetBrake()) / 255.0f;
|
float fPedalState = (CPad::GetPad(0)->GetAccelerate() - CPad::GetPad(0)->GetBrake()) / 255.0f;
|
||||||
float fThrustAccel;
|
float fThrustAccel;
|
||||||
if(fForwSpeed > 0.0f || fThrust > 0.0f)
|
if(fForwSpeed > 0.0f || fPedalState > 0.0f)
|
||||||
fThrustAccel = (fThrust - pFlyingHandling->fThrustFallOff * fForwSpeed) * pFlyingHandling->fThrust;
|
fThrustAccel = (fPedalState - fThrustFallOff * fForwSpeed) * fThrust;
|
||||||
else
|
else
|
||||||
fThrustAccel = Min(fThrust - 8.0f * pFlyingHandling->fThrustFallOff * fForwSpeed, 0.0f) * pFlyingHandling->fThrust;
|
fThrustAccel = Min(fPedalState - fThrustFallOffBack * fForwSpeed, 0.0f) * fThrust;
|
||||||
if(flightModel == FLIGHT_MODEL_PLANE_UNUSED)
|
if(flightModel == FLIGHT_MODEL_PLANE_UNUSED)
|
||||||
fThrustAccel *= 0.3f;
|
fThrustAccel *= 0.3f;
|
||||||
else if(flightModel == FLIGHT_MODEL_PLANE)
|
else if(flightModel == FLIGHT_MODEL_PLANE)
|
||||||
|
@ -396,14 +405,18 @@ CVehicle::FlyingControl(eFlightModel flightModel)
|
||||||
float fPitchAccel = pFlyingHandling->fPitchStab * fTail * Abs(fTail) + pFlyingHandling->fPitch * fSteerUD * fForwSpeed;
|
float fPitchAccel = pFlyingHandling->fPitchStab * fTail * Abs(fTail) + pFlyingHandling->fPitch * fSteerUD * fForwSpeed;
|
||||||
ApplyTurnForce(fPitchAccel * m_fTurnMass * GetUp() * CTimer::GetTimeStep(), vecTail);
|
ApplyTurnForce(fPitchAccel * m_fTurnMass * GetUp() * CTimer::GetTimeStep(), vecTail);
|
||||||
|
|
||||||
float fLift = -DotProduct(GetMoveSpeed(), GetUp()) / Max(0.01f, GetMoveSpeed().Magnitude());
|
float fLift = DotProduct(GetMoveSpeed(), GetUp()) / Max(0.01f, GetMoveSpeed().Magnitude()); //accel*angle
|
||||||
float fLiftAccel = (pFlyingHandling->fAttackLift * fLift + pFlyingHandling->fFormLift) * fForwSpeed * fForwSpeed;
|
float fLiftAccel = (pFlyingHandling->fFormLift - pFlyingHandling->fAttackLift * fLift) * SQR(fForwSpeed);
|
||||||
float fLiftImpulse = fLiftAccel * m_fMass * CTimer::GetTimeStep();
|
float fLiftImpulse = fLiftAccel * m_fMass * CTimer::GetTimeStep();
|
||||||
if (GRAVITY * CTimer::GetTimeStep() * m_fMass < fLiftImpulse) {
|
if (GRAVITY * CTimer::GetTimeStep() * m_fMass < fLiftImpulse) {
|
||||||
if (flightModel == FLIGHT_MODEL_RCPLANE && GetPosition().z > 50.0f)
|
if (flightModel == FLIGHT_MODEL_RCPLANE && GetPosition().z > 50.0f)
|
||||||
fLiftImpulse = CTimer::GetTimeStep() * 0.9f*GRAVITY * m_fMass;
|
fLiftImpulse = CTimer::GetTimeStep() * 0.9f*GRAVITY * m_fMass;
|
||||||
else if (flightModel == FLIGHT_MODEL_SEAPLANE && GetPosition().z > 80.0f)
|
else if (flightModel == FLIGHT_MODEL_SEAPLANE && GetPosition().z > 80.0f)
|
||||||
fLiftImpulse = CTimer::GetTimeStep() * 0.9f*GRAVITY * m_fMass;
|
fLiftImpulse = CTimer::GetTimeStep() * 0.9f*GRAVITY * m_fMass;
|
||||||
|
#ifdef BETTER_ALLCARSAREDODO_CHEAT
|
||||||
|
else if(bAllDodosCheat && GetPosition().z > 170.0f)
|
||||||
|
fLiftImpulse = CTimer::GetTimeStep() * 0.9f * GRAVITY * m_fMass;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
ApplyMoveForce(fLiftImpulse * GetUp());
|
ApplyMoveForce(fLiftImpulse * GetUp());
|
||||||
|
|
||||||
|
@ -433,7 +446,7 @@ CVehicle::FlyingControl(eFlightModel flightModel)
|
||||||
case FLIGHT_MODEL_HELI:
|
case FLIGHT_MODEL_HELI:
|
||||||
{
|
{
|
||||||
#ifdef RESTORE_ALLCARSHELI_CHEAT
|
#ifdef RESTORE_ALLCARSHELI_CHEAT
|
||||||
tFlyingHandlingData* flyingHandling = bAllCarCheat && GetStatus() == STATUS_PLAYER && !IsRealHeli() ? mod_HandlingManager.GetFlyingPointer(HANDLING_MAVERICK) : pFlyingHandling;
|
tFlyingHandlingData* flyingHandling = bAllCarCheat && !IsRealHeli() ? mod_HandlingManager.GetFlyingPointer(HANDLING_MAVERICK) : pFlyingHandling;
|
||||||
#else
|
#else
|
||||||
tFlyingHandlingData* flyingHandling = pFlyingHandling;
|
tFlyingHandlingData* flyingHandling = pFlyingHandling;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -400,9 +400,6 @@ public:
|
||||||
static bool bCheat4;
|
static bool bCheat4;
|
||||||
static bool bCheat5;
|
static bool bCheat5;
|
||||||
static bool bCheat8;
|
static bool bCheat8;
|
||||||
#ifdef ALT_DODO_CHEAT
|
|
||||||
static bool bAltDodoCheat;
|
|
||||||
#endif
|
|
||||||
static bool bHoverCheat;
|
static bool bHoverCheat;
|
||||||
static bool bAllTaxisHaveNitro;
|
static bool bAllTaxisHaveNitro;
|
||||||
static bool m_bDisableMouseSteering;
|
static bool m_bDisableMouseSteering;
|
||||||
|
|
Loading…
Reference in a new issue