Merge branch 'miami' of github.com:GTAmodding/re3 into miami

This commit is contained in:
aap 2020-05-22 23:58:59 +02:00
commit a1e4b15bcc
27 changed files with 1355 additions and 136 deletions

File diff suppressed because it is too large Load Diff

View File

@ -488,6 +488,8 @@ private:
void PlayerInAngledAreaCheckCommand(int32, uint32*);
void CharInAreaCheckCommand(int32, uint32*);
void CarInAreaCheckCommand(int32, uint32*);
void LocateObjectCommand(int32, uint32*);
void ObjectInAreaCheckCommand(int32, uint32*);
float LimitAngleOnCircle(float angle) { return angle < 0.0f ? angle + 360.0f : angle; }

View File

@ -29,7 +29,7 @@ bool PrintDebugCode = false;
int16 DebugCamMode;
#ifdef FREE_CAM
bool CCamera::bFreeCam = true;
bool CCamera::bFreeCam;
int nPreviousMode = -1;
#endif

View File

@ -178,7 +178,7 @@ CColStore::LoadCollision(const CVector2D &pos)
}else{
for (int j = 0; j < MAX_CLEANUP; j++) {
CPhysical* pEntity = CTheScripts::MissionCleanup.DoesThisEntityWaitForCollision(j);
if (pEntity /* !pEntity->bDontLoadCollision && !pEntity->bIsFrozen */) {
if (pEntity && !pEntity->bDontLoadCollision && !pEntity->bIsFrozen) {
if (GetBoundingBox(i).IsPointInside(pEntity->GetPosition(), -80.0f))
wantThisOne = true;
}

View File

@ -48,6 +48,7 @@ CRGBA HEADER_COLOR(255, 150, 255, 255);
CRGBA DARKMENUOPTION_COLOR(195, 90, 165, 255);
CRGBA SLIDERON_COLOR(97, 194, 247, 255);
CRGBA SLIDEROFF_COLOR(27, 89, 130, 255);
CRGBA MAPINFOBOX_COLOR(255, 150, 225, 150);
#define TIDY_UP_PBP // ProcessButtonPresses
#define MAX_VISIBLE_LIST_ROW 30
@ -2928,6 +2929,9 @@ CMenuManager::LoadSettings()
CFileMgr::Read(fileHandle, m_PrefsSkinFile, 256);
CFileMgr::Read(fileHandle, (char*)&m_ControlMethod, 1);
CFileMgr::Read(fileHandle, (char*)&m_PrefsLanguage, 1);
#ifdef FREE_CAM
CFileMgr::Read(fileHandle, (char*)&TheCamera.bFreeCam, 1);
#endif
}
}
@ -3018,6 +3022,9 @@ CMenuManager::SaveSettings()
CFileMgr::Write(fileHandle, m_PrefsSkinFile, 256);
CFileMgr::Write(fileHandle, (char*)&m_ControlMethod, 1);
CFileMgr::Write(fileHandle, (char*)&m_PrefsLanguage, 1);
#ifdef FREE_CAM
CFileMgr::Write(fileHandle, (char*)&TheCamera.bFreeCam, 1);
#endif
}
CFileMgr::CloseFile(fileHandle);
@ -4641,6 +4648,13 @@ CMenuManager::ProcessOnOffMenuOptions()
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0);
SaveSettings();
break;
#ifdef FREE_CAM
case MENUACTION_FREECAM:
TheCamera.bFreeCam = !TheCamera.bFreeCam;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0);
SaveSettings();
break;
#endif
}
}
@ -5086,7 +5100,7 @@ CMenuManager::PrintMap(void)
CSprite2d::DrawRect(CRect(MENU_X(14.0f), SCREEN_STRETCH_FROM_BOTTOM(95.0f),
SCREEN_STRETCH_FROM_RIGHT(11.0f), SCREEN_STRETCH_FROM_BOTTOM(59.0f)),
CRGBA(235, 170, 50, 255));
CRGBA(MAPINFOBOX_COLOR.r, MAPINFOBOX_COLOR.g, MAPINFOBOX_COLOR.b, MAPINFOBOX_COLOR.a));
CFont::SetScale(MENU_X(0.4f), MENU_Y(0.7f));
CFont::SetFontStyle(FONT_LOCALE(FONT_BANK));

