mirror of
https://github.com/OpenDriver2/REDRIVER2.git
synced 2024-11-22 02:12:43 +01:00
- Hardcoded bugfix for Vegas junction
This commit is contained in:
parent
bcba884ef1
commit
078024a992
@ -186,12 +186,18 @@ void DrawDebugOverlays()
|
||||
);
|
||||
|
||||
PrintString(tempBuf, 10, 195);
|
||||
|
||||
sprintf(tempBuf, "c %d %d %d %d",
|
||||
(int)(*roadInfo.ConnectIdx)[0], (int)(*roadInfo.ConnectIdx)[1], (int)(*roadInfo.ConnectIdx)[2], (int)(*roadInfo.ConnectIdx)[3]);
|
||||
|
||||
PrintString(tempBuf, 10, 205);
|
||||
}
|
||||
else if(IS_JUNCTION_SURFACE(roadInfo.surfId))
|
||||
{
|
||||
DRIVER2_JUNCTION* junc = GET_JUNCTION(roadInfo.surfId);
|
||||
|
||||
sprintf(tempBuf, "JUN %d flg %d",roadInfo.surfId, junc->flags);
|
||||
sprintf(tempBuf, "JUN %d flg %d - c %d %d %d %d",roadInfo.surfId, junc->flags,
|
||||
(int)(*roadInfo.ConnectIdx)[0], (int)(*roadInfo.ConnectIdx)[1], (int)(*roadInfo.ConnectIdx)[2], (int)(*roadInfo.ConnectIdx)[3]);
|
||||
|
||||
PrintString(tempBuf, 10, 180);
|
||||
}
|
||||
|
@ -535,7 +535,7 @@ int GetNextRoadInfo(CAR_DATA* cp, int randomExit, int* turnAngle, int* startDist
|
||||
exitCnt++;
|
||||
} while (exitCnt < 3);
|
||||
|
||||
if (leftLane != rightLane && numExits != 1)
|
||||
if (leftLane != rightLane && numExits != 1 && ROAD_LANES_COUNT(¤tRoadInfo) > 1)
|
||||
{
|
||||
if (cp->ai.c.currentLane == leftLane)
|
||||
{
|
||||
|
@ -94,6 +94,7 @@ int GetSurfaceRoadInfo(DRIVER2_ROAD_INFO* outRoadInfo, int surfId)
|
||||
{
|
||||
DRIVER2_CURVE* curve;
|
||||
DRIVER2_STRAIGHT* straight;
|
||||
DRIVER2_JUNCTION* junction;
|
||||
|
||||
ClearMem((char*)outRoadInfo, sizeof(DRIVER2_ROAD_INFO));
|
||||
outRoadInfo->surfId = surfId;
|
||||
@ -116,6 +117,11 @@ int GetSurfaceRoadInfo(DRIVER2_ROAD_INFO* outRoadInfo, int surfId)
|
||||
outRoadInfo->AILanes = straight->AILanes;
|
||||
return 1;
|
||||
}
|
||||
else if (IS_JUNCTION_SURFACE(surfId))
|
||||
{
|
||||
junction = GET_JUNCTION(surfId);
|
||||
outRoadInfo->ConnectIdx = &junction->ExitIdx;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -166,7 +172,7 @@ void ProcessStraightsDriver2Lump(char *lump_file, int lump_size)
|
||||
Getlong((char *)&NumDriver2Straights, lump_file);
|
||||
Driver2StraightsPtr = (DRIVER2_STRAIGHT *)(lump_file + 4);
|
||||
|
||||
// [A] patch chicago roads
|
||||
// [A] patch Chicago & Vegas roads
|
||||
if (GameLevel == 0 && gDisableChicagoBridges)
|
||||
{
|
||||
DRIVER2_STRAIGHT* str;
|
||||
@ -196,6 +202,14 @@ void ProcessStraightsDriver2Lump(char *lump_file, int lump_size)
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (GameLevel == 2)
|
||||
{
|
||||
int i;
|
||||
DRIVER2_STRAIGHT* str;
|
||||
|
||||
Driver2StraightsPtr[348].ConnectIdx[2] = 8244;
|
||||
Driver2StraightsPtr[348].ConnectIdx[3] = 351;
|
||||
}
|
||||
}
|
||||
|
||||
// [D] [T]
|
||||
@ -233,6 +247,13 @@ void ProcessJunctionsDriver2Lump(char *lump_file, int lump_size, int fix)
|
||||
old++;
|
||||
}
|
||||
}
|
||||
|
||||
// [A] patch Vegas roads
|
||||
if (GameLevel == 2)
|
||||
{
|
||||
Driver2JunctionsPtr[8244 & 0x1fff].ExitIdx[1] = 348;
|
||||
Driver2JunctionsPtr[8244 & 0x1fff].ExitIdx[3] = 347;
|
||||
}
|
||||
}
|
||||
|
||||
// [D] [T]
|
||||
|
Loading…
Reference in New Issue
Block a user