mirror of
https://github.com/OpenDriver2/REDRIVER2.git
synced 2024-11-25 11:52:32 +01:00
- adding GetSeaPlane to help playerghost cheat
This commit is contained in:
parent
7831afa148
commit
7daecc88b9
@ -7,12 +7,20 @@
|
||||
#include "CONVERT.H"
|
||||
#include "CUTSCENE.H"
|
||||
#include "MISSION.H"
|
||||
#include "HANDLING.H"
|
||||
|
||||
#if defined(_DEBUG) || defined(DEBUG_OPTIONS)
|
||||
sdPlane sea = { 0, 0, 0, 0, 2048 };
|
||||
sdPlane default_plane = { 0, 0, 0, 0, 2048 };
|
||||
|
||||
sdPlane sea_plane = { 9, 0, 16384, 0, 2048 }; // a default surface if FindSurfaceD2 fails
|
||||
|
||||
sdPlane* GetSeaPlane()
|
||||
{
|
||||
#ifdef DEBUG_OPTIONS
|
||||
return playerghost ? &default_plane : &sea_plane;
|
||||
#else
|
||||
sdPlane sea = { 9, 0, 16384, 0, 2048 }; // a default surface if FindSurfaceD2 fails
|
||||
return &sea_plane;
|
||||
#endif
|
||||
}
|
||||
|
||||
ROAD_MAP_LUMP_DATA roadMapLumpData;
|
||||
short* RoadMapDataRegions[4];
|
||||
@ -708,12 +716,12 @@ _sdPlane * sdGetCell(VECTOR *pos)
|
||||
}
|
||||
else
|
||||
{
|
||||
plane = &sea;
|
||||
plane = GetSeaPlane();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
plane = &sea;
|
||||
plane = GetSeaPlane();
|
||||
}
|
||||
}
|
||||
return plane;
|
||||
|
@ -62,6 +62,8 @@ extern int NumDriver2Curves;
|
||||
|
||||
extern short* RoadMapDataRegions[4];
|
||||
|
||||
extern sdPlane* GetSeaPlane();
|
||||
|
||||
extern int GetSurfaceRoadInfo(DRIVER2_ROAD_INFO* outRoadInfo, int surfId);
|
||||
|
||||
extern void ProcessStraightsDriver2Lump(char *lump_file, int lump_size); // 0x000136C0
|
||||
|
@ -4291,7 +4291,6 @@ int OnBoat(VECTOR* pos, _EVENT* ev, int* dist)
|
||||
/* end block 2 */
|
||||
// End Line: 6773
|
||||
|
||||
extern _sdPlane sea;
|
||||
int debugOffset = 0;
|
||||
|
||||
// [D]
|
||||
@ -4320,7 +4319,7 @@ _sdPlane* EventSurface(VECTOR* pos, _sdPlane* plane)
|
||||
if (OnBoat(pos, ev, &dist) == 0)
|
||||
{
|
||||
LAB_0004aa60:
|
||||
return &sea;
|
||||
return GetSeaPlane();
|
||||
}
|
||||
|
||||
iVar8 = 200;
|
||||
@ -4345,7 +4344,7 @@ _sdPlane* EventSurface(VECTOR* pos, _sdPlane* plane)
|
||||
if (iVar9 << 0xb < iVar7)
|
||||
{
|
||||
debugOffset = iVar7;
|
||||
return &sea;
|
||||
return GetSeaPlane();
|
||||
}
|
||||
|
||||
uVar6 = (iVar8 - (FIXEDH(iVar5 * 3328) + ev->data[2] + ev->position.vy)) + (FIXEDH(iVar7) * rcossin_tbl[uVar3 * 2]) / iVar9;
|
||||
@ -4378,13 +4377,13 @@ _sdPlane* EventSurface(VECTOR* pos, _sdPlane* plane)
|
||||
{
|
||||
if (GameLevel != 3)
|
||||
{
|
||||
return &sea;
|
||||
return GetSeaPlane();
|
||||
}
|
||||
goto LAB_0004a880;
|
||||
}
|
||||
|
||||
if (GameLevel != 0)
|
||||
return &sea;
|
||||
return GetSeaPlane();
|
||||
|
||||
if ((ev->flags & 0x30U) == 0)
|
||||
iVar8 = pos->vz;
|
||||
|
@ -254,11 +254,12 @@ void FreeCameraKeyboardHandler(int nKey, bool down)
|
||||
}
|
||||
}
|
||||
|
||||
int gShowCollisionDebug = 0;
|
||||
|
||||
#if defined(DEBUG_OPTIONS) || defined(_DEBUG)
|
||||
|
||||
extern int g_texturelessMode;
|
||||
extern int g_wireframeMode;
|
||||
int gShowCollisionDebug = 0;
|
||||
extern int gDisplayPosition;
|
||||
extern int gDisplayDrawStats;
|
||||
int gStopCivCars = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user