View File

@ -328,7 +328,10 @@ enum eMenuAction
MENUACTION_LANG_JAP,
#endif
#ifdef IMPROVED_VIDEOMODE
MENUACTION_SCREENMODE
MENUACTION_SCREENMODE,
#endif
#ifdef FREE_CAM
MENUACTION_FREECAM
#endif
};

View File

@ -664,6 +664,22 @@ void CGame::Process(void)
}
}
void
CGame::InitAfterFocusLoss()
{
/*
byte_869656 = byte_86969D;
result = cDMAudio::SetCurrent3DProvider(byte_86969D);
if ( !bGameStarted && !bMenuVisible )
byte_869642 = 1;
*/
//cDMAudio::SetCurrent3DProvider( ? ? ? );
if (!FrontEndMenuManager.m_bGameNotLoaded && !FrontEndMenuManager.m_bMenuActive)
FrontEndMenuManager.m_bStartUpFrontEndRequested = true;
}
bool
CGame::CanSeeOutSideFromCurrArea(void)
{

View File

@ -59,6 +59,8 @@ public:
static void InitialiseWhenRestarting(void);
static void Process(void);
static void InitAfterFocusLoss(void);
static bool IsInInterior(void) { return currArea != AREA_MAIN_MAP; }
static bool CanSeeOutSideFromCurrArea(void);

View File

@ -276,6 +276,9 @@ const CMenuScreen aScreens[] = {
// MENUPAGE_CONTROLLER_PC = 35
{ "FET_CTL", 1, MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, 0, 0,
MENUACTION_CTRLMETHOD, "FET_CME", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC,
#ifdef FREE_CAM
MENUACTION_FREECAM, "FREECAM", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC,
#endif
MENUACTION_CHANGEMENU, "FET_RDK", SAVESLOT_NONE, MENUPAGE_KEYBOARD_CONTROLS,
MENUACTION_CHANGEMENU, "FET_AMS", SAVESLOT_NONE, MENUPAGE_MOUSE_CONTROLS,
MENUACTION_RESTOREDEF, "FET_DEF", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC,

View File

@ -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);
}
}
}
@ -824,7 +824,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 +906,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") )

View File

@ -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;

View File

@ -149,13 +149,14 @@ CPlayerInfo::Clear(void)
}
void
CPlayerInfo::BlowUpRCBuggy(void)
CPlayerInfo::BlowUpRCBuggy(bool actually)
{
if (!m_pRemoteVehicle || m_pRemoteVehicle->bRemoveFromWorld)
return;
CRemote::TakeRemoteControlledCarFromPlayer();
m_pRemoteVehicle->BlowUpCar(FindPlayerPed());
if (actually)
m_pRemoteVehicle->BlowUpCar(FindPlayerPed());
}
void

View File

@ -50,7 +50,7 @@ public:
int32 m_nExplosionsSinceLastReward;
int32 field_268;
int32 field_272;
int32 m_nHavocCaused; // TODO: check offset
uint32 m_nHavocLevel;
bool m_bInfiniteSprint;
bool m_bFastReload;
bool m_bFireproof;
@ -74,7 +74,7 @@ public:
bool IsPlayerInRemoteMode(void);
void PlayerFailedCriticalMission(void);
void Clear(void);
void BlowUpRCBuggy(void);
void BlowUpRCBuggy(bool);
void CancelPlayerEnteringCars(CVehicle*);
bool IsRestartingAfterDeath(void);
bool IsRestartingAfterArrest(void);

View File

