From e2979432f91be806f6109584ef23d9e9de20ad30 Mon Sep 17 00:00:00 2001 From: Grinch_ Date: Sun, 31 Oct 2021 02:30:28 +0600 Subject: [PATCH] Fix SA build errors --- src/game.cpp | 2 +- src/pch.h | 1 + src/util.cpp | 2 ++ src/vehicle.cpp | 12 +++++++----- src/weapon.cpp | 2 +- 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/game.cpp b/src/game.cpp index 049da05..a283b1a 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -362,7 +362,7 @@ void Game::ClearFreecamStuff() { m_Freecam::m_bInitDone = false; Command(0, false); - patch::Set(BY_GAME(0xBA6769, 0x86963A), m_Freecam::m_bHudState); // hud + patch::Set(BY_GAME(0xBA6769, 0x86963A, NULL), m_Freecam::m_bHudState); // hud patch::Set(0xBA676C, m_Freecam::m_bRadarState); // radar CPad::GetPad(0)->DisablePlayerControls = false; diff --git a/src/pch.h b/src/pch.h index 6d13d73..39ccd24 100644 --- a/src/pch.h +++ b/src/pch.h @@ -61,6 +61,7 @@ #include #include #include +#include #endif #include "../depend/fla/IDaccess.h" diff --git a/src/util.cpp b/src/util.cpp index c917744..ab2e526 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -33,7 +33,9 @@ std::string Util::GetLocationName(CVector* pos) } if (interior == 0) + { return CTheZones::FindSmallestZoneForPosition(*pos, true)->GetTranslatedName() + std::string(", ") + town; + } return std::string("Interior ") + std::to_string(interior) + ", " + town; #elif GTAVC diff --git a/src/vehicle.cpp b/src/vehicle.cpp index e0213e8..1605f74 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -84,10 +84,14 @@ Vehicle::Vehicle() } if (vehInstantStart.Pressed()) + { Command(hveh, 40.0f); + } if (vehInstantStop.Pressed()) + { Command(hveh, 0); + } if (m_bNoDamage) { @@ -589,16 +593,14 @@ void Vehicle::Draw() Ui::CheckboxAddress("All cars have nitro", 0x969165); #endif -#ifdef GTA3 - Ui::CheckboxAddress("Cars fly", 0x95CD75); -#else +#ifndef GTA3 Ui::CheckboxAddress("Aggressive drivers", BY_GAME(0x96914F,0xA10B47, NULL)); Ui::CheckboxAddress("All taxis have nitro", BY_GAME(0x96918B,0xA10B3A, NULL)); Ui::CheckboxWithHint("Bikes fly", &m_bBikeFly); Ui::CheckboxAddress("Boats fly", BY_GAME(0x969153, 0xA10B11, NULL)); - Ui::CheckboxAddress("Cars fly", BY_GAME(0x969160, 0xA10B28, NULL)); - Ui::CheckboxWithHint("Cars heavy", &m_bVehHeavy); #endif + Ui::CheckboxAddress("Cars fly", BY_GAME(0x969160, 0xA10B28, 0x95CD75)); + Ui::CheckboxWithHint("Cars heavy", &m_bVehHeavy); if (Ui::CheckboxWithHint("Damage proof", &m_bNoDamage, "Every vehicle entered will be damage proof\nBullet, Collision, Explosion, Fire, Meele etc")) { diff --git a/src/weapon.cpp b/src/weapon.cpp index 15ea924..9a3e7d1 100644 --- a/src/weapon.cpp +++ b/src/weapon.cpp @@ -68,7 +68,7 @@ Weapon::Weapon() } #ifdef GTASA - if (m_bRapidFire && weaponType != BY_GAME(WEAPON_MINIGUN, WEAPONTYPE_MINIGUN)) // mingun doesn't work with rapidfire + if (m_bRapidFire && weaponType != BY_GAME(WEAPON_MINIGUN, WEAPONTYPE_MINIGUN, WEAPONTYPE_MINIGUN)) // mingun doesn't work with rapidfire { pWeaponInfo->m_nFlags.bContinuosFire = true;