mirror of
https://git.rip/DMCA_FUCKER/re3.git
synced 2024-11-05 10:45:53 +00:00
vehicle cheats and debug cheat string display
This commit is contained in:
parent
6692f5b2aa
commit
1c00e3cf2c
|
@ -49,7 +49,7 @@ CKeyboardState CPad::OldKeyState;
|
|||
CKeyboardState CPad::NewKeyState;
|
||||
CKeyboardState CPad::TempKeyState;
|
||||
|
||||
char CPad::KeyBoardCheatString[20];
|
||||
char CPad::KeyBoardCheatString[30];
|
||||
|
||||
CMouseControllerState CPad::OldMouseControllerState;
|
||||
CMouseControllerState CPad::NewMouseControllerState;
|
||||
|
@ -108,31 +108,31 @@ void HealthCheat()
|
|||
}
|
||||
}
|
||||
|
||||
void TankCheat()
|
||||
void VehicleCheat(bool something, int model)
|
||||
{
|
||||
CHud::SetHelpMessage(TheText.Get("CHEAT1"), true);
|
||||
CStreaming::RequestModel(MI_RHINO, 0);
|
||||
CStreaming::LoadAllRequestedModels(false);
|
||||
if (CStreaming::ms_aInfoForModel[MI_RHINO].m_loadState == STREAMSTATE_LOADED) {
|
||||
CStreaming::RequestModel(model, 0);
|
||||
CStreaming::LoadAllRequestedModels(something);
|
||||
if (CStreaming::ms_aInfoForModel[model].m_loadState == STREAMSTATE_LOADED) {
|
||||
CHud::SetHelpMessage(TheText.Get("CHEAT1"), true);
|
||||
int32 node = ThePaths.FindNodeClosestToCoors(FindPlayerCoors(), PATH_CAR, 100.0f);
|
||||
|
||||
if (node < 0) return;
|
||||
|
||||
#ifdef FIX_BUGS
|
||||
CAutomobile* tank = new CAutomobile(MI_RHINO, RANDOM_VEHICLE);
|
||||
CAutomobile* vehicle = new CAutomobile(model, RANDOM_VEHICLE);
|
||||
#else
|
||||
CAutomobile *tank = new CAutomobile(MI_RHINO, MISSION_VEHICLE);
|
||||
CAutomobile* vehicle = new CAutomobile(MI_RHINO, MISSION_VEHICLE);
|
||||
#endif
|
||||
if (tank != nil) {
|
||||
if (vehicle != nil) {
|
||||
CVector pos = ThePaths.m_pathNodes[node].GetPosition();
|
||||
pos.z += 4.0f;
|
||||
tank->SetPosition(pos);
|
||||
tank->SetOrientation(0.0f, 0.0f, DEGTORAD(200.0f));
|
||||
vehicle->SetPosition(pos);
|
||||
vehicle->SetOrientation(0.0f, 0.0f, DEGTORAD(200.0f));
|
||||
|
||||
tank->SetStatus(STATUS_ABANDONED);
|
||||
tank->m_nDoorLock = CARLOCK_UNLOCKED;
|
||||
CWorld::Add(tank);
|
||||
vehicle->SetStatus(STATUS_ABANDONED);
|
||||
vehicle->m_nDoorLock = CARLOCK_UNLOCKED;
|
||||
CWorld::Add(vehicle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -318,7 +318,8 @@ void KangarooCheat()
|
|||
if (playerPed->m_ped_flagI80) {
|
||||
string = TheText.Get("CHEATOF");
|
||||
m_fMass = 70.0f;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
string = TheText.Get("CHEAT1");
|
||||
m_fMass = 15.0f;
|
||||
}
|
||||
|
@ -824,7 +825,7 @@ void CPad::AddToCheatString(char c)
|
|||
|
||||
// "CCCCCC321TCT" - CIRCLE CIRCLE CIRCLE CIRCLE CIRCLE CIRCLE R1 L2 L1 TRIANGLE CIRCLE TRIANGLE
|
||||
else if (!_CHEATCMP("TCT123CCCCCC"))
|
||||
TankCheat();
|
||||
VehicleCheat(true, MI_RHINO);
|
||||
|
||||
// "CCCSSSSS1TCT" - CIRCLE CIRCLE CIRCLE SQUARE SQUARE SQUARE SQUARE SQUARE L1 TRIANGLE CIRCLE TRIANGLE
|
||||
else if (!_CHEATCMP("TCT1SSSSSCCC"))
|
||||
|
@ -906,9 +907,45 @@ void CPad::AddToPCCheatString(char c)
|
|||
if (!_CHEATCMP("ESAELPECILOPON"))
|
||||
WantedLevelDownCheat();
|
||||
|
||||
// "GIVEUSATANK"
|
||||
if ( !_CHEATCMP("KNATASUEVIG") )
|
||||
TankCheat();
|
||||
// "PANZER"
|
||||
if (!_CHEATCMP("REZNAP"))
|
||||
VehicleCheat(true, MI_RHINO);
|
||||
|
||||
// "TRAVELINSTYLE"
|
||||
if (!_CHEATCMP("ELYTSNILEVART"))
|
||||
VehicleCheat(true, MI_BLOODRA);
|
||||
|
||||
// "GETTHEREQUICKLY"
|
||||
if (!_CHEATCMP("YLKCIUQEREHTTEG"))
|
||||
VehicleCheat(true, MI_BLOODRB);
|
||||
|
||||
// "GETTHEREFAST"
|
||||
if (!_CHEATCMP("TSAFEREHTTEG"))
|
||||
VehicleCheat(true, MI_SABRETUR);
|
||||
|
||||
// "GETTHEREVERYFASTINDEED"
|
||||
if (!_CHEATCMP("DEEDNITSAFYREVEREHTTEG"))
|
||||
VehicleCheat(true, MI_HOTRINA);
|
||||
|
||||
// "GETTHEREAMAZINGLYFAST"
|
||||
if (!_CHEATCMP("TSAFYLGNIZAMAEREHTTEG"))
|
||||
VehicleCheat(true, MI_HOTRINB);
|
||||
|
||||
// "THELASTRIDE"
|
||||
if (!_CHEATCMP("EDIRTSALEHT"))
|
||||
VehicleCheat(true, MI_ROMERO);
|
||||
|
||||
// "ROCKANDROLLCAR"
|
||||
if (!_CHEATCMP("RACLLORDNAKCOR"))
|
||||
VehicleCheat(true, MI_LOVEFIST);
|
||||
|
||||
// "RUBBISHCAR"
|
||||
if (!_CHEATCMP("RACHSIBBUR"))
|
||||
VehicleCheat(true, MI_TRASH);
|
||||
|
||||
// "BETTERTHANWALKING"
|
||||
if (!_CHEATCMP("GNIKLAWNAHTRETTEB"))
|
||||
VehicleCheat(true, MI_CADDY);
|
||||
|
||||
// "BANGBANGBANG"
|
||||
if (!_CHEATCMP("GNABGNABGNAB"))
|
||||
|
|
|
@ -176,7 +176,7 @@ public:
|
|||
static CKeyboardState OldKeyState;
|
||||
static CKeyboardState NewKeyState;
|
||||
static CKeyboardState TempKeyState;
|
||||
static char KeyBoardCheatString[20];
|
||||
static char KeyBoardCheatString[30];
|
||||
static CMouseControllerState OldMouseControllerState;
|
||||
static CMouseControllerState NewMouseControllerState;
|
||||
static CMouseControllerState PCTempMouseControllerState;
|
||||
|
|
|
@ -689,11 +689,13 @@ DisplayGameDebugText()
|
|||
{
|
||||
static bool bDisplayPosn = false;
|
||||
static bool bDisplayRate = false;
|
||||
static bool bDisplayCheatStr = false;
|
||||
|
||||
{
|
||||
SETTWEAKPATH("GameDebugText");
|
||||
TWEAKBOOL(bDisplayPosn);
|
||||
TWEAKBOOL(bDisplayRate);
|
||||
TWEAKBOOL(bDisplayCheatStr);
|
||||
}
|
||||
|
||||
|
||||
|
@ -781,6 +783,26 @@ DisplayGameDebugText()
|
|||
CFont::SetColor(CRGBA(255, 108, 0, 255));
|
||||
CFont::PrintString(40.0f, 40.0f, ustr);
|
||||
}
|
||||
|
||||
if (bDisplayCheatStr)
|
||||
{
|
||||
sprintf(str, "%s", CPad::KeyBoardCheatString);
|
||||
AsciiToUnicode(str, ustr);
|
||||
|
||||
CFont::SetPropOff();
|
||||
CFont::SetBackgroundOff();
|
||||
CFont::SetScale(0.7f, 1.5f);
|
||||
CFont::SetCentreOn();
|
||||
CFont::SetBackGroundOnlyTextOff();
|
||||
CFont::SetWrapx(640.0f);
|
||||
CFont::SetFontStyle(FONT_HEADING);
|
||||
|
||||
CFont::SetColor(CRGBA(0, 0, 0, 255));
|
||||
CFont::PrintString(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH * 0.5f)+2.f, SCREEN_SCALE_FROM_BOTTOM(20.0f)+2.f, ustr);
|
||||
|
||||
CFont::SetColor(CRGBA(255, 150, 225, 255));
|
||||
CFont::PrintString(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH * 0.5f), SCREEN_SCALE_FROM_BOTTOM(20.0f), ustr);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ mysrand(unsigned int seed)
|
|||
#ifdef DEBUGMENU
|
||||
void WeaponCheat();
|
||||
void HealthCheat();
|
||||
void TankCheat();
|
||||
void VehicleCheat(bool something, int model);
|
||||
void BlowUpCarsCheat();
|
||||
void ChangePlayerCheat();
|
||||
void MayhemCheat();
|
||||
|
@ -293,7 +293,7 @@ DebugMenuPopulate(void)
|
|||
DebugMenuAddCmd("Cheats", "Health", HealthCheat);
|
||||
DebugMenuAddCmd("Cheats", "Wanted level up", WantedLevelUpCheat);
|
||||
DebugMenuAddCmd("Cheats", "Wanted level down", WantedLevelDownCheat);
|
||||
DebugMenuAddCmd("Cheats", "Tank", TankCheat);
|
||||
DebugMenuAddCmd("Cheats", "Tank", []() { VehicleCheat(true, MI_TAXI); });
|
||||
DebugMenuAddCmd("Cheats", "Blow up cars", BlowUpCarsCheat);
|
||||
DebugMenuAddCmd("Cheats", "Change player", ChangePlayerCheat);
|
||||
DebugMenuAddCmd("Cheats", "Mayhem", MayhemCheat);
|
||||
|
|
Loading…
Reference in a new issue