@ -431,7 +431,7 @@ void CRadar::Draw3dMarkers()
if (ms_RadarTrace[i].m_eBlipDisplay == BLIP_DISPLAY_BOTH || ms_RadarTrace[i].m_eBlipDisplay == BLIP_DISPLAY_MARKER_ONLY) {
CVector pos = entity->GetPosition();
pos.z += 1.2f * CModelInfo::GetModelInfo(entity->GetModelIndex())->GetColModel()->boundingBox.max.z + 2.5f;
C3dMarkers::PlaceMarker(i | (ms_RadarTrace[i].m_BlipIndex << 16), 1, pos, 2.5f, 0, 128, 255, 255, 1024, 0.2f, 5);
C3dMarkers::PlaceMarker(i | (ms_RadarTrace[i].m_BlipIndex << 16), 1, pos, 2.5f, CARBLIP_MARKER_COLOR_R, CARBLIP_MARKER_COLOR_G, CARBLIP_MARKER_COLOR_B, CARBLIP_MARKER_COLOR_A, 1024, 0.2f, 5);
}
break;
}
@ -445,7 +445,7 @@ void CRadar::Draw3dMarkers()
if (ms_RadarTrace[i].m_eBlipDisplay == BLIP_DISPLAY_BOTH || ms_RadarTrace[i].m_eBlipDisplay == BLIP_DISPLAY_MARKER_ONLY) {
CVector pos = entity->GetPosition();
pos.z += 3.0f;
C3dMarkers::PlaceMarker(i | (ms_RadarTrace[i].m_BlipIndex << 16), 1, pos, 1.5f, 0, 128, 255, 255, 1024, 0.2f, 5);
C3dMarkers::PlaceMarker(i | (ms_RadarTrace[i].m_BlipIndex << 16), 1, pos, 1.5f, CHARBLIP_MARKER_COLOR_R, CHARBLIP_MARKER_COLOR_G, CHARBLIP_MARKER_COLOR_B, CHARBLIP_MARKER_COLOR_A, 1024, 0.2f, 5);
}
break;
}
@ -455,7 +455,7 @@ void CRadar::Draw3dMarkers()
if (ms_RadarTrace[i].m_eBlipDisplay == BLIP_DISPLAY_BOTH || ms_RadarTrace[i].m_eBlipDisplay == BLIP_DISPLAY_MARKER_ONLY) {
CVector pos = entity->GetPosition();
pos.z += CModelInfo::GetModelInfo(entity->GetModelIndex())->GetColModel()->boundingBox.max.z + 1.0f + 1.0f;
C3dMarkers::PlaceMarker(i | (ms_RadarTrace[i].m_BlipIndex << 16), 1, pos, 1.0f, 0, 128, 255, 255, 1024, 0.2f, 5);
C3dMarkers::PlaceMarker(i | (ms_RadarTrace[i].m_BlipIndex << 16), 1, pos, 1.0f, OBJECTBLIP_MARKER_COLOR_R, OBJECTBLIP_MARKER_COLOR_G, OBJECTBLIP_MARKER_COLOR_B, OBJECTBLIP_MARKER_COLOR_A, 1024, 0.2f, 5);
}
break;
}
@ -464,7 +464,7 @@ void CRadar::Draw3dMarkers()
case BLIP_CONTACT_POINT:
if (!CTheScripts::IsPlayerOnAMission()) {
if (ms_RadarTrace[i].m_eBlipDisplay == BLIP_DISPLAY_BOTH || ms_RadarTrace[i].m_eBlipDisplay == BLIP_DISPLAY_MARKER_ONLY)
C3dMarkers::PlaceMarkerSet(i | (ms_RadarTrace[i].m_BlipIndex << 16), 4, ms_RadarTrace[i].m_vecPos, 2.0f, 0, 128, 255, 128, 2048, 0.2f, 0);
C3dMarkers::PlaceMarkerSet(i | (ms_RadarTrace[i].m_BlipIndex << 16), 4, ms_RadarTrace[i].m_vecPos, 2.0f, COORDBLIP_MARKER_COLOR_R, COORDBLIP_MARKER_COLOR_G, COORDBLIP_MARKER_COLOR_B, COORDBLIP_MARKER_COLOR_A, 2048, 0.2f, 0);
}
break;
}

View File

