mirror of
https://gitlab.com/GaryOderNichts/re3-wiiu.git
synced 2024-11-23 17:49:16 +01:00
Merge pull request #731 from erorcun/miami
Population done, mouse AUX buttons, Frontend, Hud, fixes
This commit is contained in:
commit
72f342245d
@ -1258,7 +1258,7 @@ cMusicManager::DisplayRadioStationName()
|
||||
CFont::SetPropOn();
|
||||
CFont::SetFontStyle(FONT_STANDARD);
|
||||
CFont::SetCentreOn();
|
||||
CFont::SetCentreSize(SCREEN_SCALE_X(640.0f));
|
||||
CFont::SetCentreSize(SCREEN_STRETCH_X(DEFAULT_SCREEN_WIDTH));
|
||||
CFont::SetColor(CRGBA(0, 0, 0, 255));
|
||||
CFont::PrintString(SCREEN_WIDTH / 2 + SCREEN_SCALE_X(2.0f), SCREEN_SCALE_Y(22.0f) + SCREEN_SCALE_Y(2.0f), pCurrentStation);
|
||||
|
||||
|
@ -380,7 +380,7 @@ CGameLogic::RestorePlayerStuffDuringResurrection(CPlayerPed *pPlayerPed, CVector
|
||||
CStats::CheckPointReachedUnsuccessfully();
|
||||
CWorld::Remove(pPlayerPed);
|
||||
CWorld::Add(pPlayerPed);
|
||||
//CHud::ResetWastedText() // TODO(MIAMI)
|
||||
CHud::ResetWastedText();
|
||||
CStreaming::StreamZoneModels(pos);
|
||||
clearWaterDrop = true;
|
||||
}
|
||||
|
@ -1872,8 +1872,8 @@ CPathFind::TakeWidthIntoAccountForWandering(CPathNode* nextNode, uint16 random)
|
||||
void
|
||||
CPathFind::TakeWidthIntoAccountForCoors(CPathNode* node1, CPathNode* node2, uint16 random, float* x, float* y)
|
||||
{
|
||||
*x += (Min(node1->width, node2->width) * ((random % 16) - 7));
|
||||
*y += (Min(node1->width, node2->width) * (((random / 16) % 16) - 7));
|
||||
*x += (Min(node1->width, node2->width) * WIDTH_TO_PED_NODE_WIDTH * ((random % 16) - 7));
|
||||
*y += (Min(node1->width, node2->width) * WIDTH_TO_PED_NODE_WIDTH * (((random / 16) % 16) - 7));
|
||||
}
|
||||
|
||||
CPathNode*
|
||||
|
@ -6,6 +6,7 @@ class CVehicle;
|
||||
class CPtrList;
|
||||
|
||||
#define LANE_WIDTH 5.0f
|
||||
#define WIDTH_TO_PED_NODE_WIDTH (31.f/(500.f * 8.f))
|
||||
|
||||
enum
|
||||
{
|
||||
@ -89,7 +90,7 @@ struct CPathNode
|
||||
float GetZ(void) { return z/8.0f; }
|
||||
bool HasDivider(void) { return width != 0; }
|
||||
float GetDividerWidth(void) { return width/(2*8.0f); }
|
||||
float GetPedNodeWidth(void) { return width*(31.f/(500.f * 8.f)); }
|
||||
float GetPedNodeWidth(void) { return width*WIDTH_TO_PED_NODE_WIDTH; }
|
||||
CPathNode *GetPrev(void);
|
||||
CPathNode *GetNext(void);
|
||||
void SetPrev(CPathNode *node);
|
||||
|
@ -17,6 +17,8 @@
|
||||
#include "Replay.h"
|
||||
#endif
|
||||
|
||||
// --MIAMI: file done
|
||||
|
||||
CPhoneInfo gPhoneInfo;
|
||||
|
||||
bool CPhoneInfo::bDisplayingPhoneMessage; // is phone picked up
|
||||
|
@ -21,6 +21,8 @@
|
||||
#include "Camera.h"
|
||||
#include "GenericGameStorage.h"
|
||||
|
||||
// --MIAMI: file done
|
||||
|
||||
CControllerConfigManager ControlsManager;
|
||||
|
||||
CControllerConfigManager::CControllerConfigManager()
|
||||
@ -314,6 +316,10 @@ void CControllerConfigManager::InitDefaultControlConfigMouse(CMouseControllerSta
|
||||
SetMouseButtonAssociatedWithAction(PED_CYCLE_WEAPON_RIGHT, 5);
|
||||
|
||||
SetMouseButtonAssociatedWithAction(VEHICLE_CHANGE_RADIO_STATION, 4);
|
||||
|
||||
SetMouseButtonAssociatedWithAction(PED_SNIPER_ZOOM_IN, 4);
|
||||
|
||||
SetMouseButtonAssociatedWithAction(PED_SNIPER_ZOOM_OUT, 5);
|
||||
}
|
||||
}
|
||||
|
||||
@ -516,11 +522,12 @@ void CControllerConfigManager::UpdateJoyInConfigMenus_ButtonDown(int32 button, i
|
||||
case 13:
|
||||
pad->PCTempJoyState.DPadUp = 255;
|
||||
break;
|
||||
#ifdef REGISTER_START_BUTTON
|
||||
case 12:
|
||||
pad->PCTempJoyState.Start = 255;
|
||||
break;
|
||||
#ifndef REGISTER_START_BUTTON
|
||||
if (padNumber == 1)
|
||||
#endif
|
||||
pad->PCTempJoyState.Start = 255;
|
||||
break;
|
||||
case 11:
|
||||
pad->PCTempJoyState.RightShock = 255;
|
||||
break;
|
||||
@ -624,6 +631,7 @@ void CControllerConfigManager::AffectControllerStateOn_ButtonDown(int32 button,
|
||||
if ( mode == CCam::MODE_1STPERSON
|
||||
|| mode == CCam::MODE_SNIPER
|
||||
|| mode == CCam::MODE_ROCKETLAUNCHER
|
||||
|| mode == CCam::MODE_CAMERA
|
||||
|| mode == CCam::MODE_M16_1STPERSON)
|
||||
{
|
||||
firstPerson = true;
|
||||
@ -1642,12 +1650,12 @@ void CControllerConfigManager::DeleteMatchingCommonControls(e_ControllerAction a
|
||||
{
|
||||
if (!GetIsKeyBlank(key, type))
|
||||
{
|
||||
CLEAR_ACTION_IF_NEEDED(CAMERA_CHANGE_VIEW_ALL_SITUATIONS);
|
||||
#ifndef BIND_VEHICLE_FIREWEAPON
|
||||
CLEAR_ACTION_IF_NEEDED(PED_FIREWEAPON);
|
||||
#endif
|
||||
CLEAR_ACTION_IF_NEEDED(GO_LEFT);
|
||||
CLEAR_ACTION_IF_NEEDED(GO_RIGHT);
|
||||
CLEAR_ACTION_IF_NEEDED(CAMERA_CHANGE_VIEW_ALL_SITUATIONS);
|
||||
CLEAR_ACTION_IF_NEEDED(NETWORK_TALK);
|
||||
CLEAR_ACTION_IF_NEEDED(SWITCH_DEBUG_CAM_ON);
|
||||
CLEAR_ACTION_IF_NEEDED(TOGGLE_DPAD);
|
||||
@ -1660,15 +1668,13 @@ void CControllerConfigManager::DeleteMatching3rdPersonControls(e_ControllerActio
|
||||
{
|
||||
if (!GetIsKeyBlank(key, type))
|
||||
{
|
||||
CLEAR_ACTION_IF_NEEDED(PED_LOOKBEHIND);
|
||||
CLEAR_ACTION_IF_NEEDED(PED_CYCLE_WEAPON_LEFT);
|
||||
CLEAR_ACTION_IF_NEEDED(PED_CYCLE_WEAPON_RIGHT);
|
||||
CLEAR_ACTION_IF_NEEDED(PED_JUMPING);
|
||||
CLEAR_ACTION_IF_NEEDED(PED_SPRINT);
|
||||
if (key == GetControllerKeyAssociatedWithAction(PED_DUCK, type))
|
||||
ClearSettingsAssociatedWithAction(PED_DUCK, type);
|
||||
if (key == GetControllerKeyAssociatedWithAction(PED_ANSWER_PHONE, type))
|
||||
ClearSettingsAssociatedWithAction(PED_ANSWER_PHONE, type);
|
||||
CLEAR_ACTION_IF_NEEDED(PED_LOOKBEHIND);
|
||||
CLEAR_ACTION_IF_NEEDED(PED_DUCK);
|
||||
CLEAR_ACTION_IF_NEEDED(PED_ANSWER_PHONE);
|
||||
|
||||
if (FrontEndMenuManager.m_ControlMethod == CONTROL_CLASSIC)
|
||||
{
|
||||
@ -1707,16 +1713,15 @@ void CControllerConfigManager::DeleteMatchingVehicleControls(e_ControllerAction
|
||||
#ifdef BIND_VEHICLE_FIREWEAPON
|
||||
CLEAR_ACTION_IF_NEEDED(VEHICLE_FIREWEAPON);
|
||||
#endif
|
||||
CLEAR_ACTION_IF_NEEDED(VEHICLE_LOOKBEHIND);
|
||||
CLEAR_ACTION_IF_NEEDED(VEHICLE_LOOKLEFT);
|
||||
CLEAR_ACTION_IF_NEEDED(VEHICLE_LOOKRIGHT);
|
||||
CLEAR_ACTION_IF_NEEDED(VEHICLE_LOOKBEHIND); // note: duplicate
|
||||
CLEAR_ACTION_IF_NEEDED(VEHICLE_HORN);
|
||||
CLEAR_ACTION_IF_NEEDED(VEHICLE_HANDBRAKE);
|
||||
CLEAR_ACTION_IF_NEEDED(VEHICLE_ACCELERATE);
|
||||
CLEAR_ACTION_IF_NEEDED(VEHICLE_BRAKE);
|
||||
CLEAR_ACTION_IF_NEEDED(VEHICLE_CHANGE_RADIO_STATION);
|
||||
CLEAR_ACTION_IF_NEEDED(VEHICLE_HORN);
|
||||
CLEAR_ACTION_IF_NEEDED(TOGGLE_SUBMISSIONS);
|
||||
CLEAR_ACTION_IF_NEEDED(VEHICLE_HANDBRAKE);
|
||||
CLEAR_ACTION_IF_NEEDED(VEHICLE_LOOKLEFT);
|
||||
CLEAR_ACTION_IF_NEEDED(VEHICLE_LOOKRIGHT);
|
||||
CLEAR_ACTION_IF_NEEDED(VEHICLE_LOOKBEHIND);
|
||||
CLEAR_ACTION_IF_NEEDED(VEHICLE_TURRETLEFT);
|
||||
CLEAR_ACTION_IF_NEEDED(VEHICLE_TURRETRIGHT);
|
||||
CLEAR_ACTION_IF_NEEDED(VEHICLE_TURRETUP);
|
||||
@ -1755,36 +1760,36 @@ void CControllerConfigManager::DeleteMatchingActionInitiators(e_ControllerAction
|
||||
DeleteMatching1rst3rdPersonControls (action, key, type);
|
||||
break;
|
||||
case ACTIONTYPE_3RDPERSON:
|
||||
DeleteMatching3rdPersonControls (action, key, type);
|
||||
DeleteMatchingCommonControls (action, key, type);
|
||||
DeleteMatchingVehicle_3rdPersonControls(action, key, type);
|
||||
DeleteMatching1rst3rdPersonControls (action, key, type);
|
||||
DeleteMatching3rdPersonControls (action, key, type);
|
||||
DeleteMatchingVehicle_3rdPersonControls(action, key, type);
|
||||
break;
|
||||
case ACTIONTYPE_VEHICLE:
|
||||
DeleteMatchingVehicleControls (action, key, type);
|
||||
DeleteMatchingCommonControls (action, key, type);
|
||||
DeleteMatchingVehicleControls (action, key, type);
|
||||
DeleteMatchingVehicle_3rdPersonControls(action, key, type);
|
||||
break;
|
||||
case ACTIONTYPE_VEHICLE_3RDPERSON:
|
||||
DeleteMatchingCommonControls (action, key, type);
|
||||
DeleteMatching1rst3rdPersonControls (action, key, type);
|
||||
DeleteMatching3rdPersonControls (action, key, type);
|
||||
DeleteMatchingVehicleControls (action, key, type);
|
||||
DeleteMatchingCommonControls (action, key, type);
|
||||
DeleteMatching1rst3rdPersonControls (action, key, type);
|
||||
break;
|
||||
case ACTIONTYPE_1RST3RDPERSON:
|
||||
DeleteMatching1rstPersonControls (action, key, type);
|
||||
DeleteMatching3rdPersonControls (action, key, type);
|
||||
DeleteMatchingCommonControls (action, key, type);
|
||||
DeleteMatchingVehicle_3rdPersonControls(action, key, type);
|
||||
DeleteMatching1rst3rdPersonControls (action, key, type);
|
||||
break;
|
||||
case ACTIONTYPE_COMMON:
|
||||
DeleteMatchingCommonControls (action, key, type);
|
||||
DeleteMatching1rstPersonControls (action, key, type);
|
||||
DeleteMatching1rst3rdPersonControls (action, key, type);
|
||||
DeleteMatching3rdPersonControls (action, key, type);
|
||||
DeleteMatchingVehicleControls (action, key, type);
|
||||
DeleteMatchingVehicle_3rdPersonControls(action, key, type);
|
||||
break;
|
||||
case ACTIONTYPE_1RST3RDPERSON:
|
||||
DeleteMatchingCommonControls (action, key, type);
|
||||
DeleteMatching1rstPersonControls (action, key, type);
|
||||
DeleteMatching1rst3rdPersonControls (action, key, type);
|
||||
DeleteMatching3rdPersonControls (action, key, type);
|
||||
DeleteMatchingVehicle_3rdPersonControls(action, key, type);
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
@ -1850,15 +1855,15 @@ e_ControllerActionType CControllerConfigManager::GetActionType(e_ControllerActio
|
||||
#ifdef BIND_VEHICLE_FIREWEAPON
|
||||
case VEHICLE_FIREWEAPON:
|
||||
#endif
|
||||
case VEHICLE_LOOKBEHIND:
|
||||
case VEHICLE_LOOKLEFT:
|
||||
case VEHICLE_LOOKRIGHT:
|
||||
case VEHICLE_HORN:
|
||||
case VEHICLE_HANDBRAKE:
|
||||
case VEHICLE_ACCELERATE:
|
||||
case VEHICLE_BRAKE:
|
||||
case VEHICLE_CHANGE_RADIO_STATION:
|
||||
case VEHICLE_HORN:
|
||||
case TOGGLE_SUBMISSIONS:
|
||||
case VEHICLE_HANDBRAKE:
|
||||
case VEHICLE_LOOKLEFT:
|
||||
case VEHICLE_LOOKRIGHT:
|
||||
case VEHICLE_LOOKBEHIND:
|
||||
case VEHICLE_TURRETLEFT:
|
||||
case VEHICLE_TURRETRIGHT:
|
||||
case VEHICLE_TURRETUP:
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -5,15 +5,9 @@
|
||||
|
||||
#include "Sprite2d.h"
|
||||
|
||||
#ifdef PS2_LIKE_MENU
|
||||
#define MENUHEADER_POS_X 50.0f
|
||||
#define MENUHEADER_POS_Y 75.0f
|
||||
#define MENUHEADER_HEIGHT 1.3f
|
||||
#else
|
||||
#define MENUHEADER_POS_X 10.0f
|
||||
#define MENUHEADER_POS_Y 10.0f
|
||||
#define MENUHEADER_HEIGHT 2.0f
|
||||
#endif
|
||||
#define MENUHEADER_WIDTH 1.0f
|
||||
|
||||
#define MENU_UNK_X_MARGIN 10.0f
|
||||
@ -237,9 +231,6 @@ enum eMenuAction
|
||||
MENUACTION_SETDBGFLAG,
|
||||
MENUACTION_LOADRADIO,
|
||||
MENUACTION_SAVEGAME,
|
||||
|
||||
// Below this is TODO(Miami)
|
||||
MENUACTION_DRAWDIST,
|
||||
MENUACTION_SWITCHBIGWHITEDEBUGLIGHT,
|
||||
MENUACTION_COLLISIONPOLYS,
|
||||
MENUACTION_LEGENDS,
|
||||
@ -247,16 +238,11 @@ enum eMenuAction
|
||||
MENUACTION_HUD,
|
||||
MENUACTION_GOBACK,
|
||||
MENUACTION_KEYBOARDCTRLS,
|
||||
MENUACTION_PARSEHEAP,
|
||||
// MENUACTION_MEMCARDSAVECONFIRM is that on VC enum??
|
||||
MENUACTION_DEBUGSTREAM,
|
||||
MENUACTION_GETKEY,
|
||||
MENUACTION_SHOWHEADBOB,
|
||||
MENUACTION_UNK80,
|
||||
MENUACTION_UNK38, // MENUACTION_PARSEHEAP? MENUACTION_DEBUGSTREAM? MENUACTION_MEMCARDSAVECONFIRM?
|
||||
MENUACTION_INVVERT,
|
||||
MENUACTION_CANCELGAME,
|
||||
MENUACTION_MOUSESENS,
|
||||
MENUACTION_MP3VOLUMEBOOST,
|
||||
MENUACTION_RESUME,
|
||||
MENUACTION_DONTCANCEL,
|
||||
MENUACTION_SCREENRES,
|
||||
@ -267,7 +253,9 @@ enum eMenuAction
|
||||
MENUACTION_CTRLMETHOD,
|
||||
MENUACTION_DYNAMICACOUSTIC,
|
||||
MENUACTION_MOUSESTEER,
|
||||
MENUACTION_UNK110,
|
||||
MENUACTION_DRAWDIST,
|
||||
MENUACTION_MOUSESENS,
|
||||
MENUACTION_MP3VOLUMEBOOST,
|
||||
#ifdef IMPROVED_VIDEOMODE
|
||||
MENUACTION_SCREENFORMAT,
|
||||
#endif
|
||||
@ -532,7 +520,7 @@ public:
|
||||
CSprite2d m_aFrontEndSprites[NUM_MENU_SPRITES];
|
||||
bool m_bSpritesLoaded;
|
||||
int32 field_F0;
|
||||
int32 m_LastRadioScrollDir;
|
||||
int32 m_ScrollRadioBy;
|
||||
int32 m_nCurrScreen;
|
||||
int32 m_nPrevScreen;
|
||||
int32 m_nCurrSaveSlot;
|
||||
@ -678,7 +666,8 @@ public:
|
||||
void Process();
|
||||
void ProcessList(bool &optionSelected, bool &goBack);
|
||||
void UserInput();
|
||||
void ProcessButtonPresses(uint8, uint8, uint8, uint8, int8);
|
||||
void ProcessUserInput(uint8, uint8, uint8, uint8, int8);
|
||||
void ChangeRadioStation(uint8);
|
||||
void ProcessFileActions();
|
||||
void ProcessOnOffMenuOptions();
|
||||
void RequestFrontEndShutDown();
|
||||
|
@ -203,6 +203,9 @@ static const char* FrontendFilenames[][2] =
|
||||
{"fe_radio9", "" },
|
||||
};
|
||||
|
||||
#ifdef CUTSCENE_BORDERS_SWITCH
|
||||
bool CMenuManager::m_PrefsCutsceneBorders = true;
|
||||
#endif
|
||||
|
||||
int32 CMenuManager::m_PrefsSfxVolume = 102;
|
||||
int32 CMenuManager::m_PrefsMusicVolume = 102;
|
||||
|
@ -161,6 +161,9 @@ public:
|
||||
static CONTRCONFIG m_PrefsControllerConfig;
|
||||
static bool m_PrefsUseVibration;
|
||||
|
||||
#ifdef CUTSCENE_BORDERS_SWITCH
|
||||
static bool m_PrefsCutsceneBorders;
|
||||
#endif
|
||||
|
||||
#ifdef GTA_PC
|
||||
bool m_bQuitGameNoCD;
|
||||
|
@ -7,8 +7,10 @@
|
||||
#include "main.h"
|
||||
#include "Population.h"
|
||||
|
||||
float CIniFile::PedNumberMultiplier = 1.0f;
|
||||
float CIniFile::CarNumberMultiplier = 1.0f;
|
||||
// --MIAMI: file done
|
||||
|
||||
float CIniFile::PedNumberMultiplier = 0.6f;
|
||||
float CIniFile::CarNumberMultiplier = 0.6f;
|
||||
|
||||
void CIniFile::LoadIniFile()
|
||||
{
|
||||
@ -24,5 +26,6 @@ void CIniFile::LoadIniFile()
|
||||
CFileMgr::CloseFile(f);
|
||||
}
|
||||
CPopulation::MaxNumberOfPedsInUse = 25.0f * PedNumberMultiplier;
|
||||
CPopulation::MaxNumberOfPedsInUseInterior = 40.0f * PedNumberMultiplier;
|
||||
CCarCtrl::MaxNumberOfCarsInUse = 12.0f * CarNumberMultiplier;
|
||||
}
|
@ -331,8 +331,6 @@ CMenuScreen aScreens[] = {
|
||||
MENUACTION_SETDBGFLAG, "FED_DFL", SAVESLOT_NONE, MENUPAGE_NONE, 0, 0, 0,
|
||||
MENUACTION_SWITCHBIGWHITEDEBUGLIGHT, "FED_DLS", SAVESLOT_NONE, MENUPAGE_NONE, 0, 0, 0,
|
||||
MENUACTION_COLLISIONPOLYS, "FED_SCP", SAVESLOT_NONE, MENUPAGE_NONE, 0, 0, 0,
|
||||
MENUACTION_PARSEHEAP, "FED_PAH", SAVESLOT_NONE, MENUPAGE_NONE, 0, 0, 0,
|
||||
MENUACTION_DEBUGSTREAM, "FED_DSR", SAVESLOT_NONE, MENUPAGE_NONE, 0, 0, 0,
|
||||
MENUACTION_GOBACK, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE, 0, 0, 0,
|
||||
},
|
||||
|
||||
|
@ -144,8 +144,11 @@ inline uint32 ldb(uint32 p, uint32 s, uint32 w)
|
||||
|
||||
#ifdef ASPECT_RATIO_SCALE
|
||||
#define SCREEN_SCALE_AR(a) ((a) * DEFAULT_ASPECT_RATIO / SCREEN_ASPECT_RATIO)
|
||||
extern float ScaleAndCenterX(float x);
|
||||
#define SCALE_AND_CENTER_X(x) ScaleAndCenterX(x)
|
||||
#else
|
||||
#define SCREEN_SCALE_AR(a) (a)
|
||||
#define SCALE_AND_CENTER_X(x) SCREEN_STRETCH_X(x)
|
||||
#endif
|
||||
|
||||
#include "maths.h"
|
||||
|
@ -89,7 +89,7 @@ void tbDisplay()
|
||||
CFont::SetScale(0.48f, 1.12f);
|
||||
CFont::SetCentreOff();
|
||||
CFont::SetJustifyOff();
|
||||
CFont::SetWrapx(640.0f);
|
||||
CFont::SetWrapx(SCREEN_STRETCH_X(DEFAULT_SCREEN_WIDTH));
|
||||
CFont::SetRightJustifyOff();
|
||||
CFont::SetPropOn();
|
||||
CFont::SetFontStyle(FONT_STANDARD);
|
||||
|
@ -5,6 +5,8 @@
|
||||
#include "ModelIndices.h"
|
||||
#include "ModelInfo.h"
|
||||
|
||||
// --MIAMI: file done
|
||||
|
||||
CBaseModelInfo *CModelInfo::ms_modelInfoPtrs[MODELINFOSIZE];
|
||||
|
||||
CStore<CSimpleModelInfo, SIMPLEMODELSIZE> CModelInfo::ms_simpleModelStore;
|
||||
@ -21,6 +23,14 @@ CModelInfo::Initialise(void)
|
||||
int i;
|
||||
CSimpleModelInfo *m;
|
||||
|
||||
debug("sizeof SimpleModelStore %d\n", sizeof(ms_simpleModelStore));
|
||||
debug("sizeof TimeModelStore %d\n", sizeof(ms_timeModelStore));
|
||||
debug("sizeof WeaponModelStore %d\n", sizeof(ms_weaponModelStore));
|
||||
debug("sizeof ClumpModelStore %d\n", sizeof(ms_clumpModelStore));
|
||||
debug("sizeof VehicleModelStore %d\n", sizeof(ms_vehicleModelStore));
|
||||
debug("sizeof PedModelStore %d\n", sizeof(ms_pedModelStore));
|
||||
debug("sizeof 2deffectsModelStore %d\n", sizeof(ms_2dEffectStore));
|
||||
|
||||
for(i = 0; i < MODELINFOSIZE; i++)
|
||||
ms_modelInfoPtrs[i] = nil;
|
||||
ms_2dEffectStore.clear();
|
||||
@ -191,6 +201,9 @@ CModelInfo::GetModelInfo(const char *name, int *id)
|
||||
CBaseModelInfo*
|
||||
CModelInfo::GetModelInfo(const char *name, int minIndex, int maxIndex)
|
||||
{
|
||||
if (minIndex > maxIndex)
|
||||
return 0;
|
||||
|
||||
CBaseModelInfo *modelinfo;
|
||||
for(int i = minIndex; i <= maxIndex; i++){
|
||||
modelinfo = CModelInfo::ms_modelInfoPtrs[i];
|
||||
@ -221,6 +234,20 @@ CModelInfo::IsCarModel(int32 id)
|
||||
((CVehicleModelInfo*)GetModelInfo(id))->m_vehicleType == VEHICLE_TYPE_CAR;
|
||||
}
|
||||
|
||||
bool
|
||||
CModelInfo::IsHeliModel(int32 id)
|
||||
{
|
||||
return GetModelInfo(id)->GetModelType() == MITYPE_VEHICLE &&
|
||||
((CVehicleModelInfo*)GetModelInfo(id))->m_vehicleType == VEHICLE_TYPE_HELI;
|
||||
}
|
||||
|
||||
bool
|
||||
CModelInfo::IsPlaneModel(int32 id)
|
||||
{
|
||||
return GetModelInfo(id)->GetModelType() == MITYPE_VEHICLE &&
|
||||
((CVehicleModelInfo*)GetModelInfo(id))->m_vehicleType == VEHICLE_TYPE_PLANE;
|
||||
}
|
||||
|
||||
void
|
||||
CModelInfo::ReInit2dEffects()
|
||||
{
|
||||
|
@ -43,5 +43,7 @@ public:
|
||||
static bool IsBoatModel(int32 id);
|
||||
static bool IsBikeModel(int32 id);
|
||||
static bool IsCarModel(int32 id);
|
||||
static bool IsHeliModel(int32 id);
|
||||
static bool IsPlaneModel(int32 id);
|
||||
static void ReInit2dEffects();
|
||||
};
|
||||
|
@ -117,7 +117,7 @@ CCivilianPed::CivilianAI(void)
|
||||
} else {
|
||||
SetMoveState(PEDMOVE_WALK);
|
||||
}
|
||||
} else if (threatPed->IsPlayer() && IsGangMember() && b158_80) {
|
||||
} else if (threatPed->IsPlayer() && IsGangMember() && bCanAttackPlayerWithCops) {
|
||||
SetObjective(OBJECTIVE_KILL_CHAR_ON_FOOT, m_threatEntity);
|
||||
|
||||
} else if (threatPed->IsPlayer() && FindPlayerPed()->m_pWanted->m_CurrentCops != 0) {
|
||||
@ -203,7 +203,7 @@ CCivilianPed::CivilianAI(void)
|
||||
CPed *threatPed = (CPed*)m_threatEntity;
|
||||
if (m_pedStats->m_fear <= 100 - threatPed->m_pedStats->m_temper && threatPed->m_nPedType != PEDTYPE_COP) {
|
||||
if (threatPed->GetWeapon()->IsTypeMelee() || !GetWeapon()->IsTypeMelee()) {
|
||||
if (threatPed->IsPlayer() && IsGangMember() && b158_80) {
|
||||
if (threatPed->IsPlayer() && IsGangMember() && bCanAttackPlayerWithCops) {
|
||||
SetObjective(OBJECTIVE_KILL_CHAR_ON_FOOT, m_threatEntity);
|
||||
|
||||
} else if (threatPed->IsPlayer() && FindPlayerPed()->m_pWanted->m_CurrentCops != 0) {
|
||||
|
@ -6,6 +6,8 @@
|
||||
#include "Streaming.h"
|
||||
#include "Weapon.h"
|
||||
|
||||
// --MIAMI: file done
|
||||
|
||||
CGangInfo CGangs::Gang[NUM_GANGS];
|
||||
bool CGangs::GangAttackWithCops[NUM_GANGS];
|
||||
|
||||
|
@ -459,7 +459,7 @@ CPed::CPed(uint32 pedType) : m_pedIK(this)
|
||||
bCollectBusFare = false;
|
||||
bBoughtIceCream = false;
|
||||
bDonePositionOutOfCollision = false;
|
||||
b158_80 = false;
|
||||
bCanAttackPlayerWithCops = false;
|
||||
|
||||
if (CGeneral::GetRandomNumber() & 3)
|
||||
bHasACamera = false;
|
||||
|
@ -491,7 +491,7 @@ public:
|
||||
uint32 bCollectBusFare : 1;
|
||||
uint32 bBoughtIceCream : 1;
|
||||
uint32 bDonePositionOutOfCollision : 1;
|
||||
uint32 b158_80 : 1;
|
||||
uint32 bCanAttackPlayerWithCops : 1;
|
||||
|
||||
// our own flags
|
||||
uint32 m_ped_flagI80 : 1; // KANGAROO_CHEAT define makes use of this as cheat toggle
|
||||
|
@ -4,7 +4,8 @@
|
||||
#include "General.h"
|
||||
#include "Ped.h"
|
||||
|
||||
// --MIAMI: Done
|
||||
// --MIAMI: file done
|
||||
|
||||
// Corresponds to ped sounds (from SOUND_PED_DEATH to SOUND_PED_TAXI_CALL)
|
||||
PedAudioData CommentWaitTime[56] = {
|
||||
{ 500, 800, 500, 2 },
|
||||
@ -65,14 +66,12 @@ PedAudioData CommentWaitTime[56] = {
|
||||
{ 0, 0, 0, 0 }
|
||||
};
|
||||
|
||||
// --MIAMI: Done
|
||||
bool
|
||||
CPed::ServiceTalkingWhenDead(void)
|
||||
{
|
||||
return m_queuedSound == SOUND_PED_DEATH;
|
||||
}
|
||||
|
||||
// --MIAMI: Done
|
||||
void
|
||||
CPed::ServiceTalking(void)
|
||||
{
|
||||
@ -102,7 +101,6 @@ CPed::ServiceTalking(void)
|
||||
}
|
||||
}
|
||||
|
||||
// --MIAMI: Done
|
||||
void
|
||||
CPed::Say(uint16 audio)
|
||||
{
|
||||
@ -157,7 +155,6 @@ CPed::Say(uint16 audio)
|
||||
}
|
||||
}
|
||||
|
||||
// --MIAMI: Done
|
||||
void
|
||||
CPed::Say(uint16 audio, int32 time)
|
||||
{
|
||||
|
@ -3,6 +3,8 @@
|
||||
#include "FileMgr.h"
|
||||
#include "PedType.h"
|
||||
|
||||
// --MIAMI: file done
|
||||
|
||||
CPedType *CPedType::ms_apPedType[NUM_PEDTYPES];
|
||||
|
||||
void
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -13,23 +13,6 @@ struct PedGroup
|
||||
int32 models[NUMMODELSPERPEDGROUP];
|
||||
};
|
||||
|
||||
// Don't know the original name
|
||||
struct RegenerationPoint
|
||||
{
|
||||
eLevelName srcLevel; // this and below one may need to be exchanged
|
||||
eLevelName destLevel;
|
||||
float x1;
|
||||
float x2;
|
||||
float y1;
|
||||
float y2;
|
||||
float z1;
|
||||
float z2;
|
||||
CVector destPosA;
|
||||
CVector destPosB;
|
||||
CVector srcPosA;
|
||||
CVector srcPosB;
|
||||
};
|
||||
|
||||
class CPopulation
|
||||
{
|
||||
public:
|
||||
@ -39,6 +22,7 @@ public:
|
||||
static float PedDensityMultiplier;
|
||||
static uint32 ms_nTotalMissionPeds;
|
||||
static int32 MaxNumberOfPedsInUse;
|
||||
static int32 MaxNumberOfPedsInUseInterior;
|
||||
static uint32 ms_nNumCivMale;
|
||||
static uint32 ms_nNumCivFemale;
|
||||
static uint32 ms_nNumCop;
|
||||
@ -58,9 +42,6 @@ public:
|
||||
static uint32 ms_nNumGang9;
|
||||
static uint32 ms_nNumGang7;
|
||||
static uint32 ms_nNumGang8;
|
||||
static CVector RegenerationPoint_a;
|
||||
static CVector RegenerationPoint_b;
|
||||
static CVector RegenerationForward;
|
||||
|
||||
static uint32 ms_nTotalCarPassengerPeds;
|
||||
static uint32 NumMiamiViceCops;
|
||||
@ -71,13 +52,12 @@ public:
|
||||
static void UpdatePedCount(ePedType, bool);
|
||||
static void DealWithZoneChange(eLevelName oldLevel, eLevelName newLevel, bool);
|
||||
static CPed *AddPedInCar(CVehicle *car, bool isDriver);
|
||||
static bool IsPointInSafeZone(CVector *coors);
|
||||
static void RemovePed(CPed *ent);
|
||||
static int32 ChooseCivilianOccupation(int32);
|
||||
static int32 ChooseNextCivilianOccupation(int32);
|
||||
static void ChooseCivilianCoupleOccupations(int32, int32&, int32&);
|
||||
static int32 ChoosePolicePedOccupation();
|
||||
static int32 ChooseGangOccupation(int);
|
||||
static void FindCollisionZoneForCoors(CVector*, int*, eLevelName*);
|
||||
static void FindClosestZoneForCoors(CVector*, int*, eLevelName, eLevelName);
|
||||
static void GeneratePedsAtStartOfGame();
|
||||
static float PedCreationDistMultiplier();
|
||||
static CPed *AddPed(ePedType pedType, uint32 mi, CVector const &coors, int32 modifier = 0);
|
||||
@ -91,6 +71,18 @@ public:
|
||||
static bool TestSafeForRealObject(CDummyObject*);
|
||||
static bool IsSkateable(CVector const&);
|
||||
static bool CanJeerAtStripper(int32 model);
|
||||
|
||||
static void RemovePedsIfThePoolGetsFull(void);
|
||||
static bool IsMale(int32);
|
||||
static bool IsFemale(int32);
|
||||
static bool IsSunbather(int32);
|
||||
static int32 ComputeRandomisedGangSize(void);
|
||||
static bool CanSolicitPlayerInCar(int32);
|
||||
static bool CanSolicitPlayerOnFoot(int32);
|
||||
static bool IsSecurityGuard(ePedType);
|
||||
static void PlaceGangMembers(ePedType, int32, CVector const&);
|
||||
static void PlaceGangMembersInFormation(ePedType, int32, CVector const&);
|
||||
static void PlaceGangMembersInCircle(ePedType, int32, CVector const&);
|
||||
static void PlaceCouple(ePedType, int32, ePedType, int32, CVector);
|
||||
static void PlaceMallPedsAsStationaryGroup(CVector const&, int32);
|
||||
static CPed* AddDeadPedInFrontOfCar(const CVector& pos, CVehicle* pCulprit);
|
||||
};
|
||||
|
@ -14,14 +14,6 @@
|
||||
bool CCredits::bCreditsGoing;
|
||||
uint32 CCredits::CreditsStartTime;
|
||||
|
||||
#ifdef ASPECT_RATIO_SCALE
|
||||
#define SCALE_AND_CENTER(x) ScaleAndCenterX(x)
|
||||
extern float ScaleAndCenterX(float x);
|
||||
#else
|
||||
#define SCALE_AND_CENTER(x) SCREEN_STRETCH_X(x)
|
||||
#endif
|
||||
|
||||
|
||||
void
|
||||
CCredits::Init(void)
|
||||
{
|
||||
@ -81,7 +73,7 @@ CCredits::Render(void)
|
||||
scrolloffset = (CTimer::GetTimeInMilliseconds() - CreditsStartTime) / 24.0f;
|
||||
CFont::SetJustifyOff();
|
||||
CFont::SetBackgroundOff();
|
||||
CFont::SetCentreSize(SCALE_AND_CENTER(DEFAULT_SCREEN_WIDTH * 0.75f));
|
||||
CFont::SetCentreSize(SCALE_AND_CENTER_X(DEFAULT_SCREEN_WIDTH * 0.75f));
|
||||
CFont::SetCentreOn();
|
||||
CFont::SetPropOn();
|
||||
CFont::SetFontStyle(FONT_STANDARD);
|
||||
@ -429,7 +421,7 @@ CCredits::Render(void)
|
||||
PrintCreditText(0.65f, 0.65f, TheText.Get("CRED129"), lineoffset, scrolloffset);
|
||||
PrintCreditSpace(1.5f, lineoffset);
|
||||
|
||||
CFont::SetCentreSize(SCALE_AND_CENTER(DEFAULT_SCREEN_WIDTH * 0.8f));
|
||||
CFont::SetCentreSize(SCALE_AND_CENTER_X(DEFAULT_SCREEN_WIDTH * 0.8f));
|
||||
|
||||
PrintCreditText(1.1f, 0.8f, TheText.Get("CRD111A"), lineoffset, scrolloffset);
|
||||
PrintCreditSpace(0.5f, lineoffset);
|
||||
@ -477,7 +469,7 @@ CCredits::Render(void)
|
||||
PrintCreditSpace(0.5f, lineoffset);
|
||||
PrintCreditText(0.65f, 0.65f, TheText.Get("CRD134I"), lineoffset, scrolloffset);
|
||||
|
||||
CFont::SetCentreSize(SCALE_AND_CENTER(DEFAULT_SCREEN_WIDTH * 0.7f));
|
||||
CFont::SetCentreSize(SCALE_AND_CENTER_X(DEFAULT_SCREEN_WIDTH * 0.7f));
|
||||
|
||||
PrintCreditSpace(1.5f, lineoffset);
|
||||
PrintCreditText(1.1f, 0.8f, TheText.Get("CRED135"), lineoffset, scrolloffset);
|
||||
@ -513,7 +505,7 @@ CCredits::Render(void)
|
||||
PrintCreditText(1.1f, 1.1f, TheText.Get("CRD140L"), lineoffset, scrolloffset);
|
||||
PrintCreditSpace(1.5f, lineoffset);
|
||||
|
||||
CFont::SetCentreSize(SCALE_AND_CENTER(DEFAULT_SCREEN_WIDTH * 0.85f));
|
||||
CFont::SetCentreSize(SCALE_AND_CENTER_X(DEFAULT_SCREEN_WIDTH * 0.85f));
|
||||
|
||||
PrintCreditText(0.95f, 0.7f, TheText.Get("CRED259"), lineoffset, scrolloffset);
|
||||
PrintCreditSpace(0.5f, lineoffset);
|
||||
@ -594,7 +586,7 @@ CCredits::Render(void)
|
||||
PrintCreditText(0.65f, 0.65f, TheText.Get("CRED172"), lineoffset, scrolloffset);
|
||||
PrintCreditSpace(0.5f, lineoffset);
|
||||
|
||||
CFont::SetCentreSize(SCALE_AND_CENTER(DEFAULT_SCREEN_WIDTH * 0.75f));
|
||||
CFont::SetCentreSize(SCALE_AND_CENTER_X(DEFAULT_SCREEN_WIDTH * 0.75f));
|
||||
|
||||
PrintCreditSpace(1.5f, lineoffset);
|
||||
PrintCreditText(0.95f, 0.7f, TheText.Get("CRED217"), lineoffset, scrolloffset);
|
||||
@ -717,7 +709,7 @@ CCredits::Render(void)
|
||||
PrintCreditText(0.65f, 0.65f, TheText.Get("CRED332"), lineoffset, scrolloffset);
|
||||
PrintCreditSpace(1.5f, lineoffset);
|
||||
|
||||
CFont::SetCentreSize(SCALE_AND_CENTER(DEFAULT_SCREEN_WIDTH * 0.8f));
|
||||
CFont::SetCentreSize(SCALE_AND_CENTER_X(DEFAULT_SCREEN_WIDTH * 0.8f));
|
||||
|
||||
PrintCreditText(0.95f, 0.7f, TheText.Get("CRED333"), lineoffset, scrolloffset);
|
||||
PrintCreditSpace(0.5f, lineoffset);
|
||||
@ -755,7 +747,7 @@ CCredits::Render(void)
|
||||
|
||||
PrintCreditSpace(1.5f, lineoffset);
|
||||
|
||||
CFont::SetCentreSize(SCALE_AND_CENTER(DEFAULT_SCREEN_WIDTH * 0.75f));
|
||||
CFont::SetCentreSize(SCALE_AND_CENTER_X(DEFAULT_SCREEN_WIDTH * 0.75f));
|
||||
|
||||
PrintCreditText(0.95f, 0.7f, TheText.Get("CRED267"), lineoffset, scrolloffset);
|
||||
PrintCreditSpace(0.5f, lineoffset);
|
||||
@ -818,6 +810,4 @@ CCredits::Render(void)
|
||||
bool CCredits::AreCreditsDone(void)
|
||||
{
|
||||
return !bCreditsGoing;
|
||||
}
|
||||
|
||||
#undef SCALE_AND_CENTER
|
||||
}
|
@ -69,3 +69,14 @@ CDraw::SetFOV(float fov)
|
||||
#endif
|
||||
ms_fFOV = fov;
|
||||
}
|
||||
|
||||
#ifdef ASPECT_RATIO_SCALE
|
||||
float
|
||||
ScaleAndCenterX(float x)
|
||||
{
|
||||
if (SCREEN_WIDTH == DEFAULT_SCREEN_WIDTH)
|
||||
return x;
|
||||
else
|
||||
return (SCREEN_WIDTH - SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH)) / 2 + SCREEN_SCALE_X(x);
|
||||
}
|
||||
#endif
|
@ -228,8 +228,8 @@ CFont::Initialise(void)
|
||||
SetColor(CRGBA(0xFF, 0xFF, 0xFF, 0));
|
||||
SetJustifyOff();
|
||||
SetCentreOff();
|
||||
SetWrapx(DEFAULT_SCREEN_WIDTH);
|
||||
SetCentreSize(DEFAULT_SCREEN_WIDTH);
|
||||
SetWrapx(SCREEN_STRETCH_X(DEFAULT_SCREEN_WIDTH));
|
||||
SetCentreSize(SCREEN_STRETCH_X(DEFAULT_SCREEN_WIDTH));
|
||||
SetBackgroundOff();
|
||||
SetBackgroundColor(CRGBA(0x80, 0x80, 0x80, 0x80));
|
||||
SetBackGroundOnlyTextOff();
|
||||
@ -996,22 +996,10 @@ CFont::GetStringWidth(wchar *s, bool spaces)
|
||||
{
|
||||
for (wchar c = *s; (c != ' ' || spaces) && c != '\0'; c = *(++s)) {
|
||||
if (c == '~') {
|
||||
|
||||
// This is original code
|
||||
#if 0
|
||||
s++;
|
||||
while (*s != '~') {
|
||||
s++;
|
||||
}
|
||||
#else
|
||||
// TODO(Miami): This is my code to prevent fuck up until InsertPlayerControlKeysInString is done
|
||||
if (*(s + 1) != '~') {
|
||||
s++;
|
||||
while (*s != '~') {
|
||||
s++;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
w += GetCharacterSize(c - ' ');
|
||||
|
@ -405,7 +405,7 @@ void CHud::Draw()
|
||||
CFont::SetScale(SCREEN_SCALE_X(0.5f), SCREEN_SCALE_Y(0.8f));
|
||||
CFont::SetJustifyOff();
|
||||
CFont::SetCentreOn();
|
||||
CFont::SetCentreSize(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH));
|
||||
CFont::SetCentreSize(SCREEN_STRETCH_X(DEFAULT_SCREEN_WIDTH));
|
||||
CFont::SetPropOn();
|
||||
CFont::SetDropShadowPosition(0);
|
||||
CFont::SetFontStyle(FONT_STANDARD);
|
||||
@ -886,7 +886,7 @@ void CHud::Draw()
|
||||
CFont::SetRightJustifyWrap(0.0f);
|
||||
CFont::SetFontStyle(FONT_LOCALE(FONT_HEADING));
|
||||
CFont::SetColor(CRGBA(244, 20, 20, 255));
|
||||
CFont::SetWrapx(SCREEN_SCALE_X(640.0f));
|
||||
CFont::SetWrapx(SCREEN_STRETCH_X(DEFAULT_SCREEN_WIDTH));
|
||||
CFont::SetPropOff();
|
||||
CFont::SetBackGroundOnlyTextOn();
|
||||
|
||||
@ -1024,8 +1024,8 @@ void CHud::Draw()
|
||||
else
|
||||
CFont::SetCentreOff();
|
||||
|
||||
CFont::SetWrapx(SCREEN_SCALE_X(CTheScripts::IntroTextLines[i].m_fWrapX));
|
||||
CFont::SetCentreSize(SCREEN_SCALE_X(CTheScripts::IntroTextLines[i].m_fCenterSize));
|
||||
CFont::SetWrapx(SCALE_AND_CENTER_X(CTheScripts::IntroTextLines[i].m_fWrapX));
|
||||
CFont::SetCentreSize(SCALE_AND_CENTER_X(CTheScripts::IntroTextLines[i].m_fCenterSize));
|
||||
|
||||
if (CTheScripts::IntroTextLines[i].m_bBackground)
|
||||
CFont::SetBackgroundOn();
|
||||
@ -1045,7 +1045,7 @@ void CHud::Draw()
|
||||
CFont::SetPropOff();
|
||||
|
||||
CFont::SetFontStyle(FONT_LOCALE(CTheScripts::IntroTextLines[i].m_nFont));
|
||||
CFont::PrintString(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH - CTheScripts::IntroTextLines[i].m_fAtX), SCREEN_SCALE_Y(DEFAULT_SCREEN_HEIGHT - CTheScripts::IntroTextLines[i].m_fAtY), CTheScripts::IntroTextLines[i].m_Text);
|
||||
CFont::PrintString(SCALE_AND_CENTER_X(DEFAULT_SCREEN_WIDTH - CTheScripts::IntroTextLines[i].m_fAtX), SCREEN_SCALE_Y(DEFAULT_SCREEN_HEIGHT - CTheScripts::IntroTextLines[i].m_fAtY), CTheScripts::IntroTextLines[i].m_Text);
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < ARRAY_SIZE(CTheScripts::IntroRectangles); i++) {
|
||||
@ -1250,10 +1250,12 @@ void CHud::Draw()
|
||||
}
|
||||
CFont::SetPropOn();
|
||||
CFont::SetCentreOn();
|
||||
CFont::SetCentreSize(SCREEN_SCALE_X(590.0f));
|
||||
CFont::SetCentreSize(SCREEN_SCALE_FROM_RIGHT(50.0f));
|
||||
CFont::SetColor(CRGBA(255, 255, 0, BigMessageAlpha[0])); // unused color
|
||||
CFont::SetFontStyle(FONT_HEADING);
|
||||
|
||||
// Appearently sliding text in here was abandoned very early, since this text is centered now.
|
||||
|
||||
if (BigMessageX[0] >= SCREEN_SCALE_FROM_RIGHT(20.0f)) {
|
||||
BigMessageInUse[0] += CTimer::GetTimeStep();
|
||||
|
||||
@ -1268,7 +1270,7 @@ void CHud::Draw()
|
||||
}
|
||||
}
|
||||
else {
|
||||
BigMessageX[0] += (CTimer::GetTimeStepInMilliseconds() * 0.3f);
|
||||
BigMessageX[0] += SCREEN_SCALE_X((CTimer::GetTimeStepInMilliseconds() * 0.3f));
|
||||
BigMessageAlpha[0] += (CTimer::GetTimeStepInMilliseconds() * 0.3f);
|
||||
|
||||
if (BigMessageAlpha[0] > 255.0f)
|
||||
@ -1282,7 +1284,7 @@ void CHud::Draw()
|
||||
}
|
||||
else {
|
||||
BigMessageAlpha[0] = 0.0f;
|
||||
BigMessageX[0] = -60.0f;
|
||||
BigMessageX[0] = SCREEN_SCALE_FROM_RIGHT(DEFAULT_SCREEN_WIDTH + 60.0f);
|
||||
BigMessageInUse[0] = 1.0f;
|
||||
}
|
||||
}
|
||||
@ -1293,7 +1295,7 @@ void CHud::Draw()
|
||||
// WastedBustedText
|
||||
if (m_BigMessage[2][0]) {
|
||||
if (BigMessageInUse[2] != 0.0f) {
|
||||
BigMessageAlpha[2] += (CTimer::GetTimeStepInSeconds() * 255.0f);
|
||||
BigMessageAlpha[2] += (CTimer::GetTimeStepInMilliseconds() * 0.4f);
|
||||
|
||||
if (BigMessageAlpha[2] > 255.0f)
|
||||
BigMessageAlpha[2] = 255.0f;
|
||||
@ -1330,6 +1332,7 @@ void CHud::Draw()
|
||||
}
|
||||
}
|
||||
|
||||
// --MIAMI: Done
|
||||
void CHud::DrawAfterFade()
|
||||
{
|
||||
RwRenderStateSet(rwRENDERSTATETEXTUREFILTER, (void*)rwFILTERNEAREST);
|
||||
@ -1360,8 +1363,8 @@ void CHud::DrawAfterFade()
|
||||
else
|
||||
CFont::SetCentreOff();
|
||||
|
||||
CFont::SetWrapx(SCREEN_SCALE_X(line.m_fWrapX));
|
||||
CFont::SetCentreSize(SCREEN_SCALE_X(line.m_fCenterSize));
|
||||
CFont::SetWrapx(SCALE_AND_CENTER_X(line.m_fWrapX));
|
||||
CFont::SetCentreSize(SCALE_AND_CENTER_X(line.m_fCenterSize));
|
||||
if (line.m_bBackground)
|
||||
CFont::SetBackgroundOn();
|
||||
else
|
||||
@ -1379,7 +1382,7 @@ void CHud::DrawAfterFade()
|
||||
CFont::SetPropOff();
|
||||
|
||||
CFont::SetFontStyle(line.m_nFont);
|
||||
CFont::PrintString(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH - line.m_fAtX), SCREEN_SCALE_Y(DEFAULT_SCREEN_HEIGHT - line.m_fAtY), line.m_Text);
|
||||
CFont::PrintString(SCALE_AND_CENTER_X(DEFAULT_SCREEN_WIDTH - line.m_fAtX), SCREEN_SCALE_Y(DEFAULT_SCREEN_HEIGHT - line.m_fAtY), line.m_Text);
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < ARRAY_SIZE(CTheScripts::IntroRectangles); i++) {
|
||||
@ -1407,7 +1410,7 @@ void CHud::DrawAfterFade()
|
||||
CFont::SetScale(SCREEN_SCALE_X(1.2f), SCREEN_SCALE_Y(1.5f));
|
||||
CFont::SetCentreOn();
|
||||
CFont::SetPropOn();
|
||||
CFont::SetCentreSize(SCREEN_SCALE_X(600.0f));
|
||||
CFont::SetCentreSize(SCREEN_SCALE_FROM_RIGHT(40.0f));
|
||||
CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD));
|
||||
CFont::SetDropShadowPosition(2);
|
||||
CFont::SetDropColor(CRGBA(0, 0, 0, 255));
|
||||
@ -1421,7 +1424,7 @@ void CHud::DrawAfterFade()
|
||||
CFont::SetScale(SCREEN_SCALE_X(1.2f), SCREEN_SCALE_Y(1.5f));
|
||||
CFont::SetCentreOn();
|
||||
CFont::SetPropOn();
|
||||
CFont::SetCentreSize(SCREEN_SCALE_X(620.0f));
|
||||
CFont::SetCentreSize(SCREEN_SCALE_FROM_RIGHT(60.0f));
|
||||
CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD));
|
||||
CFont::SetDropShadowPosition(2);
|
||||
CFont::SetDropColor(CRGBA(0, 0, 0, 255));
|
||||
@ -1451,7 +1454,7 @@ void CHud::DrawAfterFade()
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
OddJob2Timer += (20.0f * CTimer::GetTimeStep());
|
||||
OddJob2Timer += CTimer::GetTimeStepInMilliseconds();
|
||||
if (OddJob2Timer > 1500) {
|
||||
OddJob2On = 3;
|
||||
}
|
||||
@ -1476,20 +1479,18 @@ void CHud::DrawAfterFade()
|
||||
CFont::SetScale(SCREEN_SCALE_X(1.0f), SCREEN_SCALE_Y(1.2f));
|
||||
CFont::SetCentreOn();
|
||||
CFont::SetPropOn();
|
||||
CFont::SetCentreSize(SCREEN_SCALE_FROM_RIGHT(20.0f));
|
||||
CFont::SetColor(CRGBA(0, 0, 0, 255));
|
||||
CFont::SetCentreSize(SCREEN_SCALE_FROM_RIGHT(80.0f));
|
||||
CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD));
|
||||
|
||||
CFont::SetDropShadowPosition(2);
|
||||
CFont::SetDropColor(CRGBA(0, 0, 0, 255));
|
||||
#ifdef BETA_SLIDING_TEXT
|
||||
CFont::PrintString(SCREEN_WIDTH / 2 + SCREEN_SCALE_X(2.0f) - SCREEN_SCALE_X(OddJob2XOffset), SCREEN_HEIGHT / 2 - SCREEN_SCALE_Y(20.0f) + SCREEN_SCALE_Y(2.0f), m_BigMessage[5]);
|
||||
|
||||
CFont::SetColor(ODDJOB2_COLOR);
|
||||
CFont::PrintString(SCREEN_WIDTH / 2 - SCREEN_SCALE_X(OddJob2XOffset), SCREEN_HEIGHT / 2 - SCREEN_SCALE_Y(20.0f), m_BigMessage[5]);
|
||||
CFont::PrintString(SCREEN_WIDTH / 2 - SCREEN_SCALE_X(OddJob2XOffset), SCREEN_SCALE_Y(217.0f), m_BigMessage[5]);
|
||||
#else
|
||||
CFont::PrintString(SCREEN_WIDTH / 2 + SCREEN_SCALE_X(2.0f), SCREEN_HEIGHT / 2 - SCREEN_SCALE_Y(20.0f) + SCREEN_SCALE_Y(2.0f), m_BigMessage[5]);
|
||||
|
||||
CFont::SetColor(ODDJOB2_COLOR);
|
||||
CFont::PrintString(SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2 - SCREEN_SCALE_Y(20.0f), m_BigMessage[5]);
|
||||
CFont::PrintString(SCREEN_WIDTH / 2, SCREEN_SCALE_Y(217.0f), m_BigMessage[5]);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@ -1502,6 +1503,7 @@ void CHud::DrawAfterFade()
|
||||
CFont::SetJustifyOff();
|
||||
CFont::SetBackgroundOff();
|
||||
|
||||
// will be overwritten below
|
||||
if (CGame::frenchGame || FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_SPANISH)
|
||||
CFont::SetScale(SCREEN_SCALE_X(0.884f), SCREEN_SCALE_Y(1.36f));
|
||||
else
|
||||
@ -1511,41 +1513,45 @@ void CHud::DrawAfterFade()
|
||||
CFont::SetRightJustifyWrap(0.0f);
|
||||
CFont::SetRightJustifyOn();
|
||||
CFont::SetFontStyle(FONT_BANK);
|
||||
CFont::SetScale(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_AMERICAN ? SCREEN_SCALE_X(1.7f) : SCREEN_SCALE_X(1.5f), SCREEN_SCALE_Y(1.8f));
|
||||
|
||||
if (BigMessageX[1] >= SCREEN_SCALE_FROM_RIGHT(20.0f)) {
|
||||
BigMessageInUse[1] += CTimer::GetTimeStep();
|
||||
|
||||
if (BigMessageInUse[1] >= 120.0f) {
|
||||
BigMessageInUse[1] = 120.0f;
|
||||
BigMessageAlpha[1] -= (CTimer::GetTimeStepInMilliseconds() * 0.3f);
|
||||
BigMessageAlpha[1] -= CTimer::GetTimeStepInMilliseconds();
|
||||
}
|
||||
if (BigMessageAlpha[1] <= 0) {
|
||||
m_BigMessage[1][0] = 0;
|
||||
BigMessageInUse[1] = 0.0f;
|
||||
BigMessageAlpha[1] = 0.0f;
|
||||
}
|
||||
} else {
|
||||
BigMessageX[1] += (CTimer::GetTimeStepInMilliseconds() * 0.3f);
|
||||
BigMessageAlpha[1] += (CTimer::GetTimeStepInMilliseconds() * 0.3f);
|
||||
BigMessageX[1] += SCREEN_SCALE_X((CTimer::GetTimeStepInMilliseconds() * 0.3f));
|
||||
BigMessageAlpha[1] += CTimer::GetTimeStepInMilliseconds();
|
||||
|
||||
if (BigMessageAlpha[1] > 255.0f)
|
||||
BigMessageAlpha[1] = 255.0f;
|
||||
}
|
||||
|
||||
CFont::SetDropShadowPosition(2);
|
||||
CFont::SetDropColor(CRGBA(40, 40, 40, BigMessageAlpha[1]));
|
||||
//CFont::SetColor(CRGBA(40, 40, 40, BigMessageAlpha[1]));
|
||||
//CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(20.0f) + SCREEN_SCALE_X(2.0f), SCREEN_SCALE_FROM_BOTTOM(120.0f) + SCREEN_SCALE_Y(2.0f), m_BigMessage[1]);
|
||||
CFont::SetColor(CRGBA(40, 40, 40, BigMessageAlpha[1])); // what was that for?
|
||||
|
||||
CFont::SetDropShadowPosition(2);
|
||||
CFont::SetDropColor(CRGBA(0, 0, 0, BigMessageAlpha[1]));
|
||||
CFont::SetColor(CRGBA(MISSIONTITLE_COLOR.r, MISSIONTITLE_COLOR.g, MISSIONTITLE_COLOR.b, BigMessageAlpha[1]));
|
||||
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(20.0f), SCREEN_SCALE_FROM_BOTTOM(120.0f), m_BigMessage[1]);
|
||||
}
|
||||
else {
|
||||
BigMessageAlpha[1] = 0.0f;
|
||||
BigMessageX[1] = -60.0f;
|
||||
#ifdef BETA_SLIDING_TEXT
|
||||
CFont::PrintString(BigMessageX[1], SCREEN_SCALE_FROM_BOTTOM(140.0f), m_BigMessage[1]);
|
||||
#else
|
||||
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(20.0f), SCREEN_SCALE_FROM_BOTTOM(140.0f), m_BigMessage[1]);
|
||||
#endif
|
||||
} else {
|
||||
m_ZoneFadeTimer = 0;
|
||||
BigMessageX[1] = SCREEN_SCALE_FROM_RIGHT(DEFAULT_SCREEN_WIDTH + 60.0f);
|
||||
BigMessageInUse[1] = 1.0f;
|
||||
m_ZoneState = 0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
BigMessageInUse[1] = 0.0f;
|
||||
}
|
||||
}
|
||||
@ -1925,3 +1931,12 @@ float CHud::DrawFadeState(DRAW_FADE_STATE fadingElement, int forceFadingIn)
|
||||
|
||||
return clamp(alpha, 0.0f, 255.0f);
|
||||
}
|
||||
|
||||
void
|
||||
CHud::ResetWastedText(void)
|
||||
{
|
||||
BigMessageInUse[2] = 0.0f;
|
||||
BigMessageInUse[0] = 0.0f;
|
||||
m_BigMessage[2][0] = 0;
|
||||
m_BigMessage[0][0] = 0;
|
||||
}
|
@ -140,4 +140,5 @@ public:
|
||||
static void SetZoneName(wchar *name);
|
||||
static void Shutdown();
|
||||
static float DrawFadeState(DRAW_FADE_STATE, int);
|
||||
static void ResetWastedText(void);
|
||||
};
|
||||
|
@ -11,6 +11,8 @@
|
||||
#include "PCSave.h"
|
||||
#include "Text.h"
|
||||
|
||||
// --MIAMI: file done
|
||||
|
||||
const char* _psGetUserFilesFolder();
|
||||
|
||||
C_PcSave PcSaveHelper;
|
||||
@ -18,7 +20,7 @@ C_PcSave PcSaveHelper;
|
||||
void
|
||||
C_PcSave::SetSaveDirectory(const char *path)
|
||||
{
|
||||
sprintf(DefaultPCSaveFileName, "%s\\%s", path, "GTA3sf");
|
||||
sprintf(DefaultPCSaveFileName, "%s\\%s", path, "GTAVCsf");
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -1736,7 +1736,6 @@ main(int argc, char *argv[])
|
||||
#else
|
||||
LoadingScreen(nil, nil, "loadsc0");
|
||||
#endif
|
||||
|
||||
if ( !CGame::InitialiseOnceAfterRW() )
|
||||
RsGlobal.quit = TRUE;
|
||||
|
||||
@ -1748,7 +1747,7 @@ main(int argc, char *argv[])
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
#ifndef PS2_MENU
|
||||
case GS_INIT_FRONTEND:
|
||||
{
|
||||
LoadingScreen(nil, nil, "loadsc0");
|
||||
@ -1769,7 +1768,6 @@ main(int argc, char *argv[])
|
||||
break;
|
||||
}
|
||||
|
||||
#ifndef PS2_MENU
|
||||
case GS_FRONTEND:
|
||||
{
|
||||
if(!glfwGetWindowAttrib(PSGLOBAL(window), GLFW_ICONIFIED))
|
||||
|
@ -2527,7 +2527,7 @@ WinMain(HINSTANCE instance,
|
||||
else if ( gGameState == GS_ANIMVIEWER )
|
||||
CAnimViewer::Shutdown();
|
||||
#endif
|
||||
|
||||
|
||||
CTimer::Stop();
|
||||
|
||||
if ( FrontEndMenuManager.m_bFirstTime == true )
|
||||
|
@ -18,6 +18,8 @@
|
||||
#include "Zones.h"
|
||||
#include "Occlusion.h"
|
||||
|
||||
// --MIAMI: file done
|
||||
|
||||
uint8 CTheCarGenerators::ProcessCounter;
|
||||
uint32 CTheCarGenerators::NumOfCarGenerators;
|
||||
CCarGenerator CTheCarGenerators::CarGeneratorArray[NUM_CARGENS];
|
||||
@ -42,7 +44,6 @@ uint32 CCarGenerator::CalcNextGen()
|
||||
return CTimer::GetTimeInMilliseconds() + 4;
|
||||
}
|
||||
|
||||
//TODO(MIAMI): check for more changes - so far only -1 mi is accounted for
|
||||
void CCarGenerator::DoInternalProcessing()
|
||||
{
|
||||
int mi;
|
||||
@ -53,6 +54,7 @@ void CCarGenerator::DoInternalProcessing()
|
||||
m_nTimer += 4;
|
||||
return;
|
||||
}
|
||||
CStreaming::RequestModel(m_nModelIndex, STREAMFLAGS_DEPENDENCY);
|
||||
mi = m_nModelIndex;
|
||||
}
|
||||
else {
|
||||
@ -73,29 +75,25 @@ void CCarGenerator::DoInternalProcessing()
|
||||
return;
|
||||
}
|
||||
}
|
||||
CStreaming::RequestModel(mi, STREAMFLAGS_DEPENDENCY);
|
||||
if (!CStreaming::HasModelLoaded(mi))
|
||||
return;
|
||||
CVehicle* pVehicle;
|
||||
|
||||
CVector pos;
|
||||
if (CModelInfo::IsBoatModel(mi)){
|
||||
CBoat* pBoat = new CBoat(mi, PARKED_VEHICLE);
|
||||
pos = m_vecPos;
|
||||
pVehicle = pBoat;
|
||||
pBoat->bIsStatic = false;
|
||||
pBoat->bEngineOn = false;
|
||||
CVector pos = m_vecPos;
|
||||
if (pos.z <= -100.0f)
|
||||
pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y);
|
||||
pos.z += pBoat->GetDistanceFromCentreOfMassToBaseOfModel();
|
||||
pBoat->SetPosition(pos);
|
||||
pBoat->SetOrientation(0.0f, 0.0f, DEGTORAD(m_fAngle));
|
||||
pBoat->SetStatus(STATUS_ABANDONED);
|
||||
pBoat->m_nDoorLock = CARLOCK_UNLOCKED;
|
||||
pBoat->bExtendedRange = false;
|
||||
}else{
|
||||
bool groundFound = false;
|
||||
CVector pos = m_vecPos;
|
||||
bool groundFound;
|
||||
pos = m_vecPos;
|
||||
if (pos.z > -100.0f){
|
||||
pos.z = CWorld::FindGroundZFor3DCoord(pos.x, pos.y, pos.z, &groundFound);
|
||||
}else{
|
||||
groundFound = false;
|
||||
CColPoint cp;
|
||||
CEntity* pEntity;
|
||||
groundFound = CWorld::ProcessVerticalLine(CVector(pos.x, pos.y, 1000.0f), -1000.0f,
|
||||
@ -107,7 +105,7 @@ void CCarGenerator::DoInternalProcessing()
|
||||
debug("CCarGenerator::DoInternalProcessing - can't find ground z for new car x = %f y = %f \n", m_vecPos.x, m_vecPos.y);
|
||||
return;
|
||||
}
|
||||
if (CModelInfo::IsBikeModel(mi)) {
|
||||
if (CModelInfo::GetModelInfo(mi)->GetModelType() == VEHICLE_TYPE_BIKE) {
|
||||
CBike* pBike = new CBike(mi, PARKED_VEHICLE);
|
||||
pBike->bIsStanding = true;
|
||||
pVehicle = pBike;
|
||||
@ -116,16 +114,16 @@ void CCarGenerator::DoInternalProcessing()
|
||||
CAutomobile* pCar = new CAutomobile(mi, PARKED_VEHICLE);
|
||||
pVehicle = pCar;
|
||||
}
|
||||
pVehicle->bIsStatic = false;
|
||||
pVehicle->bEngineOn = false;
|
||||
pos.z += pVehicle->GetDistanceFromCentreOfMassToBaseOfModel();
|
||||
pVehicle->SetPosition(pos);
|
||||
pVehicle->SetOrientation(0.0f, 0.0f, DEGTORAD(m_fAngle));
|
||||
pVehicle->SetStatus(STATUS_ABANDONED);
|
||||
// pVehicle->GetDistanceFromCentreOfMassToBaseOfModel();
|
||||
pVehicle->bLightsOn = false;
|
||||
pVehicle->m_nDoorLock = CARLOCK_UNLOCKED;
|
||||
|
||||
}
|
||||
pVehicle->bIsStatic = false;
|
||||
pVehicle->bEngineOn = false;
|
||||
pos.z += pVehicle->GetDistanceFromCentreOfMassToBaseOfModel();
|
||||
pVehicle->SetPosition(pos);
|
||||
pVehicle->SetOrientation(0.0f, 0.0f, DEGTORAD(m_fAngle));
|
||||
pVehicle->SetStatus(STATUS_ABANDONED);
|
||||
pVehicle->m_nDoorLock = CARLOCK_UNLOCKED;
|
||||
CWorld::Add(pVehicle);
|
||||
if (CGeneral::GetRandomNumberInRange(0, 100) < m_nAlarm)
|
||||
pVehicle->m_nAlarmState = -1;
|
||||
@ -173,6 +171,8 @@ void CCarGenerator::Process()
|
||||
m_nVehicleHandle = -1;
|
||||
m_bIsBlocking = true;
|
||||
pVehicle->bExtendedRange = false;
|
||||
if (m_nModelIndex < 0)
|
||||
m_nModelIndex = -1;
|
||||
}
|
||||
|
||||
void CCarGenerator::Setup(float x, float y, float z, float angle, int32 mi, int16 color1, int16 color2, uint8 force, uint8 alarm, uint8 lock, uint16 min_delay, uint16 max_delay)
|
||||
@ -217,8 +217,8 @@ bool CCarGenerator::CheckIfWithinRangeOfAnyPlayers()
|
||||
float farclip = 110.0f * TheCamera.GenerationDistMultiplier;
|
||||
float nearclip = farclip - 20.0f;
|
||||
bool canBeRemoved = (m_nModelIndex > 0 && CModelInfo::IsBoatModel(m_nModelIndex) && 165.0f * TheCamera.GenerationDistMultiplier > distance &&
|
||||
TheCamera.IsSphereVisible(m_vecPos, 0.0f) && COcclusion::IsPositionOccluded(m_vecPos, 0.0f));
|
||||
if (distance >= farclip || canBeRemoved){
|
||||
TheCamera.IsSphereVisible(m_vecPos, 0.0f) && !COcclusion::IsPositionOccluded(m_vecPos, 0.0f));
|
||||
if (distance >= farclip && !canBeRemoved){
|
||||
if (m_bIsBlocking)
|
||||
m_bIsBlocking = false;
|
||||
return false;
|
||||
@ -227,7 +227,7 @@ bool CCarGenerator::CheckIfWithinRangeOfAnyPlayers()
|
||||
return true;
|
||||
if (m_bIsBlocking)
|
||||
return false;
|
||||
if (distance < nearclip)
|
||||
if (distance < nearclip && !m_bForceSpawn)
|
||||
return false;
|
||||
return DotProduct2D(direction, FindPlayerSpeed()) <= 0;
|
||||
}
|
||||
@ -246,8 +246,9 @@ void CTheCarGenerators::Process()
|
||||
|
||||
int32 CTheCarGenerators::CreateCarGenerator(float x, float y, float z, float angle, int32 mi, int16 color1, int16 color2, uint8 force, uint8 alarm, uint8 lock, uint16 min_delay, uint16 max_delay)
|
||||
{
|
||||
CarGeneratorArray[NumOfCarGenerators].Setup(x, y, z, angle, mi, color1, color2, force, alarm, lock, min_delay, max_delay);
|
||||
return NumOfCarGenerators++;
|
||||
if (NumOfCarGenerators < NUM_CARGENS)
|
||||
CarGeneratorArray[NumOfCarGenerators++].Setup(x, y, z, angle, mi, color1, color2, force, alarm, lock, min_delay, max_delay);
|
||||
return NumOfCarGenerators - 1;
|
||||
}
|
||||
|
||||
void CTheCarGenerators::Init()
|
||||
@ -279,6 +280,11 @@ VALIDATESAVEBUF(*size)
|
||||
|
||||
void CTheCarGenerators::LoadAllCarGenerators(uint8* buffer, uint32 size)
|
||||
{
|
||||
NumOfCarGenerators = 0;
|
||||
GenerateEvenIfPlayerIsCloseCounter = 0;
|
||||
CurrentActiveCount = 0;
|
||||
ProcessCounter = 0;
|
||||
|
||||
const int32 nGeneralDataSize = sizeof(NumOfCarGenerators) + sizeof(CurrentActiveCount) + sizeof(ProcessCounter) + sizeof(GenerateEvenIfPlayerIsCloseCounter) + sizeof(int16);
|
||||
Init();
|
||||
INITSAVEBUF
|
||||
|
@ -52,17 +52,22 @@ void CCranes::InitCranes(void)
|
||||
CEntity* pEntity = (CEntity*)pNode->item;
|
||||
if (MODELID_CRANE_1 == pEntity->GetModelIndex() ||
|
||||
MODELID_CRANE_2 == pEntity->GetModelIndex() ||
|
||||
MODELID_CRANE_3 == pEntity->GetModelIndex())
|
||||
MODELID_CRANE_3 == pEntity->GetModelIndex() ||
|
||||
MODELID_CRANE_4 == pEntity->GetModelIndex() ||
|
||||
MODELID_CRANE_5 == pEntity->GetModelIndex() ||
|
||||
MODELID_CRANE_6 == pEntity->GetModelIndex())
|
||||
AddThisOneCrane(pEntity);
|
||||
}
|
||||
}
|
||||
}
|
||||
// TODO(MIAMI): LEVEL_MAINLAND just so it compiles
|
||||
for (CPtrNode* pNode = CWorld::GetBigBuildingList(LEVEL_MAINLAND).first; pNode; pNode = pNode->next) {
|
||||
CEntity* pEntity = (CEntity*)pNode->item;
|
||||
if (MODELID_CRANE_1 == pEntity->GetModelIndex() ||
|
||||
MODELID_CRANE_2 == pEntity->GetModelIndex() ||
|
||||
MODELID_CRANE_3 == pEntity->GetModelIndex())
|
||||
MODELID_CRANE_3 == pEntity->GetModelIndex() ||
|
||||
MODELID_CRANE_4 == pEntity->GetModelIndex() ||
|
||||
MODELID_CRANE_5 == pEntity->GetModelIndex() ||
|
||||
MODELID_CRANE_6 == pEntity->GetModelIndex())
|
||||
AddThisOneCrane(pEntity);
|
||||
}
|
||||
}
|
||||
@ -85,21 +90,7 @@ void CCranes::AddThisOneCrane(CEntity* pEntity)
|
||||
pCrane->m_nCraneState = CCrane::IDLE;
|
||||
pCrane->m_bWasMilitaryCrane = false;
|
||||
pCrane->m_bIsTop = (MODELID_CRANE_1 != pEntity->GetModelIndex());
|
||||
#if 0
|
||||
// Is this used to avoid military crane?
|
||||
if (pCrane->m_bIsTop || pEntity->GetPosition().y > 0.0f) {
|
||||
CObject* pHook = new CObject(MI_MAGNET, false);
|
||||
pHook->ObjectCreatedBy = MISSION_OBJECT;
|
||||
pHook->bUsesCollision = false;
|
||||
pHook->bExplosionProof = true;
|
||||
pHook->bAffectedByGravity = false;
|
||||
pCrane->m_pHook = pHook;
|
||||
pCrane->CalcHookCoordinates(&pCrane->m_vecHookCurPos.x, &pCrane->m_vecHookCurPos.y, &pCrane->m_vecHookCurPos.z);
|
||||
pCrane->SetHookMatrix();
|
||||
}
|
||||
else
|
||||
#endif
|
||||
pCrane->m_pHook = nil;
|
||||
pCrane->m_pHook = nil;
|
||||
NumCranes++;
|
||||
}
|
||||
|
||||
|
@ -10,6 +10,8 @@
|
||||
#include "Ped.h"
|
||||
#include "Fire.h"
|
||||
|
||||
// --MIAMI: file done
|
||||
|
||||
CShotInfo gaShotInfo[NUMSHOTINFOS];
|
||||
float CShotInfo::ms_afRandTable[20];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user