mirror of
https://github.com/GTAmodding/re3.git
synced 2024-11-16 09:19:00 +00:00
vehicle cheats and debug cheat string display
This commit is contained in:
parent
6692f5b2aa
commit
1c00e3cf2c
4 changed files with 1047 additions and 988 deletions
|
@ -49,7 +49,7 @@ CKeyboardState CPad::OldKeyState;
|
||||||
CKeyboardState CPad::NewKeyState;
|
CKeyboardState CPad::NewKeyState;
|
||||||
CKeyboardState CPad::TempKeyState;
|
CKeyboardState CPad::TempKeyState;
|
||||||
|
|
||||||
char CPad::KeyBoardCheatString[20];
|
char CPad::KeyBoardCheatString[30];
|
||||||
|
|
||||||
CMouseControllerState CPad::OldMouseControllerState;
|
CMouseControllerState CPad::OldMouseControllerState;
|
||||||
CMouseControllerState CPad::NewMouseControllerState;
|
CMouseControllerState CPad::NewMouseControllerState;
|
||||||
|
@ -108,31 +108,31 @@ void HealthCheat()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TankCheat()
|
void VehicleCheat(bool something, int model)
|
||||||
{
|
{
|
||||||
CHud::SetHelpMessage(TheText.Get("CHEAT1"), true);
|
CHud::SetHelpMessage(TheText.Get("CHEAT1"), true);
|
||||||
CStreaming::RequestModel(MI_RHINO, 0);
|
CStreaming::RequestModel(model, 0);
|
||||||
CStreaming::LoadAllRequestedModels(false);
|
CStreaming::LoadAllRequestedModels(something);
|
||||||
if (CStreaming::ms_aInfoForModel[MI_RHINO].m_loadState == STREAMSTATE_LOADED) {
|
if (CStreaming::ms_aInfoForModel[model].m_loadState == STREAMSTATE_LOADED) {
|
||||||
CHud::SetHelpMessage(TheText.Get("CHEAT1"), true);
|
CHud::SetHelpMessage(TheText.Get("CHEAT1"), true);
|
||||||
int32 node = ThePaths.FindNodeClosestToCoors(FindPlayerCoors(), PATH_CAR, 100.0f);
|
int32 node = ThePaths.FindNodeClosestToCoors(FindPlayerCoors(), PATH_CAR, 100.0f);
|
||||||
|
|
||||||
if (node < 0) return;
|
if (node < 0) return;
|
||||||
|
|
||||||
#ifdef FIX_BUGS
|
#ifdef FIX_BUGS
|
||||||
CAutomobile* tank = new CAutomobile(MI_RHINO, RANDOM_VEHICLE);
|
CAutomobile* vehicle = new CAutomobile(model, RANDOM_VEHICLE);
|
||||||
#else
|
#else
|
||||||
CAutomobile *tank = new CAutomobile(MI_RHINO, MISSION_VEHICLE);
|
CAutomobile* vehicle = new CAutomobile(MI_RHINO, MISSION_VEHICLE);
|
||||||
#endif
|
#endif
|
||||||
if (tank != nil) {
|
if (vehicle != nil) {
|
||||||
CVector pos = ThePaths.m_pathNodes[node].GetPosition();
|
CVector pos = ThePaths.m_pathNodes[node].GetPosition();
|
||||||
pos.z += 4.0f;
|
pos.z += 4.0f;
|
||||||
tank->SetPosition(pos);
|
vehicle->SetPosition(pos);
|
||||||
tank->SetOrientation(0.0f, 0.0f, DEGTORAD(200.0f));
|
vehicle->SetOrientation(0.0f, 0.0f, DEGTORAD(200.0f));
|
||||||
|
|
||||||
tank->SetStatus(STATUS_ABANDONED);
|
vehicle->SetStatus(STATUS_ABANDONED);
|
||||||
tank->m_nDoorLock = CARLOCK_UNLOCKED;
|
vehicle->m_nDoorLock = CARLOCK_UNLOCKED;
|
||||||
CWorld::Add(tank);
|
CWorld::Add(vehicle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -318,7 +318,8 @@ void KangarooCheat()
|
||||||
if (playerPed->m_ped_flagI80) {
|
if (playerPed->m_ped_flagI80) {
|
||||||
string = TheText.Get("CHEATOF");
|
string = TheText.Get("CHEATOF");
|
||||||
m_fMass = 70.0f;
|
m_fMass = 70.0f;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
string = TheText.Get("CHEAT1");
|
string = TheText.Get("CHEAT1");
|
||||||
m_fMass = 15.0f;
|
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
|
// "CCCCCC321TCT" - CIRCLE CIRCLE CIRCLE CIRCLE CIRCLE CIRCLE R1 L2 L1 TRIANGLE CIRCLE TRIANGLE
|
||||||
else if (!_CHEATCMP("TCT123CCCCCC"))
|
else if (!_CHEATCMP("TCT123CCCCCC"))
|
||||||
TankCheat();
|
VehicleCheat(true, MI_RHINO);
|
||||||
|
|
||||||
// "CCCSSSSS1TCT" - CIRCLE CIRCLE CIRCLE SQUARE SQUARE SQUARE SQUARE SQUARE L1 TRIANGLE CIRCLE TRIANGLE
|
// "CCCSSSSS1TCT" - CIRCLE CIRCLE CIRCLE SQUARE SQUARE SQUARE SQUARE SQUARE L1 TRIANGLE CIRCLE TRIANGLE
|
||||||
else if (!_CHEATCMP("TCT1SSSSSCCC"))
|
else if (!_CHEATCMP("TCT1SSSSSCCC"))
|
||||||
|
@ -906,9 +907,45 @@ void CPad::AddToPCCheatString(char c)
|
||||||
if (!_CHEATCMP("ESAELPECILOPON"))
|
if (!_CHEATCMP("ESAELPECILOPON"))
|
||||||
WantedLevelDownCheat();
|
WantedLevelDownCheat();
|
||||||
|
|
||||||
// "GIVEUSATANK"
|
// "PANZER"
|
||||||
if ( !_CHEATCMP("KNATASUEVIG") )
|
if (!_CHEATCMP("REZNAP"))
|
||||||
TankCheat();
|
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"
|
// "BANGBANGBANG"
|
||||||
if (!_CHEATCMP("GNABGNABGNAB"))
|
if (!_CHEATCMP("GNABGNABGNAB"))
|
||||||
|
|
|
@ -176,7 +176,7 @@ public:
|
||||||
static CKeyboardState OldKeyState;
|
static CKeyboardState OldKeyState;
|
||||||
static CKeyboardState NewKeyState;
|
static CKeyboardState NewKeyState;
|
||||||
static CKeyboardState TempKeyState;
|
static CKeyboardState TempKeyState;
|
||||||
static char KeyBoardCheatString[20];
|
static char KeyBoardCheatString[30];
|
||||||
static CMouseControllerState OldMouseControllerState;
|
static CMouseControllerState OldMouseControllerState;
|
||||||
static CMouseControllerState NewMouseControllerState;
|
static CMouseControllerState NewMouseControllerState;
|
||||||
static CMouseControllerState PCTempMouseControllerState;
|
static CMouseControllerState PCTempMouseControllerState;
|
||||||
|
|
|
@ -689,11 +689,13 @@ DisplayGameDebugText()
|
||||||
{
|
{
|
||||||
static bool bDisplayPosn = false;
|
static bool bDisplayPosn = false;
|
||||||
static bool bDisplayRate = false;
|
static bool bDisplayRate = false;
|
||||||
|
static bool bDisplayCheatStr = false;
|
||||||
|
|
||||||
{
|
{
|
||||||
SETTWEAKPATH("GameDebugText");
|
SETTWEAKPATH("GameDebugText");
|
||||||
TWEAKBOOL(bDisplayPosn);
|
TWEAKBOOL(bDisplayPosn);
|
||||||
TWEAKBOOL(bDisplayRate);
|
TWEAKBOOL(bDisplayRate);
|
||||||
|
TWEAKBOOL(bDisplayCheatStr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -781,6 +783,26 @@ DisplayGameDebugText()
|
||||||
CFont::SetColor(CRGBA(255, 108, 0, 255));
|
CFont::SetColor(CRGBA(255, 108, 0, 255));
|
||||||
CFont::PrintString(40.0f, 40.0f, ustr);
|
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
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -69,7 +69,7 @@ mysrand(unsigned int seed)
|
||||||
#ifdef DEBUGMENU
|
#ifdef DEBUGMENU
|
||||||
void WeaponCheat();
|
void WeaponCheat();
|
||||||
void HealthCheat();
|
void HealthCheat();
|
||||||
void TankCheat();
|
void VehicleCheat(bool something, int model);
|
||||||
void BlowUpCarsCheat();
|
void BlowUpCarsCheat();
|
||||||
void ChangePlayerCheat();
|
void ChangePlayerCheat();
|
||||||
void MayhemCheat();
|
void MayhemCheat();
|
||||||
|
@ -293,7 +293,7 @@ DebugMenuPopulate(void)
|
||||||
DebugMenuAddCmd("Cheats", "Health", HealthCheat);
|
DebugMenuAddCmd("Cheats", "Health", HealthCheat);
|
||||||
DebugMenuAddCmd("Cheats", "Wanted level up", WantedLevelUpCheat);
|
DebugMenuAddCmd("Cheats", "Wanted level up", WantedLevelUpCheat);
|
||||||
DebugMenuAddCmd("Cheats", "Wanted level down", WantedLevelDownCheat);
|
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", "Blow up cars", BlowUpCarsCheat);
|
||||||
DebugMenuAddCmd("Cheats", "Change player", ChangePlayerCheat);
|
DebugMenuAddCmd("Cheats", "Change player", ChangePlayerCheat);
|
||||||
DebugMenuAddCmd("Cheats", "Mayhem", MayhemCheat);
|
DebugMenuAddCmd("Cheats", "Mayhem", MayhemCheat);
|
||||||
|
|
Loading…
Reference in a new issue