@ -1,6 +1,26 @@
#pragma once
#include "Sprite2d.h"
#define CARBLIP_MARKER_COLOR_R 252
#define CARBLIP_MARKER_COLOR_G 138
#define CARBLIP_MARKER_COLOR_B 242
#define CARBLIP_MARKER_COLOR_A 255
#define CHARBLIP_MARKER_COLOR_R 252
#define CHARBLIP_MARKER_COLOR_G 138
#define CHARBLIP_MARKER_COLOR_B 242
#define CHARBLIP_MARKER_COLOR_A 255
#define OBJECTBLIP_MARKER_COLOR_R 252
#define OBJECTBLIP_MARKER_COLOR_G 138
#define OBJECTBLIP_MARKER_COLOR_B 242
#define OBJECTBLIP_MARKER_COLOR_A 255
#define COORDBLIP_MARKER_COLOR_R 252
#define COORDBLIP_MARKER_COLOR_G 138
#define COORDBLIP_MARKER_COLOR_B 242
#define COORDBLIP_MARKER_COLOR_A 255
#define MENU_MAP_LENGTH_UNIT 1190.0f // in game unit
#define MENU_MAP_WIDTH_SCALE 1.112f // in game unit (originally 1.112494151260504f)
#define MENU_MAP_HEIGHT_SCALE 1.119f // in game unit (originally 1.118714268907563f)

View File

@ -204,6 +204,9 @@ enum Config {
#else
#define AUDIO_OAL
#endif
#ifdef DEBUGMENU
#define RELOADABLES // some debug menu options to reload TXD files
#endif
// Particle
//#define PC_PARTICLE

View File

@ -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

View File

@ -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);
@ -385,6 +385,13 @@ DebugMenuPopulate(void)
DebugMenuAddCmd("Debug", "Start Credits", CCredits::Start);
DebugMenuAddCmd("Debug", "Stop Credits", CCredits::Stop);
#ifdef RELOADABLES
DebugMenuAddCmd("Reload", "HUD.TXD", CHud::ReloadTXD);
DebugMenuAddCmd("Reload", "FONTS.TXD", NULL);
DebugMenuAddCmd("Reload", "FRONTEN1.TXD", NULL);
DebugMenuAddCmd("Reload", "FRONTEN2.TXD", NULL);
#endif
extern bool PrintDebugCode;
extern int16 DebugCamMode;
DebugMenuAddVarBool8("Cam", "Use mouse Cam", &CCamera::m_bUseMouse3rdPerson, nil);

View File

