mirror of
https://github.com/halpz/re3.git
synced 2025-07-15 23:28:15 +00:00
Merge branch 'miami' into miami
This commit is contained in:
1841
src/core/Cam.cpp
1841
src/core/Cam.cpp
File diff suppressed because it is too large
Load Diff
@ -76,6 +76,16 @@ float CCamera::m_f3rdPersonCHairMultY;
|
||||
#define CTRLDOWN(key) ((KEYDOWN(rsLCTRL) || KEYDOWN(rsRCTRL)) && KEYDOWN((RsKeyCodes)key))
|
||||
#endif
|
||||
|
||||
const float ZOOM_ONE_DISTANCE[] = { -0.6f, 0.05f, -3.2f, 0.05f, -2.41f };
|
||||
const float ZOOM_TWO_DISTANCE[] = { 1.9f, 1.4f, 0.65f, 1.9f, 6.49f };
|
||||
const float ZOOM_THREE_DISTANCE[] = { 15.9f, 15.9f, 15.9f, 15.9f, 25.25f };
|
||||
|
||||
#ifdef FREE_CAM
|
||||
const float LCS_ZOOM_ONE_DISTANCE[] = { -1.0f, -0.2f, -3.2f, 0.05f, -2.41f };
|
||||
const float LCS_ZOOM_TWO_DISTANCE[] = { 2.0f, 2.2f, 1.65f, 2.9f, 6.49f };
|
||||
const float LCS_ZOOM_THREE_DISTANCE[] = { 6.0f, 6.0f, 15.9f, 15.9f, 15.0f };
|
||||
#endif
|
||||
|
||||
CCamera::CCamera(void)
|
||||
{
|
||||
Init();
|
||||
@ -670,6 +680,10 @@ CCamera::CamControl(void)
|
||||
if(CarZoomIndicator != CAM_ZOOM_1STPRS && CarZoomIndicator != CAM_ZOOM_TOPDOWN)
|
||||
ReqMode = CCam::MODE_CAM_ON_A_STRING;
|
||||
|
||||
int vehApp = ((CVehicle*)pTargetEntity)->GetVehicleAppearance();
|
||||
int vehArrPos = 0;
|
||||
GetArrPosForVehicleType(vehApp, vehArrPos);
|
||||
|
||||
switch(((CVehicle*)pTargetEntity)->m_vehType){
|
||||
case VEHICLE_TYPE_CAR:
|
||||
case VEHICLE_TYPE_BIKE:
|
||||
@ -758,26 +772,26 @@ CCamera::CamControl(void)
|
||||
}
|
||||
|
||||
// Car zoom value
|
||||
if(CarZoomIndicator == CAM_ZOOM_1STPRS && !m_bPlayerIsInGarage){
|
||||
if (CarZoomIndicator == CAM_ZOOM_1STPRS && !m_bPlayerIsInGarage) {
|
||||
CarZoomValue = 0.0f;
|
||||
ReqMode = CCam::MODE_1STPERSON;
|
||||
}
|
||||
#ifdef FREE_CAM
|
||||
else if (bFreeCam) {
|
||||
if (CarZoomIndicator == CAM_ZOOM_1)
|
||||
CarZoomValue = ((CVehicle*)pTargetEntity)->IsBoat() ? FREE_BOAT_ZOOM_VALUE_1 : FREE_CAR_ZOOM_VALUE_1;
|
||||
CarZoomValue = LCS_ZOOM_ONE_DISTANCE[vehArrPos];
|
||||
else if (CarZoomIndicator == CAM_ZOOM_2)
|
||||
CarZoomValue = ((CVehicle*)pTargetEntity)->IsBoat() ? FREE_BOAT_ZOOM_VALUE_2 : FREE_CAR_ZOOM_VALUE_2;
|
||||
CarZoomValue = LCS_ZOOM_TWO_DISTANCE[vehArrPos];
|
||||
else if (CarZoomIndicator == CAM_ZOOM_3)
|
||||
CarZoomValue = ((CVehicle*)pTargetEntity)->IsBoat() ? FREE_BOAT_ZOOM_VALUE_3 : FREE_CAR_ZOOM_VALUE_3;
|
||||
CarZoomValue = LCS_ZOOM_THREE_DISTANCE[vehArrPos];
|
||||
}
|
||||
#endif
|
||||
else if(CarZoomIndicator == CAM_ZOOM_1)
|
||||
CarZoomValue = DEFAULT_CAR_ZOOM_VALUE_1;
|
||||
else if (CarZoomIndicator == CAM_ZOOM_1)
|
||||
CarZoomValue = ZOOM_ONE_DISTANCE[vehArrPos];
|
||||
else if(CarZoomIndicator == CAM_ZOOM_2)
|
||||
CarZoomValue = DEFAULT_CAR_ZOOM_VALUE_2;
|
||||
CarZoomValue = ZOOM_TWO_DISTANCE[vehArrPos];
|
||||
else if(CarZoomIndicator == CAM_ZOOM_3)
|
||||
CarZoomValue = DEFAULT_CAR_ZOOM_VALUE_3;
|
||||
CarZoomValue = ZOOM_THREE_DISTANCE[vehArrPos];
|
||||
|
||||
if(CarZoomIndicator == CAM_ZOOM_TOPDOWN && !m_bPlayerIsInGarage){
|
||||
CarZoomValue = 1.0f;
|
||||
@ -2960,6 +2974,13 @@ CCamera::Process_Train_Camera_Control(void)
|
||||
if(node >= m_uiNumberOfTrainCamNodes)
|
||||
node = 0;
|
||||
}
|
||||
#ifdef FIX_BUGS
|
||||
// Not really a bug but be nice and respect the debug mode
|
||||
if(DebugCamMode){
|
||||
TakeControl(target, DebugCamMode, JUMP_CUT, CAMCONTROL_SCRIPT);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
if(found){
|
||||
SetWideScreenOn();
|
||||
@ -3103,26 +3124,42 @@ CCamera::SetZoomValueFollowPedScript(int16 dist)
|
||||
void
|
||||
CCamera::SetZoomValueCamStringScript(int16 dist)
|
||||
{
|
||||
#ifdef FREE_CAM
|
||||
if (bFreeCam) {
|
||||
switch (dist) {
|
||||
case 0: m_fCarZoomValueScript = ((CVehicle*)Cams[ActiveCam].CamTargetEntity)->IsBoat() ? FREE_BOAT_ZOOM_VALUE_1 : FREE_CAR_ZOOM_VALUE_1; break;
|
||||
case 1: m_fCarZoomValueScript = ((CVehicle*)Cams[ActiveCam].CamTargetEntity)->IsBoat() ? FREE_BOAT_ZOOM_VALUE_2 : FREE_CAR_ZOOM_VALUE_2; break;
|
||||
case 2: m_fCarZoomValueScript = ((CVehicle*)Cams[ActiveCam].CamTargetEntity)->IsBoat() ? FREE_BOAT_ZOOM_VALUE_3 : FREE_CAR_ZOOM_VALUE_3; break;
|
||||
default: break;
|
||||
}
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
switch (dist) {
|
||||
case 0: m_fCarZoomValueScript = DEFAULT_CAR_ZOOM_VALUE_1; break;
|
||||
case 1: m_fCarZoomValueScript = DEFAULT_CAR_ZOOM_VALUE_2; break;
|
||||
case 2: m_fCarZoomValueScript = DEFAULT_CAR_ZOOM_VALUE_3; break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
if (Cams[ActiveCam].CamTargetEntity->IsVehicle()) {
|
||||
int vehApp = ((CVehicle*)Cams[ActiveCam].CamTargetEntity)->GetVehicleAppearance();
|
||||
int vehArrPos = 0;
|
||||
GetArrPosForVehicleType(vehApp, vehArrPos);
|
||||
|
||||
m_bUseScriptZoomValueCar = true;
|
||||
#ifdef FREE_CAM
|
||||
if (bFreeCam) {
|
||||
switch (dist) {
|
||||
case 0: m_fCarZoomValueScript = LCS_ZOOM_ONE_DISTANCE[vehArrPos]; break;
|
||||
case 1: m_fCarZoomValueScript = LCS_ZOOM_TWO_DISTANCE[vehArrPos]; break;
|
||||
case 2: m_fCarZoomValueScript = LCS_ZOOM_THREE_DISTANCE[vehArrPos]; break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
switch (dist) {
|
||||
case 0: m_fCarZoomValueScript = ZOOM_ONE_DISTANCE[vehArrPos]; break;
|
||||
case 1: m_fCarZoomValueScript = ZOOM_TWO_DISTANCE[vehArrPos]; break;
|
||||
case 2: m_fCarZoomValueScript = ZOOM_THREE_DISTANCE[vehArrPos]; break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
m_bUseScriptZoomValueCar = true;
|
||||
} else {
|
||||
switch (dist) {
|
||||
case 0: m_fPedZoomValueScript = 0.25f; break;
|
||||
case 1: m_fPedZoomValueScript = 1.5f; break;
|
||||
case 2: m_fPedZoomValueScript = 2.9f; break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
m_bUseScriptZoomValuePed = true;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -26,20 +26,6 @@ enum
|
||||
CAM_ZOOM_CINEMATIC,
|
||||
};
|
||||
|
||||
#ifdef FREE_CAM // LCS values
|
||||
#define FREE_CAR_ZOOM_VALUE_1 (-1.0f)
|
||||
#define FREE_CAR_ZOOM_VALUE_2 (2.0f)
|
||||
#define FREE_CAR_ZOOM_VALUE_3 (6.0f)
|
||||
|
||||
#define FREE_BOAT_ZOOM_VALUE_1 (-2.41f)
|
||||
#define FREE_BOAT_ZOOM_VALUE_2 (6.49f)
|
||||
#define FREE_BOAT_ZOOM_VALUE_3 (15.0f)
|
||||
#endif
|
||||
|
||||
#define DEFAULT_CAR_ZOOM_VALUE_1 (0.05f)
|
||||
#define DEFAULT_CAR_ZOOM_VALUE_2 (1.9f)
|
||||
#define DEFAULT_CAR_ZOOM_VALUE_3 (3.9f)
|
||||
|
||||
const float DefaultFOV = 70.0f; // beta: 80.0f
|
||||
|
||||
class CCam
|
||||
@ -121,9 +107,8 @@ public:
|
||||
|
||||
float f_max_role_angle; //=DEGTORAD(5.0f);
|
||||
float f_Roll; //used for adding a slight roll to the camera in the
|
||||
float f_rollSpeed; //TODO(MIAMI): remove
|
||||
float f_rollSpeed;
|
||||
float m_fSyphonModeTargetZOffSet;
|
||||
float m_fRoadOffSet;
|
||||
float m_fAmountFractionObscured;
|
||||
float m_fAlphaSpeedOverOneFrame;
|
||||
float m_fBetaSpeedOverOneFrame;
|
||||
@ -208,11 +193,11 @@ public:
|
||||
void ProcessSpecialHeightRoutines(void);
|
||||
void GetVectorsReadyForRW(void);
|
||||
CVector DoAverageOnVector(const CVector &vec);
|
||||
float GetPedBetaAngleForClearView(const CVector &Target, float Dist, float BetaOffset, bool checkBuildings, bool checkVehicles, bool checkPeds, bool checkObjects, bool checkDummies);
|
||||
void WorkOutCamHeight(const CVector &TargetCoors, float TargetOrientation, float TargetHeight);
|
||||
bool RotCamIfInFrontCar(CVector &TargetCoors, float TargetOrientation);
|
||||
void Cam_On_A_String_Unobscured(const CVector &TargetCoors, float BaseDist);
|
||||
void FixCamWhenObscuredByVehicle(const CVector &TargetCoors);
|
||||
bool GetBoatLook_L_R_HeightOffset(float &Offset);
|
||||
void LookBehind(void);
|
||||
void LookLeft(void);
|
||||
void LookRight(void);
|
||||
@ -246,26 +231,14 @@ public:
|
||||
bool Process_WheelCam(const CVector&, float, float, float);
|
||||
void Process_Fixed(const CVector &CameraTarget, float, float, float);
|
||||
void Process_Player_Fallen_Water(const CVector &CameraTarget, float TargetOrientation, float, float);
|
||||
void Process_Circle(const CVector &CameraTarget, float, float, float);
|
||||
void Process_SpecialFixedForSyphon(const CVector &CameraTarget, float, float, float);
|
||||
void Process_LightHouse(const CVector &CameraTarget, float, float, float);
|
||||
void ProcessPedsDeadBaby(void);
|
||||
bool ProcessArrestCamOne(void);
|
||||
bool ProcessArrestCamTwo(void);
|
||||
|
||||
/* Some of the unused PS2 cams */
|
||||
void Process_Chris_With_Binding_PlusRotation(const CVector &CameraTarget, float, float, float);
|
||||
void Process_ReactionCam(const CVector &CameraTarget, float TargetOrientation, float, float);
|
||||
void Process_FollowPed_WithBinding(const CVector &CameraTarget, float TargetOrientation, float, float);
|
||||
// TODO:
|
||||
// CCam::Process_CushyPillows_Arse
|
||||
// CCam::Process_Look_At_Cars
|
||||
// CCam::Process_CheesyZoom
|
||||
// CCam::Process_Aiming
|
||||
// CCam::Process_Bill // same as BehindCar due to unused variables
|
||||
// CCam::Process_Im_The_Passenger_Woo_Woo
|
||||
// CCam::Process_Blood_On_The_Tracks
|
||||
// CCam::Process_Cam_Running_Side_Train
|
||||
// CCam::Process_Cam_On_Train_Roof
|
||||
bool GetLookAlongGroundPos(CEntity *Target, CPed *Cop, CVector &TargetCoors, CVector &SourceOut);
|
||||
bool GetLookFromLampPostPos(CEntity *Target, CPed *Cop, CVector &TargetCoors, CVector &SourceOut);
|
||||
bool GetLookOverShoulderPos(CEntity *Target, CPed *Cop, CVector &TargetCoors, CVector &SourceOut);
|
||||
|
||||
// custom stuff
|
||||
void Process_FollowPed_Rotation(const CVector &CameraTarget, float TargetOrientation, float, float);
|
||||
|
@ -1801,6 +1801,21 @@ CColSphere::Set(float radius, const CVector ¢er, uint8 surf, uint8 piece)
|
||||
this->piece = piece;
|
||||
}
|
||||
|
||||
bool
|
||||
CColSphere::IntersectRay(CVector const& from, CVector const& dir, CVector &entry, CVector &exit)
|
||||
{
|
||||
CVector distToCenter = from - center;
|
||||
float distToTouchSqr = distToCenter.MagnitudeSqr() - sq(radius);
|
||||
float root1, root2;
|
||||
|
||||
if (!CGeneral::SolveQuadratic(1.0f, DotProduct(distToCenter, dir) * 2.f, distToTouchSqr, root1, root2))
|
||||
return false;
|
||||
|
||||
entry = from + dir * root1;
|
||||
exit = from + dir * root2;
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
CColBox::Set(const CVector &min, const CVector &max, uint8 surf, uint8 piece)
|
||||
{
|
||||
|
@ -31,6 +31,7 @@ struct CColSphere : public CSphere
|
||||
uint8 piece;
|
||||
|
||||
void Set(float radius, const CVector ¢er, uint8 surf, uint8 piece);
|
||||
bool IntersectRay(CVector const &from, CVector const &dir, CVector &entry, CVector &exit);
|
||||
using CSphere::Set;
|
||||
};
|
||||
|
||||
|
@ -134,6 +134,18 @@ public:
|
||||
return *str2 != '\0';
|
||||
}
|
||||
|
||||
static bool SolveQuadratic(float a, float b, float c, float &root1, float &root2)
|
||||
{
|
||||
float discriminant = b * b - 4.f * a * c;
|
||||
if (discriminant < 0.f)
|
||||
return false;
|
||||
|
||||
float discriminantSqrt = Sqrt(discriminant);
|
||||
root2 = (-b + discriminantSqrt) / (2.f * a);
|
||||
root1 = (-b - discriminantSqrt) / (2.f * a);
|
||||
return true;
|
||||
}
|
||||
|
||||
// not too sure about all these...
|
||||
static uint16 GetRandomNumber(void)
|
||||
{ return myrand() & MYRAND_MAX; }
|
||||
|
@ -27,7 +27,7 @@ public:
|
||||
static uint32 GetTimeStepInMilliseconds() { return ms_fTimeStep / 50.0f * 1000.0f; }
|
||||
static const float &GetTimeStepNonClipped(void) { return ms_fTimeStepNonClipped; }
|
||||
static float GetTimeStepNonClippedInSeconds(void) { return ms_fTimeStepNonClipped / 50.0f; }
|
||||
static uint32 GetTimeStepNonClippedInMilliseconds(void) { return ms_fTimeStepNonClipped / 50.0f * 1000.0f; }
|
||||
static float GetTimeStepNonClippedInMilliseconds(void) { return ms_fTimeStepNonClipped / 50.0f * 1000.0f; }
|
||||
static void SetTimeStepNonClipped(float ts) { ms_fTimeStepNonClipped = ts; }
|
||||
static const uint32 &GetFrameCounter(void) { return m_FrameCounter; }
|
||||
static void SetFrameCounter(uint32 fc) { m_FrameCounter = fc; }
|
||||
|
@ -649,8 +649,8 @@ CWorld::GetIsLineOfSightSectorListClear(CPtrList &list, const CColLine &line, bo
|
||||
}
|
||||
|
||||
void
|
||||
CWorld::FindObjectsInRangeSectorList(CPtrList &list, Const CVector ¢re, float radius, bool ignoreZ, short *nextObject,
|
||||
short lastObject, CEntity **objects)
|
||||
CWorld::FindObjectsInRangeSectorList(CPtrList &list, Const CVector ¢re, float radius, bool ignoreZ, int16 *numObjects,
|
||||
int16 lastObject, CEntity **objects)
|
||||
{
|
||||
float radiusSqr = radius * radius;
|
||||
float objDistSqr;
|
||||
@ -666,16 +666,16 @@ CWorld::FindObjectsInRangeSectorList(CPtrList &list, Const CVector ¢re, floa
|
||||
else
|
||||
objDistSqr = diff.MagnitudeSqr();
|
||||
|
||||
if(objDistSqr < radiusSqr && *nextObject < lastObject) {
|
||||
if(objects) { objects[*nextObject] = object; }
|
||||
(*nextObject)++;
|
||||
if(objDistSqr < radiusSqr && *numObjects < lastObject) {
|
||||
if(objects) { objects[*numObjects] = object; }
|
||||
(*numObjects)++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
CWorld::FindObjectsInRange(Const CVector ¢re, float radius, bool ignoreZ, short *nextObject, short lastObject,
|
||||
CWorld::FindObjectsInRange(Const CVector ¢re, float radius, bool ignoreZ, int16 *numObjects, int16 lastObject,
|
||||
CEntity **objects, bool checkBuildings, bool checkVehicles, bool checkPeds,
|
||||
bool checkObjects, bool checkDummies)
|
||||
{
|
||||
@ -701,39 +701,39 @@ CWorld::FindObjectsInRange(Const CVector ¢re, float radius, bool ignoreZ, sh
|
||||
|
||||
AdvanceCurrentScanCode();
|
||||
|
||||
*nextObject = 0;
|
||||
*numObjects = 0;
|
||||
for(int curY = minY; curY <= maxY; curY++) {
|
||||
for(int curX = minX; curX <= maxX; curX++) {
|
||||
CSector *sector = GetSector(curX, curY);
|
||||
if(checkBuildings) {
|
||||
FindObjectsInRangeSectorList(sector->m_lists[ENTITYLIST_BUILDINGS], centre, radius,
|
||||
ignoreZ, nextObject, lastObject, objects);
|
||||
ignoreZ, numObjects, lastObject, objects);
|
||||
FindObjectsInRangeSectorList(sector->m_lists[ENTITYLIST_BUILDINGS_OVERLAP], centre,
|
||||
radius, ignoreZ, nextObject, lastObject, objects);
|
||||
radius, ignoreZ, numObjects, lastObject, objects);
|
||||
}
|
||||
if(checkVehicles) {
|
||||
FindObjectsInRangeSectorList(sector->m_lists[ENTITYLIST_VEHICLES], centre, radius,
|
||||
ignoreZ, nextObject, lastObject, objects);
|
||||
ignoreZ, numObjects, lastObject, objects);
|
||||
FindObjectsInRangeSectorList(sector->m_lists[ENTITYLIST_VEHICLES_OVERLAP], centre,
|
||||
radius, ignoreZ, nextObject, lastObject, objects);
|
||||
radius, ignoreZ, numObjects, lastObject, objects);
|
||||
}
|
||||
if(checkPeds) {
|
||||
FindObjectsInRangeSectorList(sector->m_lists[ENTITYLIST_PEDS], centre, radius, ignoreZ,
|
||||
nextObject, lastObject, objects);
|
||||
numObjects, lastObject, objects);
|
||||
FindObjectsInRangeSectorList(sector->m_lists[ENTITYLIST_PEDS_OVERLAP], centre, radius,
|
||||
ignoreZ, nextObject, lastObject, objects);
|
||||
ignoreZ, numObjects, lastObject, objects);
|
||||
}
|
||||
if(checkObjects) {
|
||||
FindObjectsInRangeSectorList(sector->m_lists[ENTITYLIST_OBJECTS], centre, radius,
|
||||
ignoreZ, nextObject, lastObject, objects);
|
||||
ignoreZ, numObjects, lastObject, objects);
|
||||
FindObjectsInRangeSectorList(sector->m_lists[ENTITYLIST_OBJECTS_OVERLAP], centre,
|
||||
radius, ignoreZ, nextObject, lastObject, objects);
|
||||
radius, ignoreZ, numObjects, lastObject, objects);
|
||||
}
|
||||
if(checkDummies) {
|
||||
FindObjectsInRangeSectorList(sector->m_lists[ENTITYLIST_DUMMIES], centre, radius,
|
||||
ignoreZ, nextObject, lastObject, objects);
|
||||
ignoreZ, numObjects, lastObject, objects);
|
||||
FindObjectsInRangeSectorList(sector->m_lists[ENTITYLIST_DUMMIES_OVERLAP], centre,
|
||||
radius, ignoreZ, nextObject, lastObject, objects);
|
||||
radius, ignoreZ, numObjects, lastObject, objects);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -941,7 +941,7 @@ CWorld::TestSphereAgainstSectorList(CPtrList &list, CVector spherePos, float rad
|
||||
|
||||
if(e != entityToIgnore && e->bUsesCollision &&
|
||||
!(ignoreSomeObjects && CameraToIgnoreThisObject(e))) {
|
||||
CVector diff = spherePos - e->GetPosition();
|
||||
CVector diff = spherePos - e->GetBoundCentre();
|
||||
float distance = diff.Magnitude();
|
||||
|
||||
if(e->GetBoundRadius() + radius > distance) {
|
||||
|
@ -103,8 +103,8 @@ public:
|
||||
|
||||
static CEntity *TestSphereAgainstWorld(CVector centre, float radius, CEntity *entityToIgnore, bool checkBuildings, bool checkVehicles, bool checkPeds, bool checkObjects, bool checkDummies, bool ignoreSomeObjects);
|
||||
static CEntity *TestSphereAgainstSectorList(CPtrList&, CVector, float, CEntity*, bool);
|
||||
static void FindObjectsInRangeSectorList(CPtrList&, Const CVector&, float, bool, short*, short, CEntity**);
|
||||
static void FindObjectsInRange(Const CVector&, float, bool, short*, short, CEntity**, bool, bool, bool, bool, bool);
|
||||
static void FindObjectsInRangeSectorList(CPtrList &list, Const CVector ¢re, float radius, bool ignoreZ, int16 *numObjects, int16 lastObject, CEntity **objects);
|
||||
static void FindObjectsInRange(Const CVector ¢re, float radius, bool ignoreZ, int16 *numObjects, int16 lastObject, CEntity **objects, bool checkBuildings, bool checkVehicles, bool checkPeds, bool checkObjects, bool checkDummies);
|
||||
static void FindObjectsOfTypeInRangeSectorList(uint32 modelId, CPtrList& list, const CVector& position, float radius, bool bCheck2DOnly, int16* nEntitiesFound, int16 maxEntitiesToFind, CEntity** aEntities);
|
||||
static void FindObjectsOfTypeInRange(uint32 modelId, const CVector& position, float radius, bool bCheck2DOnly, int16* nEntitiesFound, int16 maxEntitiesToFind, CEntity** aEntities, bool bBuildings, bool bVehicles, bool bPeds, bool bObjects, bool bDummies);
|
||||
static float FindGroundZForCoord(float x, float y);
|
||||
|
@ -202,12 +202,11 @@ enum Config {
|
||||
#define COMPATIBLE_SAVES // this allows changing structs while keeping saves compatible
|
||||
#define FIX_HIGH_FPS_BUGS_ON_FRONTEND
|
||||
|
||||
// Rendering/display
|
||||
#define ASPECT_RATIO_SCALE // Not just makes everything scale with aspect ratio, also adds support for all aspect ratios
|
||||
// Just debug menu entries
|
||||
#ifdef DEBUGMENU
|
||||
#define TOGGLEABLE_BETA_FEATURES // not too many things
|
||||
#define RELOADABLES // some debug menu options to reload TXD files
|
||||
#define MISSION_SWITCHER // from debug menu
|
||||
#endif
|
||||
|
||||
// Rendering/display
|
||||
|
@ -31,6 +31,7 @@
|
||||
#include "Text.h"
|
||||
#include "WaterLevel.h"
|
||||
#include "main.h"
|
||||
#include "Script.h"
|
||||
|
||||
#ifndef _WIN32
|
||||
#include "assert.h"
|
||||
@ -212,7 +213,7 @@ SpawnCar(int id)
|
||||
CVehicle *v;
|
||||
if(CModelInfo::IsBoatModel(id))
|
||||
v = new CBoat(id, RANDOM_VEHICLE);
|
||||
if(CModelInfo::IsBikeModel(id))
|
||||
else if(CModelInfo::IsBikeModel(id))
|
||||
v = new CBike(id, RANDOM_VEHICLE);
|
||||
else
|
||||
v = new CAutomobile(id, RANDOM_VEHICLE);
|
||||
@ -309,6 +310,15 @@ ResetCamStatics(void)
|
||||
TheCamera.Cams[TheCamera.ActiveCam].ResetStatics = true;
|
||||
}
|
||||
|
||||
#ifdef MISSION_SWITCHER
|
||||
int8 nextMissionToSwitch = 0;
|
||||
static void
|
||||
SwitchToMission(void)
|
||||
{
|
||||
CTheScripts::SwitchToMission(nextMissionToSwitch);
|
||||
}
|
||||
#endif
|
||||
|
||||
static const char *carnames[] = {
|
||||
"landstal", "idaho", "stinger", "linerun", "peren", "sentinel", "rio", "firetruk", "trash", "stretch", "manana",
|
||||
"infernus", "voodoo", "pony", "mule", "cheetah", "ambulan", "fbicar", "moonbeam", "esperant", "taxi", "washing",
|
||||
@ -512,7 +522,10 @@ DebugMenuPopulate(void)
|
||||
#ifdef TIMEBARS
|
||||
DebugMenuAddVarBool8("Debug", "Show Timebars", &gbShowTimebars, nil);
|
||||
#endif
|
||||
|
||||
#ifdef MISSION_SWITCHER
|
||||
DebugMenuAddInt8("Debug", "Select mission no", &nextMissionToSwitch, nil, 1, 0, 96, nil);
|
||||
DebugMenuAddCmd("Debug", "Start selected mission ", SwitchToMission);
|
||||
#endif
|
||||
extern bool PrintDebugCode;
|
||||
extern int16 DebugCamMode;
|
||||
DebugMenuAddVarBool8("Cam", "Use mouse Cam", &CCamera::m_bUseMouse3rdPerson, nil);
|
||||
|
Reference in New Issue
Block a user