mirror of
https://github.com/OpenDriver2/REDRIVER2.git
synced 2024-11-22 10:22:48 +01:00
- U/INT_MAX everywhere
This commit is contained in:
parent
c4839945b8
commit
9d97cefb90
@ -173,7 +173,7 @@ CAR_DATA* FindClosestCar(int x, int y, int z, int* distToCarSq)
|
|||||||
int dz; // $v1
|
int dz; // $v1
|
||||||
|
|
||||||
retCar = NULL;
|
retCar = NULL;
|
||||||
retDistSq = 0x7fffffff; // INT_MAX
|
retDistSq = INT_MAX;
|
||||||
lcp = car_data;
|
lcp = car_data;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
@ -2381,7 +2381,7 @@ int PingInCivCar(int minPingInDist)
|
|||||||
|
|
||||||
GetNodePos(roadInfo.straight, NULL, roadInfo.curve, civDat.distAlongSegment, newCar, &newCar->ai.c.targetRoute[0].x, &newCar->ai.c.targetRoute[0].z, lane);
|
GetNodePos(roadInfo.straight, NULL, roadInfo.curve, civDat.distAlongSegment, newCar, &newCar->ai.c.targetRoute[0].x, &newCar->ai.c.targetRoute[0].z, lane);
|
||||||
|
|
||||||
retDistSq = 0x7fffffff; // INT_MAX
|
retDistSq = INT_MAX;
|
||||||
pos[0] = newCar->ai.c.targetRoute[0].x;
|
pos[0] = newCar->ai.c.targetRoute[0].x;
|
||||||
pos[2] = newCar->ai.c.targetRoute[0].z;
|
pos[2] = newCar->ai.c.targetRoute[0].z;
|
||||||
pos[1] = randomLoc.vy;
|
pos[1] = randomLoc.vy;
|
||||||
|
@ -314,9 +314,10 @@ void InitCops(void)
|
|||||||
CarTail.vy = 0;
|
CarTail.vy = 0;
|
||||||
CarTail.vz = 0;
|
CarTail.vz = 0;
|
||||||
|
|
||||||
lastKnownPosition.vx = 0x7fffffff;
|
|
||||||
lastKnownPosition.vy = 0x7fffffff;
|
lastKnownPosition.vx = INT_MAX;
|
||||||
lastKnownPosition.vz = 0x7fffffff;
|
lastKnownPosition.vy = INT_MAX;
|
||||||
|
lastKnownPosition.vz = INT_MAX;
|
||||||
|
|
||||||
InitCopData(&gCopData);
|
InitCopData(&gCopData);
|
||||||
|
|
||||||
@ -780,7 +781,7 @@ void ControlCopDetection(void)
|
|||||||
|
|
||||||
CopsCanSeePlayer = (GameType == GAME_SURVIVAL);
|
CopsCanSeePlayer = (GameType == GAME_SURVIVAL);
|
||||||
|
|
||||||
minDistanceToPlayer = 0xFFFFFFFF;
|
minDistanceToPlayer = UINT_MAX;
|
||||||
|
|
||||||
// check roadblock visibility
|
// check roadblock visibility
|
||||||
if (numRoadblockCars != 0)
|
if (numRoadblockCars != 0)
|
||||||
@ -1039,12 +1040,12 @@ void ControlNumberOfCops(void)
|
|||||||
|
|
||||||
if (numCopCars <= numWantedCops)
|
if (numCopCars <= numWantedCops)
|
||||||
{
|
{
|
||||||
gCopData.cutOffDistance = 0x7fffffff;
|
gCopData.cutOffDistance = INT_MAX;
|
||||||
cop_respawn_timer = 0;
|
cop_respawn_timer = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
gCopData.cutOffDistance = 0x7fffffff;
|
gCopData.cutOffDistance = INT_MAX;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
cutOffDistance = 0;
|
cutOffDistance = 0;
|
||||||
|
@ -2505,7 +2505,7 @@ void InitLeadHorn(void)
|
|||||||
case 10: // Follow up the lead
|
case 10: // Follow up the lead
|
||||||
case 18: // Tail Jericho
|
case 18: // Tail Jericho
|
||||||
case 26: // Steal the ambulance
|
case 26: // Steal the ambulance
|
||||||
horn_time = 0xFFFFFFFF;
|
horn_time = UINT_MAX;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
horn_time = 0;
|
horn_time = 0;
|
||||||
@ -2521,7 +2521,7 @@ void LeadHorn(CAR_DATA* cp)
|
|||||||
int dx,dz;
|
int dx,dz;
|
||||||
|
|
||||||
// [A] disabled horn in those missions
|
// [A] disabled horn in those missions
|
||||||
if (horn_time == 0xFFFFFFFF)
|
if (horn_time == UINT_MAX)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// [A] do not horn if too far from camera
|
// [A] do not horn if too far from camera
|
||||||
|
Loading…
Reference in New Issue
Block a user