@ -590,7 +590,7 @@ CPhysical::ApplyCollision(CPhysical *B, CColPoint &colpoint, float &impulseA, fl
CGlass::WindowRespondsToCollision(B, impulseA, A->m_vecMoveSpeed, colpoint.point, false);
else if(!B->bInfiniteMass){
B->bIsStatic = false;
CWorld::Players[CWorld::PlayerInFocus].m_nHavocCaused += 2;
CWorld::Players[CWorld::PlayerInFocus].m_nHavocLevel += 2;
CStats::PropertyDestroyed += CGeneral::GetRandomNumberInRange(30, 60);
}
}else{

View File

@ -604,14 +604,25 @@ CPed::CPed(uint32 pedType) : m_pedIK(this)
bCarPassenger = false;
bMiamiViceCop = false;
bMoneyHasBeenGivenByScript = false;
bHasBeenPhotographed = false;
bIsDrowning = false;
bCanDrownInWater = true;
bDrownsInWater = true;
#ifdef VC_PED_PORTS
bHeadStuckInCollision = false;
#endif
bIsPlayerFriend = true;
bDeadPedInFrontOfCar = false;
bStayInCarOnJack = false;
bDontFight = false;
bDoomAim = true;
bCanBeShotInVehicle = true;
bIgnoreThreatsBehindObjects = false;
bNeverEverTargetThisPed = false;
bBoughtIceCream = false;
if ((CGeneral::GetRandomNumber() & 3) == 0)
bHasACamera = true;
@ -4117,7 +4128,7 @@ CPed::InflictDamage(CEntity *damagedBy, eWeaponType method, float damage, ePedPi
if (DyingOrDead())
return false;
if (method == WEAPONTYPE_DROWNING && !bCanDrownInWater)
if (method == WEAPONTYPE_DROWNING && !bDrownsInWater)
return false;
if (!bUsesCollision && (!bInVehicle || m_nPedState != PED_DRIVING) && method != WEAPONTYPE_DROWNING)

View File

@ -225,10 +225,10 @@ enum eObjective : uint32 {
OBJECTIVE_USE_STOP_ATTRACTOR,
OBJECTIVE_USE_PIZZA_ATTRACTOR,
OBJECTIVE_USE_SHELTER_ATTRACTOR,
OBJ_46,
OBJECTIVE_AIM_GUN_AT_PED,
OBJ_47,
OBJECTIVE_WAIT_FOR_RAIN_TO_END,
OBJ_49,
OBJECTIVE_SPRINT_TO_COORD,
OBJ_50,
OBJ_51,
OBJECTIVE_WAIT_FOR_BUS,
@ -442,10 +442,10 @@ public:
//uint32 b155_10
uint32 bMiamiViceCop : 1;
uint32 bMoneyHasBeenGivenByScript : 1; //
//uint32 b155_80
uint32 bHasBeenPhotographed : 1; //
uint32 bIsDrowning : 1;
uint32 bCanDrownInWater : 1; // Originally bDrownsInWater
uint32 bDrownsInWater : 1;
//uint32 b156_4
//uint32 b156_8
uint32 bIsPlayerFriend : 1;
@ -453,23 +453,23 @@ public:
uint32 bHeadStuckInCollision : 1;
#endif
uint32 bDeadPedInFrontOfCar : 1;
//uint32 b156_80
uint32 bStayInCarOnJack : 1;
//uint32 b157_1
//uint32 b157_2
//uint32 b157_4
uint32 bDontFight : 1;
uint32 bDoomAim : 1;
uint32 bCanBeShotInVehicle : 1;
//uint32 b157_8
//uint32 b157_10
//uint32 b157_20
//uint32 b157_40
//uint32 b157_80
uint32 bIgnoreThreatsBehindObjects : 1;
//uint32 b158_1
uint32 bNeverEverTargetThisPed : 1;
//uint32 b158_2
uint32 b158_4 : 1;
//uint32 b158_8
//uint32 b158_10
//uint32 b158_20
uint32 bBoughtIceCream : 1;
//uint32 b158_40
//uint32 b158_80

View File

@ -38,7 +38,7 @@ CRGBA COUNTER_COLOR(97, 194, 247, 255);
CRGBA PAGER_COLOR(32, 162, 66, 205);
CRGBA RADARDISC_COLOR(255, 255, 255, 255);
CRGBA BIGMESSAGE_COLOR(85, 119, 133, 255);
CRGBA WASTEDBUSTED_COLOR(170, 123, 87, 255);
CRGBA WASTEDBUSTED_COLOR(255, 150, 225, 255);
CRGBA ODDJOB_COLOR(89, 115, 150, 255);
CRGBA ODDJOB2_COLOR(156, 91, 40, 255);
CRGBA MISSIONTITLE_COLOR(220, 172, 2, 255);
@ -923,7 +923,17 @@ void CHud::Draw()
#else
rect.Translate(RADAR_LEFT, SCREEN_SCALE_FROM_BOTTOM(RADAR_BOTTOM + RADAR_HEIGHT));
#endif
rect.Grow(4.0f);
// shadow, might not be exactly accurate numbers
rect.Translate(0.f, 4.f);
rect.Grow(6.0f);
rect.top += 2.f;
rect.bottom -= 2.f;
Sprites[HUD_RADARDISC].Draw(rect, CRGBA(0, 0, 0, 255));
rect.Translate(0.f, -4.f);
rect.top -= 2.f;
rect.bottom += 2.f;
Sprites[HUD_RADARDISC].Draw(rect, RADARDISC_COLOR);
CRadar::DrawBlips();
}
@ -1480,6 +1490,30 @@ void CHud::GetRidOfAllHudMessages()
}
}
#ifdef RELOADABLES
void CHud::ReloadTXD()
{
for (int i = 0; i < NUM_HUD_SPRITES; ++i) {
Sprites[i].Delete();
}
int HudTXD = CTxdStore::FindTxdSlot("hud");
CTxdStore::RemoveTxdSlot(HudTXD);
debug("Reloading HUD.TXD...\n");
HudTXD = CTxdStore::AddTxdSlot("hud");
CTxdStore::LoadTxd(HudTXD, "MODELS/HUD.TXD");
CTxdStore::AddRef(HudTXD);
CTxdStore::PopCurrentTxd();
CTxdStore::SetCurrentTxd(HudTXD);
for (int i = 0; i < NUM_HUD_SPRITES; i++) {
Sprites[i].SetTexture(WeaponFilenames[i].name, WeaponFilenames[i].mask);
}
}
#endif
void CHud::Initialise()
{
m_Wants_To_Draw_Hud = true;

View File

@ -125,6 +125,9 @@ public:
static void Draw();
static void DrawAfterFade();
static void GetRidOfAllHudMessages();
#ifdef RELOADABLES
static void ReloadTXD();
#endif
static void Initialise();
static void ReInitialise();
static void SetBigMessage(wchar *message, int16 style);

View File

@ -1222,6 +1222,16 @@ MainWndProc(HWND window, UINT message, WPARAM wParam, LPARAM lParam)
break;
}
#ifdef FIX_BUGS // game turns on menu when focus is re-gained rather than lost
case WM_KILLFOCUS:
#else
case WM_SETFOCUS:
#endif
{
CGame::InitAfterFocusLoss();
break;
}
}
/*

View File

@ -57,7 +57,8 @@ void CCarGenerator::DoInternalProcessing()
mi = -m_nModelIndex;
if (m_nModelIndex == -1 || !CStreaming::HasModelLoaded(mi)) {
CZoneInfo pZone;
CTheZones::GetZoneInfoForTimeOfDay(&FindPlayerCoors(), &pZone);
CVector pos = FindPlayerCoors();
CTheZones::GetZoneInfoForTimeOfDay(&pos, &pZone);
mi = CCarCtrl::ChooseCarModel(CCarCtrl::ChooseCarRating(&pZone));
if (mi < 0)
return;

View File

@ -30,6 +30,7 @@ bool CVehicle::bAltDodoCheat;
#endif
bool CVehicle::m_bDisableMouseSteering = true;
bool CVehicle::bDisableRemoteDetonation;
bool CVehicle::bDisableRemoteDetonationOnContact;
void *CVehicle::operator new(size_t sz) { return CPools::GetVehiclePool()->New(); }
void *CVehicle::operator new(size_t sz, int handle) { return CPools::GetVehiclePool()->New(handle); }
@ -104,7 +105,9 @@ CVehicle::CVehicle(uint8 CreatedBy)
m_nCarHornPattern = 0;
m_nCarHornDelay = 0;
bPartOfConvoy = false;
bHeliMinimumTilt = false;
bIsDrowning = false;
bTyresDontBurst = false;
bCreatedAsPoliceVehicle = false;
bParking = false;
m_nAlarmState = 0;

View File

@ -183,11 +183,11 @@ public:
uint8 bIsCarParkVehicle : 1; // Car has been created using the special CAR_PARK script command
uint8 bHasAlreadyBeenRecorded : 1; // Used for replays
uint8 bPartOfConvoy : 1;
//uint8 bHeliMinimumTilt : 1; // This heli should have almost no tilt really
uint8 bHeliMinimumTilt : 1; // This heli should have almost no tilt really
//uint8 bAudioChangingGear : 1; // sounds like vehicle is changing gear
uint8 bIsDrowning : 1; // is vehicle occupants taking damage in water (i.e. vehicle is dead in water)
//uint8 bTyresDontBurst : 1; // If this is set the tyres are invincible
uint8 bTyresDontBurst : 1; // If this is set the tyres are invincible
uint8 bCreatedAsPoliceVehicle : 1;// True if this guy was created as a police vehicle (enforcer, policecar, miamivice car etc)
uint8 bRestingOnPhysical : 1; // Dont go static cause car is sitting on a physical object that might get removed
uint8 bParking : 1;
@ -318,6 +318,7 @@ public:
#endif
static bool m_bDisableMouseSteering;
static bool bDisableRemoteDetonation;
static bool bDisableRemoteDetonationOnContact;
};
void DestroyVehicleAndDriverAndPassengers(CVehicle* pVehicle);