Fix SA build errors

This commit is contained in:
Grinch_ 2021-10-31 02:30:28 +06:00
parent be1ab9aad9
commit e2979432f9
5 changed files with 12 additions and 7 deletions

View File

@ -362,7 +362,7 @@ void Game::ClearFreecamStuff()
{ {
m_Freecam::m_bInitDone = false; m_Freecam::m_bInitDone = false;
Command<Commands::SET_EVERYONE_IGNORE_PLAYER>(0, false); Command<Commands::SET_EVERYONE_IGNORE_PLAYER>(0, false);
patch::Set<BYTE>(BY_GAME(0xBA6769, 0x86963A), m_Freecam::m_bHudState); // hud patch::Set<BYTE>(BY_GAME(0xBA6769, 0x86963A, NULL), m_Freecam::m_bHudState); // hud
patch::Set<BYTE>(0xBA676C, m_Freecam::m_bRadarState); // radar patch::Set<BYTE>(0xBA676C, m_Freecam::m_bRadarState); // radar
CPad::GetPad(0)->DisablePlayerControls = false; CPad::GetPad(0)->DisablePlayerControls = false;

View File

@ -61,6 +61,7 @@
#include <eVehicleClass.h> #include <eVehicleClass.h>
#include <CGangWars.h> #include <CGangWars.h>
#include <CZoneInfo.h> #include <CZoneInfo.h>
#include <CTheZones.h>
#endif #endif
#include "../depend/fla/IDaccess.h" #include "../depend/fla/IDaccess.h"

View File

@ -33,7 +33,9 @@ std::string Util::GetLocationName(CVector* pos)
} }
if (interior == 0) if (interior == 0)
{
return CTheZones::FindSmallestZoneForPosition(*pos, true)->GetTranslatedName() + std::string(", ") + town; return CTheZones::FindSmallestZoneForPosition(*pos, true)->GetTranslatedName() + std::string(", ") + town;
}
return std::string("Interior ") + std::to_string(interior) + ", " + town; return std::string("Interior ") + std::to_string(interior) + ", " + town;
#elif GTAVC #elif GTAVC

View File

@ -84,10 +84,14 @@ Vehicle::Vehicle()
} }
if (vehInstantStart.Pressed()) if (vehInstantStart.Pressed())
{
Command<Commands::SET_CAR_FORWARD_SPEED>(hveh, 40.0f); Command<Commands::SET_CAR_FORWARD_SPEED>(hveh, 40.0f);
}
if (vehInstantStop.Pressed()) if (vehInstantStop.Pressed())
{
Command<Commands::SET_CAR_FORWARD_SPEED>(hveh, 0); Command<Commands::SET_CAR_FORWARD_SPEED>(hveh, 0);
}
if (m_bNoDamage) if (m_bNoDamage)
{ {
@ -589,16 +593,14 @@ void Vehicle::Draw()
Ui::CheckboxAddress("All cars have nitro", 0x969165); Ui::CheckboxAddress("All cars have nitro", 0x969165);
#endif #endif
#ifdef GTA3 #ifndef GTA3
Ui::CheckboxAddress("Cars fly", 0x95CD75);
#else
Ui::CheckboxAddress("Aggressive drivers", BY_GAME(0x96914F,0xA10B47, NULL)); Ui::CheckboxAddress("Aggressive drivers", BY_GAME(0x96914F,0xA10B47, NULL));
Ui::CheckboxAddress("All taxis have nitro", BY_GAME(0x96918B,0xA10B3A, NULL)); Ui::CheckboxAddress("All taxis have nitro", BY_GAME(0x96918B,0xA10B3A, NULL));
Ui::CheckboxWithHint("Bikes fly", &m_bBikeFly); Ui::CheckboxWithHint("Bikes fly", &m_bBikeFly);
Ui::CheckboxAddress("Boats fly", BY_GAME(0x969153, 0xA10B11, NULL)); 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 #endif
Ui::CheckboxAddress("Cars fly", BY_GAME(0x969160, 0xA10B28, 0x95CD75));
Ui::CheckboxWithHint("Cars heavy", &m_bVehHeavy);
if (Ui::CheckboxWithHint("Damage proof", &m_bNoDamage, if (Ui::CheckboxWithHint("Damage proof", &m_bNoDamage,
"Every vehicle entered will be damage proof\nBullet, Collision, Explosion, Fire, Meele etc")) "Every vehicle entered will be damage proof\nBullet, Collision, Explosion, Fire, Meele etc"))
{ {

View File

@ -68,7 +68,7 @@ Weapon::Weapon()
} }
#ifdef GTASA #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; pWeaponInfo->m_nFlags.bContinuosFire = true;