mirror of
https://github.com/OpenDriver2/REDRIVER2.git
synced 2024-11-22 02:12:43 +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
|
||||
|
||||
retCar = NULL;
|
||||
retDistSq = 0x7fffffff; // INT_MAX
|
||||
retDistSq = INT_MAX;
|
||||
lcp = car_data;
|
||||
|
||||
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);
|
||||
|
||||
retDistSq = 0x7fffffff; // INT_MAX
|
||||
retDistSq = INT_MAX;
|
||||
pos[0] = newCar->ai.c.targetRoute[0].x;
|
||||
pos[2] = newCar->ai.c.targetRoute[0].z;
|
||||
pos[1] = randomLoc.vy;
|
||||
|
@ -314,9 +314,10 @@ void InitCops(void)
|
||||
CarTail.vy = 0;
|
||||
CarTail.vz = 0;
|
||||
|
||||
lastKnownPosition.vx = 0x7fffffff;
|
||||
lastKnownPosition.vy = 0x7fffffff;
|
||||
lastKnownPosition.vz = 0x7fffffff;
|
||||
|
||||
lastKnownPosition.vx = INT_MAX;
|
||||
lastKnownPosition.vy = INT_MAX;
|
||||
lastKnownPosition.vz = INT_MAX;
|
||||
|
||||
InitCopData(&gCopData);
|
||||
|
||||
@ -780,7 +781,7 @@ void ControlCopDetection(void)
|
||||
|
||||
CopsCanSeePlayer = (GameType == GAME_SURVIVAL);
|
||||
|
||||
minDistanceToPlayer = 0xFFFFFFFF;
|
||||
minDistanceToPlayer = UINT_MAX;
|
||||
|
||||
// check roadblock visibility
|
||||
if (numRoadblockCars != 0)
|
||||
@ -1039,12 +1040,12 @@ void ControlNumberOfCops(void)
|
||||
|
||||
if (numCopCars <= numWantedCops)
|
||||
{
|
||||
gCopData.cutOffDistance = 0x7fffffff;
|
||||
gCopData.cutOffDistance = INT_MAX;
|
||||
cop_respawn_timer = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
gCopData.cutOffDistance = 0x7fffffff;
|
||||
gCopData.cutOffDistance = INT_MAX;
|
||||
|
||||
do {
|
||||
cutOffDistance = 0;
|
||||
|
@ -2505,7 +2505,7 @@ void InitLeadHorn(void)
|
||||
case 10: // Follow up the lead
|
||||
case 18: // Tail Jericho
|
||||
case 26: // Steal the ambulance
|
||||
horn_time = 0xFFFFFFFF;
|
||||
horn_time = UINT_MAX;
|
||||
break;
|
||||
default:
|
||||
horn_time = 0;
|
||||
@ -2521,7 +2521,7 @@ void LeadHorn(CAR_DATA* cp)
|
||||
int dx,dz;
|
||||
|
||||
// [A] disabled horn in those missions
|
||||
if (horn_time == 0xFFFFFFFF)
|
||||
if (horn_time == UINT_MAX)
|
||||
return;
|
||||
|
||||
// [A] do not horn if too far from camera
|
||||
|
Loading…
Reference in New Issue
Block a user